TNS侦听器错误 [英] TNS Listener error
问题描述
我已经安装了Oracle 11g,现在我在尝试连接PL-SQL Developer时收到以下错误
ORA-12154:TNS:无法解析指定的
连接标识符
如何检查指定的'identifier' ?
我的服务中现在有两个TNS侦听器,但只有11g可以启动,因为9i目录不再存在。
任何人都知道解决方案?
我的 tnsnames.ora
< >
ORCL =(DESCRIPTION =
(ADDRESS =(PROTOCOL = TCP)(HOST = XXX_L07082.xxx-batt.local)(PORT =
1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
))
<我的 listner.ora
LISTENER =(DESCRIPTION_LIST =
(DESCRIPTION =
ADDRESS =(PROTOCOL = IPC)(KEY = EXTPROC1521)
(ADDRESS =(PROTOCOL = TCP)(HOST = XXX_L07082.xxx-batt.local)(PORT = 1521))
) p>
sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES =(NTS)
NAMES.DIRECTORY_PATH =(TNSNAMES,
EZCONNECT)
TNSPING ORCL
正在尝试联系$ b(ADDRESS =(PROTOCOL = TCP)(HOST =
XXX_L070
82.xxx-batt.local)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)
AME = orcl)))OK(40 msec)
不幸的是,如果你安装多个版本的Oracle客户端,他们有时(可能经常?)不能很好地一起工作。
可能发生的是,一些路径在两个版本的Oracle客户端之间混合。
如果输入以下内容,会发生什么:tnsping [name]
将会给你一些更有用的信息。在Windows中,我通过编辑PATH环境变量修复了这些问题,并删除了对旧Oracle客户端的所有引用。您可以通过转到计算机 - >属性 - >高级系统设置(仅Vista和7) - >高级(选项卡) - >环境变量...编辑PATH环境变量...我通常复制出的路径,并在记事本中进行编辑,然后复制已编辑的路径。
如果这不起作用,并且旧客户端的目录结构存在,那么我会将tnsnames.ora复制到网络/ Admin目录下的旧客户端,看看是否有效。
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.xxx-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.
这篇关于TNS侦听器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!