我有一台带有服务器2008的虚拟机器,其中安装了Orcale 11g 64位,我可以在vm中使用sqlplus登录。
vm使用NAT网络,vm的ip是' 10.0.2.15' (我的主机IP是192.168.2.10)。
然后我打开网络端口转发,将我的主机中的端口1521
转发到虚拟机中的1521
。
然后我在主持人中测试转发:
telnet localhost 1521
成功。
然而,当我想通过Net Configuration Assistant
制作本地网络服务时,我遇到了错误:
ORA-12547: TNS lost contact.
发生了什么?
的listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:\app\Administrator
的tnsnames.ora
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
答案 0 :(得分:1)
我不确定发生了什么,但在我将localhost
更改为machinename
listener.ora
之后,它就可以了。
对于遇到同样问题的人,你可以尝试一下。