Pages

Wednesday, March 20, 2013

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

The cause of this error: SQL Plus cannot identify the connect string specified.
What can be the possible reasons:
1. The tnsnames.ora is not present under $ORACLE_HOME. You can check for it by typing %ORACLE_HOME% in command prompt.
2. The file is not accessible.
3. The file is invalid – because of the presence of junk characters or unmatched parenthesis.
4. The connect string that you have used – may not be present in the tnsnames.ora or present with somewhat different name – basically a mismatch of what you have entered and what is present in tnsnames.ora
5. Check the default directories for old or bad copies of tnsnames.ora
6. Please check with the database admins that the Listener is up and running for the connect string that you are trying to connect to.
7. Please check if TNSNAMES is present as one of the values for the NAMES.DIRECTORY_PATH parameter present in the sqlnet.ora file
NAMES.DIRECTORY_PATH= (TNSNAMES)
Please find below sample tnsnames and sqlnet.ora
TNSNAMES.ORA
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.90)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME=ORCL)
)
)

No comments:

Post a Comment