时间:2021-07-01 10:21:17 帮助过:35人阅读
找到以下目录,/opt/oracle/product/10.2.0/db_1/network/admin,修改listener.ora,(find -name listener.ora即可找到该文件)为: SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /export/home/oracle/app/oracle/p
找到以下目录,/opt/oracle/product/10.2.0/db_1/network/admin,修改listener.ora,(find -name listener.ora即可找到该文件)为:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /export/home/oracle/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /export/home/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ORCL)
)
)
红色为新增
在连接时还是报异常,说什么文件路径不存在,原因是我把orcl小写了,改成大写后连接成功
异常: The Network Adapter could not establish the connection
解决方法:将host改为主机名
如果还不行,使用netmgr工具配置监听器地址,工具地址:ORACLE_HOME/bin。
打开后Oracle Net Configuration->Local->Listeners->LISTENER->Add Address添加地址,
Protocal: TCP/IP Host: oracle所在的IP地址 Port:1521
然后保存,此异常解决。感谢博主http://yin123.blog.51cto.com/882581/428100的指点
http://blog.csdn.net/aaa1117a8w5s6d/article/details/8915517