Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

Hi All,

Precondition:
Primary database is up
Standby database is down

Issue:
When I a trying to connect to Standby database from the Primary database I am getting the following error:
ORA-12154: TNS:could not resolve the connect identifier specified


But I do not get any error when Primary and Standby databases are up. (Primary is up and running and Standby is mounted as Standby)

Could you please help me understand the issue?

Thanks and regards,
Kaustubh Kane.
5 REPLIES
Steven E. Protter
Exalted Contributor

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

Shalom,

This is a database connectivity issue.

Either there is a real networking problem preventing contact with the actual system or the problem resides in db configuration.

tnsnames.ora
sqlnet.ora
listner.ora

tnsping is the tool of choice for checking and correcting these configuration.

This is a generic error and unfortunately it could be caused by an OS bug (patching) or an Oracle bug. Check metalink.oracle.com for more info.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jonathan Fife
Honored Contributor

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

That error could indicate a number of things -- DNS issues, tns configuration issues, listener issues...Is the standby on a remote server?

What exactly are you trying to do when you get the message?
Decay is inherent in all compounded things. Strive on with diligence
Ben Dehner
Trusted Contributor

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

This error occurs when the Oracle client cannot resolve the connection string to a database. But it is really odd that this occurs only when the standby database is down. I would typically expect ORA-12514, "listener could not resolve SERVICE_NAME ...". But there are a couple of things to check.

Insure that the connection string is defined the tnsnames.ora file. Also insure that, in the sqlnet.ora file, that the NAMES.DIRECTORY_PATH directive includes TNSNAMES.

Also watch for the NAMES.DEFAULT_DOMAIN directive in the sqlnet.ora. If this is defined, it will be appended to any unqualified connection string. E.g., if

NAMES.DEFAULT_DOMAIN = us.mycompany.com

then "tnsping mydb" (or sql*plus or what have you) will actually try to resolve the connection string "mydb.us.mycompany.com", so that this fully qualified service name must be in the tnsnames.ora file. Again, I'm not sure why the operational status of the standby database would make a difference.
Trust me, I know what I'm doing
whiteknight
Honored Contributor

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


Hi,

I attached the TNS troubleshooting guide to see what is a probable cause.

Hope this help you to narrow down the issue.

WK
Problem never ends, you must know how to fix it
Joelmel Roche
Valued Contributor

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

Hi,

Perform these steps:

1. Verify that a tnsnames.ora file exists.
2. Verify that there are not multiple copies of the tnsnames.ora file.
3. In the tnsnames.ora file, verify that the net service name specified in your connect string is mapped to a connect descriptor.
4. Verify that there are no duplicate copies of the sqlnet.ora file.
5. If you are using domain names, verify that your sqlnet.ora file contains a NAMES.DEFAULT_DOMAIN parameter. If this parameter does not exist, you must specify the domain name in your connect string.
6. If you are not using domain names, and this parameter exists, delete it or disable it by commenting it out.
7. If you are connecting from a login dialog box, verify that you are not placing an "@" symbol before your connect net service name.
8. Activate client tracing and repeat the operation.