Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Let me know if you need more information or the whole code for the script. Thanks in advance to all u perl gurus....Here is the error: failed: ORA-12154: TNS:could not resolve the connect identifier specif +ied (DBD ERROR: OCIServerAttach) on line 70. Heres the code for my script: line 70 is the line that starts with my $dbp = DBI->.... print "Setting Database Connection to CDW-P.....\n"; # setting up database connection to CDW-P my $dbp = DBI->connect( 'dbi:Oracle:CDWP02' , "$user1" , "$passw") || die "Database connection not made: $DBI::errstr"; # Queries $Total_Free = "select SUM(BYTES/(1024*1024*1024)) as FREE_GB\n". "from dba_free_space WHERE TABLESPACE_NAME = 'USERSAUTO'"; $Total_V_Used = "select SUM(bytes/(1024*1024*1024)) as USE_GB\n". "from dba_segments WHERE TABLESPACE_NAME = 'USERSAUTO'\n"; $Used_by_ID = "select owner, SUM(bytes/(1024*1024*1024)) as TOTAL_GB\n +". "from dba_segments WHERE TABLESPACE_NAME = 'USERSAUTO'\n". "group by owner\n". "order by TOTAL_GB desc"; # Run Used Space Query print "Getting Used Space.\n"; ### Prepare a SQL statement for execution $CDWP_space_used = $dbp->prepare( "$Total_V_Used"); ### Execute the statement in the database $CDWP_space_used->execute; while ( $row = $CDWP_space_used->fetchrow_array( ) ) { $GC_space_used = $row; } print "$GC_space_used , Total CDW-P space\n";
2006-04-14 Retitled by planetscape, as per Monastery guidelines
Original title: 'DBD error Ora-12154'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (OT) DBD error Ora-12154
by Codon (Friar) on Apr 13, 2006 at 17:50 UTC | |
by Anonymous Monk on Apr 13, 2006 at 18:57 UTC | |
by Anonymous Monk on Apr 13, 2006 at 19:54 UTC | |
by beachbum (Beadle) on Apr 13, 2006 at 21:36 UTC | |
by Anonymous Monk on Apr 13, 2006 at 22:55 UTC | |
Re: (OT) DBD error Ora-12154
by Fletch (Bishop) on Apr 13, 2006 at 16:22 UTC | |
by Anonymous Monk on Apr 10, 2015 at 18:06 UTC | |
by Anonymous Monk on Jul 16, 2020 at 17:20 UTC | |
by Anonymous Monk on Apr 13, 2006 at 16:55 UTC | |
Re: (OT) DBD error Ora-12154
by Paladin (Vicar) on Apr 13, 2006 at 16:56 UTC | |
by Anonymous Monk on Apr 13, 2006 at 17:02 UTC | |
Re: (OT) DBD error Ora-12154
by kwaping (Priest) on Apr 13, 2006 at 17:00 UTC |