This error is often caused by typos, maybe in your connection string, but possibly in your tnsnames.ora file. It is also possible that the tnsnames.ora file is not accessible or does not even exist. If it does, ensure that it contains the service name you are using; also go over it to make sure it doesn’t have any unpaired parentheses or such.
Sometimes when you edit your tnsnames.ora file , especially if you copy-paste , some blank characters can be formed. The best solution is to open your tnsnames.ora file in a text editor and fine tune the format.
(tnsnames.ora file resides in path: /home/oracle/network/admin/tnsnames.ora)
Generic formatting should look like this:
NEWDB =
( DESCRIPTION =
( ADDRESS = (PROTOCOL = TCP)(HOST = HOST)(PORT = 1521) )
( CONNECT_DATA =
( SERVER = DEDICATED )
( SERVICE_NAME = NEWDB )
)
)
If you are working on a large corporate, sometimes your DNS cannot resolve the service name too. Lets say you have a DB with an HACMP configuration.
dbserver1.corphost , dbserver2.corphost.
Sometimes the connection cannot resolve the naming and DNS. So you better check first with ip connection before further investigation.
No comments:
Post a Comment