ora12541监听程序无法识别连接
1、这类问题需要修改oracle安装路径下tnsname.ora/ listener.ora等,有时需要改成机器名。。
2、其实pl/sql在安装32位client的时候已经能连接了。
3、在修改后服务重启后,发现web等仍连接不上,这时候不用再折腾了,只需要重启机器即可。
4、只用修改listener.ora成为例子中的样子就可以了。重启服务不行,再重启机器。
Listener.ora的正确内容
# listener.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_2\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\Administrator\product\11.2.0\dbhome_2)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_2\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME =orclyd)
(SID_NAME = orclyd)
(ORACLE_HOME = E:\app\Administrator\product\11.2.0\dbhome_2)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-FFADHU1VMKA)(PORT = 1521))
)
)
ADR_BASE_LISTENER = E:\app\Administrator
tnsnames.ora的正确内容
# tnsnames.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_2\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCLYD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-FFADHU1VMKA)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclyd)
)
)
LISTENER_ORCLYD =
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-FFADHU1VMKA)(PORT = 1521))
另一台机器的oracle配置
listener.ora
# listener.ora Network Configuration File: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME =YADANORA)
(SID_NAME = YADANORA)
(ORACLE_HOME = F:\app\Administrator\product\11.2.0\dbhome_1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-V381VBUULC9)(PORT = 1521))
)
)
ADR_BASE_LISTENER = F:\app\Administrator
tnsnames.ora
# tnsnames.ora Network Configuration File: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
YADANORA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-V381VBUULC9)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(Key = EXTPROC1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = YADANORA)
)
)