虚拟机Linux上,连接windows的oracle,连不上。解决方法。
虚拟机Linux上,连接windows的oracle,连不上。解决方法。
https://www.pianshen.com/article/9301357618/
https://www.cnblogs.com/grey-wolf/p/10529532.html#_label2_0
按照网上文章上安装了windows的oracle。
listener.ora文件是这样。
==========================================================================
# listener.ora Network Configuration File: E:\Program Files\Oracle\Instant Client\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\oracle_11g\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\oracle_11g\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 = F:\oracle_11g
==========================================================================
在windows上用PL/SQL连127.0.0.1/orcl,连的上。
listener.ora改成虚拟机Linux的ip,连接windows的oracle,连不上。
( 好像是这里的ip只能用127.0.0.1,设成其他的就报错 ORA-12514: TNS:listener does not currently know of service requested in connect descriptor,
在windows上PL/SQL连192.168.241.110/orcl也报同样的错)
windows防火墙上开了1521端口,网络是通的。
=====================================
最后试出来。
listener.ora文件不要改原来的,加上一行,就能登上了。
登上