Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-12154: TNS:could not resolve the connect identifier specified (PLSQL Developer)

I need to use PLSQL Developer to access oracle databases. I get the following error when I try to connect to my database. ORA-12154: TNS:could not resolve the connect identifier specified. I am able to use SQLPLUS from the command line to connect to the database, and tnsping returns successfully, but I can't figure out why PLSQL Developer will not work - it's using the right tnsnames.ora file, and the connection string in there is correct because it's the same one that tnsping uses.

Anyone have an idea what I can do to fix this? I've looked at other threads about this specific error with no luck.

tnsnames.ora

    ORCL =
      (DESCRIPTION = 
      (ADDRESS = (PROTOCOL = TCP)(HOST = MININT-AIVKVBM)(PORT = 1521)) 
      (CONNECT_DATA = 
        (SERVER = DEDICATED) 
        (SERVICE_NAME = orcl)
      )
    )

sqlnet.ora

     SQLNET.AUTHENTICATION_SERVICES= (NTS)
     NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

sqlpus command line image here

PLSQL Developer Connection Preferences: image here

like image 211
ZakTaccardi Avatar asked Oct 10 '12 18:10

ZakTaccardi


2 Answers

The answer was simply moving the PLSQL Developer folder from the "Program Files (x86) into the "Program Files" folder - weird!

like image 127
ZakTaccardi Avatar answered Sep 19 '22 16:09

ZakTaccardi


This error is very common, often the very first one you get on trying to establish a connection to your database. I suggest those 6 steps to fix ORA-12154 :

  1. Check instance name has been entered correctly in tnsnames.ora.
  2. There should be no control characters at the end of the instance or database name.
  3. All paranthesis around the TNS entry should be properly terminated
  4. Domain name entry in sqlnet.ora should not be conflicting with full database name.
  5. If problem still persists, try to re-create TNS entry in tnsnames.ora.
  6. At last you may add new entries using the SQL*Net Easy configuration utility.

For more informations : http://turfybot.free.fr/oracle/11g/errors/ORA-12154.html

like image 34
tufy Avatar answered Sep 21 '22 16:09

tufy