listener.ora怎么配置多IP监听

listener.ora怎么配置多IP监听,第1张

C:\Users\Administrator>lsnrctl status listener

...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.9.15)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))

...

C:\Users\Administrator>lsnrctl status listener1

...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=seya-PC)(PORT=1522)))

监听程序不支持服务

命令执行成功

SQL>alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.9.15)(PORT=1521)))' scope=both

系统已更改。

SQL>alter system set remote_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=seya-PC)(PORT=1522)))' scope=both

系统已更改。

SQL>alter system register

C:\Users\Administrator>sqlplus scott/tiger@192.168.9.15:1521/orcl

C:\Users\Administrator>sqlplus scott/tiger@seya-pc:1522/orcl

环境 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/))

)


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11602475.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-17
下一篇 2023-05-17

发表评论

登录后才能评论

评论列表(0条)

保存