Tuesday, December 8, 2015

ORA-12154 and TNS-03505

You may receive error “ORA-12154: TNS: could not resolve the connect identifier specified” while trying to connect with the database, and also “TNS-03505: Failed to resolve name” while using TNSPING to test the connection. Reasons for both of these error is that you have not created TNS service correctly
  • Make sure that TNS_ADMIN is pointing to the correct network directories.
  • Make sure that TNSNAMES is selected in NAMES.DIRECTORY_PATH parameter in SQLNET.ORA file
  • Make sure that service name you are using to connect to the database is being spelt correct in the connect string
  • If you have specified NAMES.DEFAULT_DOMAIN parameter with the domain name, make sure that TNS service is using this domain name as part of its name. For example if NAMES.DEFAULT_DOMAIN is set to WORLD, your TNS service should look like MYDBTNS.WORLD, and to connect to the database using this TNS, you can use wither @MYDBTNS or @MYDBTNS.WORLD.
  • If you have not specified NAMES.DEFAULT_DOMAIN; yet you created your TNS service with domain name i.e. MYDBTNS.WORLD, then you must use full TNS service name in your connect string i.e. @MYDBTNS.WORLD.

1 comment:

Popular Posts - All Times