3

I've edited added new TNS name to tnsnames.ora. Toad for Oracle started to work at once. SQL Plus doesn't work even after logoff/logon, the same problem with my build scripts.

Getting the error: ORA-12154: TNS:could not resolve the connect identifier specified

How could I fix it?

3
  • 2
    have you added a TNS_ADMIN environment variable?
    – vc 74
    Commented May 14, 2013 at 15:00
  • no, let me try...
    – Mykhaylo Adamovych
    Commented May 14, 2013 at 15:01
  • @MykhayloAdamovych:You need to put your tnsnames.ora in TNS_ADMIN, and set enviornment variable for TNS_ADMIN Commented May 14, 2013 at 15:03

3 Answers 3

7

There are various methods of achieving this ,one of them as suggested by Yasir. Please follow the below steps:

  1. Close toad/sqlplus
  2. Create a folder TNS_ADMIN
  3. Add tnsnames.ora in TNS_ADMIN
  4. Add TNS_ADMIN in enviornment variable.
  5. Open Toad/Sqlplus and login

I think this will be very clear ,cheer

1

Just put your Oracle Net files (tnsnames.ora, sqlnet.ora etc.) to $ORACLE_HOME/network/admin directory.

Local Naming Parameters (tnsnames.ora):

By default, the tnsnames.ora file is located in the ORACLE_HOME/network/admin directory.

1

The safest and simplest way to add a tns entry to an oracle client is to use the wizard. run netca on the command line and fill in the necessary fields step by step. if you need to add parameters edit what the wizard created.

1
  • Or Oracle Net Manager (netmgr) which provides slightly more advanced settings. ;-) Commented May 14, 2013 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.