At 17:01 +0100 16/10/01, Tim Bunce wrote:
>   I use Perl to connect to Oracle version 7.3.4 through DBI Perl
>(Unix Sun-Solaris). After some days of access, the driver has been
>knocking down the DB. So, the DB is started again. The presented
>error is TNS ora12154 (DBD: login failed).

Straight from oerr:
/u01/millerp/hps > oerr ORA 12154
12154, 00000, "TNS:could not resolve service name"
// *Cause:  The service name specified is not defined correctly 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 V2 Administrator's Guide. If
//             possible, regenerate the configuration files using the Oracle
//             Network Manager.

The error is actually in the tnsnames.ora file which is preventing a 
tns resolution of the nickname used in the connect string. Try:

$ sqlplus scott/tiger@ORCL

substituting a real user for 'scott', the real passeord for 'tiger' 
and finally the TNS connect string you are trying to use for 'ORCL'. 
You can also use the tnsping utility to troubleshoot this problem.

If the problem is suspected to be the first one named (tnsnames.ora 
file not in the right place) try setting the environment variable 
'TNS_ADMIN' to the path to the directory containing a 
known-to-be-good tnsnames.ora file.

TNS is very frustrating to debug, but using tnsping and testing with 
sqlplus will eventually get you there...

Regards

Paul Miller
-- 
-
Carib Data Limited

<mailto:[EMAIL PROTECTED]>
<http://www.caribdata.co.uk>

Reply via email to