Not able to log into a database

Isaac Blank

Member²
Hi,

Our TNSNames.ora file is rather large and is shared through tns_admin variable. When I try to connect to databases describes close to the end of the file, I get an ORA-12154 error.I can get around this by using a local short tnsnames.ora file and changing tns_admin accordingly, but this is sustainable in long run. Is there a better way of handling it?
 
This doesn't seem like a PL/SQL Developer issue. Can you connect to the same databases with other Oracle tools (e.g. SQL*PLus)?
 
Hi Marco,

SQL*Plus behaves the same way, so I am not blaming PL/SQL Developer. On the other hand, there are tools that let you specify machine, service, and port number directly, thus bypassing TNSNames restrictions. Maybe you could add this to a future version of PL/SQL Developer.
 
If you add the EZCONNECT to the names.directory_path of your sqlnet.ora file you can connect by using the host/database format. For example:

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

The following "newyork" database from a tnsnames.ora file can also be accessed by specifying "svr07/nydb" when using EZCONNECT:

Code:
newyork =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = SVR07)(PORT = 1521))
   )
    (CONNECT_DATA =
      (SERVICE_NAME = NYDB)
    )
  )
 
I'm not sure what you consider a large "tnsnames.ora" file. I was able to work with files that had about 200 entries without problems on Oracle Client versions 10 and 11.
Maybe you have some syntax error in the file, which causes all entries after that error being read incorrectly (we had such problems). You might try finding which entry causes the problem and see if removing it makes further entries work.
Maybe you are encountering some specific Oracle Client version bug - try different version and see if it helps.
 
Back
Top