Versions: All released Collect and DataGarage
Error: TNS-03505 Error Message: Failed to resolve name
Error: TNS-12154 Error Message: TNS:could not resolve the connect identifier specified.
Both of these error codes usually mean that the entry in tnsnames.ora file is incorrect or the tnsnames.ora file cannot be found.
1. Verify that the tnsnames.ora for this server entry is correct. (This seems to be the issue most of the time.)
a) The following is a basic format of a correct entry in the tnsnames.ora:
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = sap.address.com)
(PORT = 1527)
(SID = D21)
(GLOBAL_NAME = D21.WORLD)
b) Syntax to check:
- Make sure that for every left parenthesis there is a matching right parenthesis.
- There should not be a pair of parentheses around the entire entry.
- The value to the left of the very first = sign, is called the net service name (in the above example: D21). When attempting to TNSPING always use the net service name. (Example: TNSPING D21)
2. Verify that the tnsnames.ora file can be found.
a) If you attempted a TNSPING, the following information will be displayed:
TNS Ping Utility for 32-bit Windows: Version 220.127.116.11.0 - Production on 24-JUN-2015 13:51:11
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
The Used parameter files path is also where the tnsnames.ora file should reside.
b) The tnsnames.ora file should be located in %ORACLE_HOME%\network\admin. That is assuming that the %ORACLE_HOME% environment variable has been configured.
c) If the %ORACLE_HOME% environment variable is not set up, then check the %tns_admin% environment variable. If %tns_admin% is set up, it should contain the entire path to the folder where the tnsnames.ora file is located.