10g,修改oracle用户下$ORACLE_HOME/network/admin/listener.ora下的文件,增加类似红色一行
LISTENER_ORCLRAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclrac1-vip.com)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.116.21)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 145.145.20.21)(PORT = 1521)(IP = FIRST))
)
)
如果不是默认1521端口,需要重新设置local_listener
重启监听即可
$srvctl stop listener -n orclrac1
$srvctl start listener -n orclrac1
11g,修改grid用户下$ORACLE_HOME/network/admin/listener.ora下的文件,修改类似红色一行
#LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10.11)(PORT=1521)(IP=FIRST))))
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
如果不是默认1521端口,需要重新设置local_listener
重启监听即可
$srvctl stop listener -n orclrac1
$srvctl start listener -n orclrac1