Why do I get the err " ora-12154 TNS could not resolve service name" when connecting to my db in enterprise manager, but I am able to connect with no problem using SQL Plus, both on the same client???
Are you connecting to DB in OEM from separate computer? If so, you need to add the connect string in TNSNAMES.ora
I don't know about old versions of OEM. AFAIK, with 2.x versions OEM client is NOT integrated with Oracle Client. Two clients will be in two seperate homes with seperate Networking. You have to copy the Oracle Client tnsnames.ora to OEM networking home to connect to all the databases you are accessing from SQL*Plus.
[Edited by sreddy on 01-30-2001 at 05:03 PM]
Well I checked the shortcuts and both of the exe's are in my ORAWIN95/BIN directories.
Any other Ideas?
shamrock% oerr ORA 12154
12154, 00000, "TNS:could not resolve service name"
// *Cause: The service name specified is not defined correctly in the
// TNSNAMES.ORA file.
// *Action: Make the following checks and correct the error:
// - Verify that a TNSNAMES.ORA file exists and is in the proper
// place and accessible. See the operating system specific manual
// for details on the required name and location.
// - Check to see that the service name exists in one of the
// TNSNAMES.ORA files and add it if necessary.
// - Make sure there are no syntax errors anywhere in the file.
// Particularly look for unmatched parentheses or stray characters.
// Any error in a TNSNAMES.ORA file makes it unusable. See
// Chapter 4 in the SQL*Net V2 Administrator's Guide. If
// possible, regenerate the configuration files using the Oracle
// Network Manager.
I've found that if you use the IP of the server you are trying to connect to instead of the NAME you get less errors. Have you tried that?
So instead of sometyhing like: (HOST = calistoga)
You would insert the IP like: (HOST = 184.108.40.206)
Lets assume you run WinNT:
I. In BOTH OEM database server and Client:
1. search your disk for tnsnames.ora files
Then: a) either use TNS_ADMIN registry key to use only one tnsnames.ora file (this key must be in ALL oracle homes)
or b) correctly add service name in found and RELEVANT(sample tnsname.ora is not of concern :-)) ALL tnsnames.ora
2. Test connection by using tnsping:
a) cd to <OracleHome>\bin for ALL ORACLE homes you installed (Oracle homes can be found in registry under HKLM\Software\Oracle\Home<ID> and ALL_HOMES, etc, take a look.)
b) run tnsping or tnsping80 from THAT directory.
NOTE: Oracle mixed names of tnsname under windowses:
SQLNet had tnsping.exe
NET8 had tnsping80.exe up to oracle 805
From Oracle8i (815, etc) it is again tnsping.exe
Similar consideration for location of TNSNAMES.ORA file:
NET8 of 805: <OraHome>\net80
NET8 for O8i: <OraHome>\network
Click Here to Expand Forum to Full Width