动态注册
监听文件内容如下:
LISTENER =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora10g)(PORT = 1522))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /oracle/10g/db)
(GLOBAL_DBNAME= antiper)
(SID_NAME=antiper)
)
)
PMON默认只会动态注册1521的端口,而如果要动态注册非默认的1521端口,那么需要设定local_listener参数。
两种方式指定
1)
SQL> alter system set local_listener='(DESCRIPTION =(ADDRESS = (PROTOCOL=TCP)(HOST=ora10g)(PORT =1522)))';
2)在tnsnames.ora中指定
LISTENER =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora10g)(PORT = 1522))
)
然后设置alter system set local_listener='listener';
3)使用上述任一种方式设置后,手工注册
alter system register;
4)查看状态
lsnrctl status
Service "antiper" has 2 instance(s).
Instance "antiper", status UNKNOWN, has 1 handler(s) for this service...
Instance "antiper", status READY, has 1 handler(s) for this service...
注意:动态注册的端口和listener.ora中监听的名字是一样的
如果在tnsnames.ora设置时需要指定监听的名字与listener.ora中指定监听的名字一致的。
阅读(661) | 评论(0) | 转发(0) |