|
RAC环境增加第二个网段
各节点添加vip2
node1:root
cd /u01/app/11.2.0/grid/bin
./srvctl add vip -n node1 -k 2 -A node1-vip2/255.255.255.0/eth1
node2:root
cd /u01/app/11.2.0/grid/bin
./srvctl add vip -n node2 -k 2 -A node2-vip2/255.255.255.0/eth1
查看vip资源
./crsctl stat res -t | egrep "vip|network"
ora.net1.network
ora.net2.network
ora.node1-vip2.vip
ora.node1.vip
ora.node2-vip2.vip
ora.node2.vip
ora.scan1.vip
srvctl config network
./srvctl config vip -n node1
VIP exists: /node1-vip2/192.168.1.42/192.168.1.0/255.255.255.0/eth1, hosting node node1
VIP exists: /node1-vip/172.16.254.117/172.16.254.0/255.255.255.0/eth0, hosting node node1
./srvctl config vip -n node2
VIP exists: /node2-vip2/192.168.1.44/192.168.1.0/255.255.255.0/eth1, hosting node node2
VIP exists: /node2-vip/172.16.254.119/172.16.254.0/255.255.255.0/eth0, hosting node node2
各节点启动vip2
./srvctl start vip -i node1-vip2
./srvctl start vip -i node2-vip2
vip地址上增加监听,在一个节点上执行即可:
su - grid
node1-> srvctl add listener -l LISTENER2 -s -p 1521 -k 2
node1-> srvctl config listener -a
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
/u01/app/11.2.0/grid on node(s) node2,node1
End points: TCP:1521
Name: LISTENER2
Network: 2, Owner: grid
Home: <CRS home>
/u01/app/11.2.0/grid on node(s) node2,node1
End points: TCP:1521
启动LISTENER2监听:
srvctl start listener -l LISTENER2
查看监听状态:
srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): node2,node1
Listener LISTENER2 is enabled
Listener LISTENER2 is running on node(s): node2,node1
编辑 tnsnames.ora
DEVDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = scan-cluster.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = devdb)
)
)
listener_net2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.44)(PORT = 1521))
)
remote_net2 =
(DESCRIPTION_LIST =
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.42)(PORT = 1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.44)(PORT = 1521)))
)
节点分别执行:
ALTER SYSTEM SET listener_networks='((NAME=network1)(LOCAL_LISTENER=NODE1_LOCAL_NET1)(REMOTE_LISTENER=scan-cluster.localdomain:1521))','((NAME=network2)(LOCAL_LISTENER=NODE1_LOCAL_NET2)(REMOTE_LISTENER=REMOTE_NET2))'SCOPE=BOTH SID='DEVDB1';
ALTER SYSTEM SET listener_networks='((NAME=network1)(LOCAL_LISTENER=NODE1_LOCAL_NET1)(REMOTE_LISTENER=scan-cluster.localdomain:1521))','((NAME=network2)(LOCAL_LISTENER=NODE1_LOCAL_NET2)(REMOTE_LISTENER=REMOTE_NET2))'SCOPE=BOTH SID='DEVDB2';
查看节点注册:
[root@node2 admin]# su - grid
node2-> lsnrctl status listener2
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 27-MAR-2014 13:06:39
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER2)))
STATUS of the LISTENER
------------------------
Alias LISTENER2
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 27-MAR-2014 12:18:40
Uptime 0 days 0 hr. 47 min. 58 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/11.2.0/grid/log/diag/tnslsnr/node2/listener2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER2)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.44)(PORT=1521)))
Services Summary...
Service "devdb" has 1 instance(s).
Instance "devdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
node2-> lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 27-MAR-2014 13:06:54
Copyright (c) 1991, 2011, 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.3.0 - Production
Start Date 27-MAR-2014 12:58:46
Uptime 0 days 0 hr. 8 min. 8 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/node2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.254.118)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.254.119)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "devdb" has 1 instance(s).
Instance "devdb2", status READY, has 1 handler(s) for this service...
Service "devdbXDB" has 1 instance(s).
Instance "devdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
|
|