TNS Listener error
I've installed Oracle 11g and now I'm getting the following error when I try to connect with PL-SQL Developer
ORA-12154: TNS:could not resolve the connect identifier specified
How do I check what 'identifier' is specified?
There are two TNS listeners in my services now but only the 11g can start because the 9i directory does not exist anymore.
Anyone know a solution?
My tnsnames.ora
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = XXX_L07082.x开发者_如何学Cxx-batt.local)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
My listner.ora
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = XXX_L07082.xxx-batt.local)(PORT = 1521)) ) )
sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
TNSPING ORCL
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = XXX_L070 82.xxx-batt.local)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_N AME = orcl))) OK (40 msec)
Do you have multiple Oracle clients installed at the same time?
Unfortunately, if you install multiple versions of the Oracle client, they sometimes (maybe often?) don't work well together. What is probably happening is that some of the paths are getting mixed between the two versions of the Oracle client. I would remove the older one.
What happens if you type in: tnsping [name]
Maybe tnsping will give you some more useful information.
In Windows, I have fixed these sorts of problems before by editing the PATH environment variable, and removing all references to the old Oracle client. You can edit the PATH environment variable by going to Computer -> Properties -> Advanced System Settings (Vista and 7 only) -> Advanced (tab) -> Environment Variables... I usually copy out the path and edit it in notepad, then copy the edited path back in.
If this doesn't work and the directory structure for the old client exists, then I would copy the tnsnames.ora into the Network/Admin directory of the old client to see if that works.
精彩评论