Connecting Tech Pros Worldwide Help | Site Map

ORA-12162 TNS:net service name is incorrectly specified

Newbie
 
Join Date: Mar 2007
Location: West Virginia
Posts: 11
#1: Jul 11 '07
I've looked up information on this error, but I can't find any problems with my tnsnames.ora file. I even double checked with another machine that has the same client.

What else could be causing this error when trying to open a connection? My connection string is good.
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,504
#2: Jul 12 '07

re: ORA-12162 TNS:net service name is incorrectly specified


Cause: The connect descriptor corresponding to the net service name in TNSNAMES.ORA or in the directory server (Oracle Internet Directory) is incorrectly specified.

Action: If using local naming make sure there are no syntax errors in the corresponding connect descriptor in the TNSNAMES.ORA file. If using directory naming check the information provided through the administration used for directory naming.
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,504
#3: Jul 12 '07

re: ORA-12162 TNS:net service name is incorrectly specified


It suggests that there is a problem with the tnsnames.ora file contents, but in reality the message ORA-12162 "TNS:net service name is incorrectly specified" results from improperly setting your ORACLE_SID value.

To fix this error in Windows, set your $ORACLE_HOME:

c:> set ORACLE_SID=DEBASIS
Newbie
 
Join Date: Mar 2007
Location: West Virginia
Posts: 11
#4: Jul 12 '07

re: ORA-12162 TNS:net service name is incorrectly specified


I tried both suggestions, but neither fixed the problem.
Reply