RAC数据库添加第二网卡服务IP
添加第二个服务IP
racnode1 10.1.1.1
racnode1-vip1 10.1.1.3
racnode2 10.1.1.2
racnode2-vip1 10.1.1.4
将解析添加至/etc/hosts文件
# Public 172.16.1.21 racnode1 172.16.1.22 racnode2 # Private 2.2.2.1 racnode1-priv 2.2.2.2 racnode2-priv # Virtual 172.16.1.23 racnode1-vip 172.16.1.24 racnode2-vip # SCAN 172.16.1.25 scan #virtual2 10.1.1.3 racnode1-vip1 10.1.1.4 racnode2-vip1
查看当前network
[root@racnode1 admin]# srvctl config network Network exists: 1/172.16.1.0/255.255.255.0/eth0, type static
添加网络
[root@racnode1 admin]# srvctl add network -k 2 -S 10.1.1.0/255.255.255.0/eth2
在查看网络
[root@racnode1 admin]# srvctl config network Network exists: 1/172.16.1.0/255.255.255.0/eth0, type static Network exists: 2/10.1.1.0/255.255.255.0/eth2, type static
查看VIP信息
[root@racnode1 admin]# srvctl status vip -n racnode1 VIP racnode1-vip is enabled VIP racnode1-vip is running on node: racnode1 [root@racnode1 admin]# srvctl status vip -n racnode2 VIP racnode2-vip is enabled VIP racnode2-vip is running on node: racnode2
注册VIP
[root@racnode1 admin]# srvctl add vip -n racnode1 -k 2 -A racnode1-vip1/255.255.255.0/eth2 [root@racnode1 admin]# srvctl add vip -n racnode2 -k 2 -A racnode2-vip1/255.255.255.0/eth2
再次查看VIP
[root@racnode1 admin]# srvctl status vip -n racnode1 VIP racnode1-vip1 is enabled VIP racnode1-vip1 is not running VIP racnode1-vip is enabled VIP racnode1-vip is running on node: racnode1 [root@racnode1 admin]# srvctl status vip -n racnode2 VIP racnode2-vip1 is enabled VIP racnode2-vip1 is not running VIP racnode2-vip is enabled VIP racnode2-vip is running on node: racnode2
通过grid用户添加监听
添加完成后监听不会被数据库注册使用
[grid@racnode1 ~]$ lsnrctl listener1 LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 19-APR-2017 22:39:44 Copyright (c) 1991, 2013, Oracle. All rights reserved. NL-00853: undefined command "listener1". Try "help" [grid@racnode1 ~]$ lsnrctl status listener1 LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 19-APR-2017 22:39:50 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER1))) STATUS of the LISTENER ------------------------ Alias LISTENER1 Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 19-APR-2017 22:39:17 Uptime 0 days 0 hr. 0 min. 36 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/racnode1/listener1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.1.3)(PORT=1522))) The listener supports no services The command completed successfully
oracle用户节点1tnsnames.ora添加
listener=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.1.23)(PORT=1521))) listener1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.1.3)(PORT=1522)))
oracle用户节点2tnsnames.ora添加
listener=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.1.24)(PORT=1521))) listener1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.1.4)(PORT=1522)))
设置LISTENER_NETWORKS参数
alter system set LISTENER_NETWORKS='((NAME=network1)(LOCAL_LISTENER=listener)(REMOTE_LISTENER=))','((NAME=network2)(LOCAL_LISTENER=listener1)(REMOTE_LISTENER=))' scope=both ;
再次查看监听信息
[root@racnode1 ~]# lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 19-APR-2017 22:50:35 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 19-APR-2017 22:20:58 Uptime 0 days 0 hr. 29 min. 37 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/racnode1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.1.21)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.1.23)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "racdg" has 1 instance(s). Instance "racdg1", status READY, has 1 handler(s) for this service... The command completed successfully [root@racnode1 ~]# lsnrctl status listener1 LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 19-APR-2017 22:50:51 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER1))) STATUS of the LISTENER ------------------------ Alias LISTENER1 Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 19-APR-2017 22:39:17 Uptime 0 days 0 hr. 11 min. 37 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/racnode1/listener1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.1.3)(PORT=1522))) Services Summary... Service "racdg" has 1 instance(s). Instance "racdg1", status READY, has 1 handler(s) for this service... The command completed successfully
坚持,专注