分类: Oracle
2013-04-25 00:07:52
环境 centos 5.4 + oracle 10g r2
已有实例 xxxio 和监听listener 端口1521
现又新建实例 xxxdb 监听名称listener02 端口 1522
实现 listener02 只加载实例 xxxdb
1.创建数据库 实例名xxxdb
2.netca 创建监听 listener02 端口1522
3.配置listener.ora 如下
# listener.ora Network Configuration File: /u01/app/oracle/product/10g//network/
admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = xxxio)
(ORACLE_HOME = /u01/app/oracle/product/10g/)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = +ASM)
(ORACLE_HOME = /u01/app/oracle/product/10g/)
)
(SID_DESC =
(SID_NAME = xxxdb)
(ORACLE_HOME = /u01/app/oracle/product/10g/)
)
)
SID_LIST_LISTENER02 =
(SID_LIST =
(SID_DESC =
(SID_NAME = xxxdb)
(ORACLE_HOME = /u01/app/oracle/product/10g/)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
LISTENER02 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522))
)
)
说明 : 自己在配置过程中也遇到了好多问题 ,最后通过查看资料和实际测试 证明上述的配置是正确的
1.首先用netca创建 listener02 后 会在配置文件listener.ora中 生成如下的信息 。这说明一个监听创建成功。
可以启动 、关闭 。但是没有加载实例。
LISTENER02 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1522))
)
)
2.在配置文件listener.ora 中加入如下信息 ,才能将实例xxxdb 加载到监听 listener02中 实现 各尽其职
SID_LIST_LISTENER02 = --这的命名是SID_LIST_监听名
(SID_LIST =
(SID_DESC =
(SID_NAME = xxxdb)
(ORACLE_HOME = /u01/app/oracle/product/10g/)
)
)