TNS: service_name

lynn_sai

Member²
We have several applications using Oracle client 7.3 and everything was working fine with DOA.
But now we migrate them into Oracle Client 8.1.x, most of the application work fine but there is only one application keeps giving me an error message : "ORA-12162: TNS: service name is incorrectly specified"

We've already checked everything, but still can not find what causes this error, there should be something hidden somewhere !!!!

Any Idea how to fix it ?

Thanks alot......
 
According to the Oracle Error Messages Guide this suggests an error in the tnsnames.ora file:

Cause: The connect descriptor corresponding to the service name in TNSNAMES.ORA is incorrectly specified.

Action: Make sure there are no syntax errors in the connect descriptor. Particularly look for unmatched parentheses or stray characters. Any error in a TNSNAMES.ORA file makes it unusable. See the SQL*Net V2 Administrator's Guide.

------------------
Marco Kalter
Allround Automations
 
You can also run a useful test bypassing tnsnames.ora by using the right side of the tnsnames.ora entry as the database identifier. For example to connect to:

TESTDB=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = TEST.ORG.COM)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = TESTDB)
)
)

You can enter the string:

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=PROTOCOL=TCP)(HOST=TEST.ORG.COM)(PORT = 1521)))(CONNECT_DATA=(SERVICE_NAME=TESTDB)))

Be sure to get the syntax correct, of course.
 
We solved our ORA-12162 errors when we discovered that they only occurred on programs whose full path contained ( or ) characters- that is, open-paren or closed-paren characters. When we renamed those directories, the problem was solved.

Hope this helps-

Charlie Wilson
 
I started having this problem and my solution was to captialize the TNS name. For instance, we used "bob.bizserve" for Oracle 7.3.4. When we updated to 8.1.6 this stopped working with TNS errors. Changing to "BOB.BIZSERVE" fixed it and all started working again.

-- Brett Fattori
Online Technologies Corp.
 
Back
Top