Not able to connect to the DB:TNS-03505 or ORA-12154

Author:

Not able to connect to the DB.

Error Messages encountered:

TNS-03505:
Failed to resolve name

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

The possible solutions can be


a.      If the error message is like Check if TNSPING is
working from the command shell. For this you need to run “tnsping DB_identifier”. The DB_identifier is a string for which the
Oracle client will search in the “tnsnames.ora” file. For example

 

 

TESTDB =

 
(DESCRIPTION =

   
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.22.30.249)(PORT = 1521))

   
(CONNECT_DATA =

      (SERVICE_NAME = TESTDB.WORLD)   )  )

 

 

Here
the DB_identifier is “TESTDB”. This can be any string. The service name here is TESTDB.WORLD,
this is DB specific here and has to be same everywhere.

If
no response is observed from the above tnsping command then you need to check
if the DB_identifier that you are using is present in the tnsnames.ora file.

Leave a Reply

Your email address will not be published.