电脑技术学习

为什么同机安装10g和11g后会出现连接问题

dn001
案例:在同一台机器的2个不同的用户下安装了Oracle 10g和Oracle 11g(Oracle用户安装10g,daizy用户安装Oracle 11g),但是发现原来的Oracle 10g可以远程连接,而Oracle 11g确不能连接。

解决方法:

修改listener.ora后,10g和11g的连接即可恢复正常。

具体示例如下:

Oracle数据库10g

cat listener.ora

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = oratest)(PORT = 1521))

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

)

)

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /home/oracle/OraHome_1)

(PROGRAM = extproc)

)

(SID_DESC =

(ORACLE_HOME = /home/oracle/OraHome_1)

(SID_NAME = test)

)

)

Oracle数据库11g

cat listener.ora

# listener.ora Network Configuration File: /home/daizy/OraHome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.170)(PORT = 1522))

(ADDRESS = (PROTOCOL = IPC)(KEY = dzy))

)

)

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /home/daizy/OraHome_1)

(PROGRAM = extproc)

)

(SID_DESC =

(ORACLE_HOME = /home/daizy/OraHome_1)

(SID_NAME = dzy)

)

)