Jason,
        Looking up the error it is a problem with tnsnames.ora

>From Oracle documentation:
--------------------------------------------------------------------------
ORA-12154 TNS:Could not resolve service name

Cause: The service name specified is not defined in the TNSNAMES.ORA file.  

Action: Make the following checks and correct the error: 

Verify that a TNSNAMES.ORA file exists and is in the proper place and accessible. See 
the operating system specific manual for details on the required name and location.
Check to see that the service name exists in one of the TNSNAMES.ORA files and add it 
if necessary.
Make sure there are no syntax errors anywhere in the file. Particularly look for 
unmatched parentheses or stray characters. Any error in a TNSNAMES.ORA file makes it 
unusable. See
Chapter 4 in the SQL*Net Administrator's Guide. If possible regenerate the 
configuration files using the Oracle Network Manager.
--------------------------------------------------------------------------

Since you say the file exists then it is either a location or rights issue.  It should 
be in $Oracle_Home/network/admin and readable by the ID you are using for Perl.

Andy

-----Original Message-----
From: Resmy Jason [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 1:07 PM
To: Mitchell, Louise M
Cc: [EMAIL PROTECTED]
Subject: Re: install bdb-oracle on 8.1.6


I checked that already and my tnsnames.ora has 'mingus' and I also
set the TNS_ADMIN variable and still I am getting the same error.
I wondered this is a DBD error because it says the line 
"DBD ERROR: OCIServerAttach". When I got this error first I checked 
my tnsnames.ora and it looked fine to me. I have in tnsnames.ora
 entry as follows:
mingus =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mingus.fccc.edu)(PORT = 1521))
    (CONNECT_DATA = (SID = oracle))
  ) 

Can you think of any other missing vaintranetlues.
Thank you for your help
Resmy  
"Mitchell, Louise M" wrote:
> 
> Jason,
> 
> The problem is not with the DBI, but with your Oracle connectivity.
> 
> The error you received means that your sqlnet configuration cannot figure out
> what 'mingus' is... if you are using a tnsnames.ora, check that your entry for
> that db is in place...if you are using names, check that the entry is in the
> nameserver.
> 
> Hope this helps..
> 
> L
> 
> -----Original Message-----
> From: Resmy Jason [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 9:06 AM
> To: [EMAIL PROTECTED]
> Subject: install bdb-oracle on 8.1.6
> 
> Hi,
> see if somebody could help me.
> I installed DBD-Oracle 1.06 on Oracle 8.1.6 on a Solaris platform.
> The installation worked fine. But when I execute a perl program
> that call the DBD it gives the following error
> 
> DBI->connect(mingus) failed: ORA-12154: TNS:could not resolve service
> name () at ./delete_sample.pl line 21
> Can't call method "prepare" on an undefined value at ./delete_sample.pl
> line 26, <STDIN> line 1
> 
> The first few lines of my code is as follows:
> 
> #!/usr/local/bin/perl
> # delete_sample.pl Code to delete samples from the table
> # specinfo in polaris database
> # as per the user's input
> #
> use DBI;
> 
> my ($dbh, $rows, $stmt, $rc);
> 
> $ENV{'ORACLE_HOME'}="/usr/oracle";
> $ENV{'ORACLE_SID'}="oracle";
> $ENV{'LD_LIBRARY_PATH'}="/usr/oracle/lib";
> 
> # Connect to the database
> # Change your_dbalias to the SQL*Net V2 alias for your database
> # Change username/password to a valid database user/password combination
> 
> print "Enter the sample name you want to \ndelete (Use Uppercase
> only):";
> chop ($sample = <STDIN>);
> print "\nConnecting to Database\n\n";
> $dbh = DBI->connect("dbi:Oracle:mingus","/", ""); op ($sample =
> <STDIN>);
> 
> Can anybody help me
> Thanks
> Resmy
> 
> --
> *****************************************************************
> * Resmy Jason                      *             (215) 728 3660 *
> * Oracle Database Administrator    *   Fax:      (215) 728 2513 *
> * Research Computing Services      *   E-mail: [EMAIL PROTECTED] *
> * Fox Chase Cancer Center          *                            *
> * Philadelphia, PA 19111, USA      *                            *
> *****************************************************************

-- 
*****************************************************************
* Resmy Jason                      *             (215) 728 3660 *
* Oracle Database Administrator    *   Fax:      (215) 728 2513 *      
* Research Computing Services      *   E-mail: [EMAIL PROTECTED] *
* Fox Chase Cancer Center          *                            *
* Philadelphia, PA 19111, USA      *                            *
*****************************************************************

Reply via email to