RAC如何在不停止資料庫例項和叢集服務的情況下修改IP地址
修改RAC的IP通常修改的是公共網路的IP地址(包括:公共IP,VIP,SCAN VIP),只要不修改私有網路的IP地址,Clusterware服務和RAC所有例項都不需要停止,這樣可以更有效的保障資料安全和節約時間。
這篇文章將以Oracle 11gR2 RAC for Linux修改公共網路的網段來討論如何在不停止資料庫例項和叢集服務的情況下完成。
>>這裡還有三點需要說明一下:
1.公共IP地址和私有IP地址不儲存在OCR中,修改主機地址和hosts檔案,確保在oifcfg的相同網段即可。
2.修改公共網路相關的IP地址,包括公共IP,VIP,SCAN VIP只會影響外部對資料庫的訪問,但不會影響RAC本身的執行。
3.私有網路和OCR、Votedisk才會影響Clusterware服務的執行,這兩個條件具備RAC核心即可成功啟動和執行。
>>修改步驟:
1.停止Service、nodeapps、LISTENER、vip、scan_listener、scan等和公共網路相關的服務。
2.使用Clusterware oifcfg工具調整Clusterware PUBLIC網路,該設定不需要重啟Clusterware即生效,但並不影響當前RAC的執行。
3.修改主機公共網路卡IP使其生效,修改hosts,DNS等服務。
4.修改network、nodeapps、scan、scan_listener、例項註冊等資訊,最後啟動Service等服務。
一.停止公共網路相關的服務。
[root@rhel1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DBFILE1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.FRA1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER.lsnr
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER2.lsnr
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.OCR.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.asm
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.gsd
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.net1.network
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.net2.network
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.ons
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.registry.acfs
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rhel1
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE rhel2
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE rhel1
ora.cvu
1 ONLINE ONLINE rhel2
ora.oc4j
1 ONLINE ONLINE rhel2
ora.ractest.db
1 ONLINE ONLINE rhel1 Open
2 ONLINE ONLINE rhel2 Open
ora.ractest.rtser1.svc
1 ONLINE ONLINE rhel1
ora.rhel1.vip
1 ONLINE ONLINE rhel1
ora.rhel2.vip
1 ONLINE ONLINE rhel2
ora.rhelpub21-vip.vip
1 ONLINE OFFLINE
ora.rhelpub22-vip.vip
1 ONLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE rhel1
ora.scan2.vip
1 ONLINE ONLINE rhel2
ora.scan3.vip
1 ONLINE ONLINE rhel1
[root@rhel1 bin]# ./srvctl stop service -d ractest -s rtser1
[root@rhel1 bin]# ./srvctl stop scan_listener
[root@rhel1 bin]# ./srvctl stop scan
[root@rhel1 bin]# ./srvctl stop nodeapps -n rhel1
PRCR-1065 : Failed to stop resource ora.rhel1.vip
CRS-2529: Unable to act on 'ora.rhel1.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
PRCR-1014 : Failed to stop resource ora.net1.network
PRCR-1065 : Failed to stop resource ora.net1.network
CRS-2529: Unable to act on 'ora.net1.network' because that would require stopping or relocating 'ora.rhel1.vip', but the force option was not specified
[root@rhel1 bin]# ./srvctl stop nodeapps -n rhel2
PRCR-1065 : Failed to stop resource ora.rhel2.vip
CRS-2529: Unable to act on 'ora.rhel2.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
PRCR-1014 : Failed to stop resource ora.net1.network
PRCR-1065 : Failed to stop resource ora.net1.network
CRS-2529: Unable to act on 'ora.net1.network' because that would require stopping or relocating 'ora.cvu', but the force option was not specified
[root@rhel1 bin]# ./srvctl stop listener -n rhel1
[root@rhel1 bin]# ./srvctl stop listener -n rhel2
[root@rhel1 bin]# ./srvctl stop vip -n rhel1
[root@rhel1 bin]# ./srvctl stop vip -n rhel2
[root@rhel1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DBFILE1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.FRA1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER.lsnr
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.LISTENER2.lsnr
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.OCR.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.asm
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.gsd
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.net1.network
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.net2.network
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.ons
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.registry.acfs
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN2.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN3.lsnr
1 OFFLINE OFFLINE
ora.cvu
1 ONLINE ONLINE rhel2
ora.oc4j
1 ONLINE ONLINE rhel2
ora.ractest.db
1 ONLINE ONLINE rhel1 Open
2 ONLINE ONLINE rhel2 Open
ora.ractest.rtser1.svc
1 OFFLINE OFFLINE
ora.rhel1.vip
1 OFFLINE OFFLINE
ora.rhel2.vip
1 OFFLINE OFFLINE
ora.rhelpub21-vip.vip
1 OFFLINE OFFLINE
ora.rhelpub22-vip.vip
1 OFFLINE OFFLINE
ora.scan1.vip
1 OFFLINE OFFLINE
ora.scan2.vip
1 OFFLINE OFFLINE
ora.scan3.vip
1 OFFLINE OFFLINE
二.調整Clusterware PUBLIC網路。
[root@rhel1 bin]# ./oifcfg getif
eth2 10.168.1.0 global cluster_interconnect
eth1 10.168.1.0 global cluster_interconnect
eth0 192.168.4.0 global public
[root@rhel1 bin]# ./oifcfg
Name:
oifcfg - Oracle Interface Configuration Tool.
Usage: oifcfg iflist [-p [-n]]
oifcfg setif {-node
oifcfg getif [-node
oifcfg delif {{-node
oifcfg [-help]
[root@rhel1 bin]# ./oifcfg setif -global eth0/10.168.4.0:public
[root@rhel1 bin]# ./oifcfg getif
eth2 10.168.1.0 global cluster_interconnect
eth1 10.168.1.0 global cluster_interconnect
eth0 192.168.4.0 global public
eth0 10.168.4.0 global public
[root@rhel1 bin]# ./oifcfg delif -global eth0/192.168.4.0
[root@rhel1 bin]# ./oifcfg getif
eth2 10.168.1.0 global cluster_interconnect
eth1 10.168.1.0 global cluster_interconnect
eth0 10.168.4.0 global public
三.調整兩個伺服器的網路設定,修改兩臺伺服器的公共IP地址,修改兩臺伺服器hosts檔案中的公共網路、VIP網路地址,修改SCAN解析的IP地址。
1).修改hosts檔案:
[root@rhel1 bin]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost localhost.localdomain
# Public Network - (eth0)
10.168.4.199 rhel1 rhel1.localdomain
10.168.4.200 rhel2 rhel2.localdomain
192.168.4.231 rhel3 rhel3.localdomain
192.168.4.233 rhel4 rhel4.localdomain
10.168.6.199 rheldg1 rheldg1.localdomain
# Private Interconnect - (eth1)
10.168.1.134 rhel1-priv
10.168.1.187 rhel2-priv
10.168.4.117 rhel1-vip
10.168.4.114 rhel2-vip
# Private Storage Network for Openfiler - (eth2)
192.168.2.11 openfiler1
192.168.4.2 LIUBINGLIN-PC
172.168.4.2 rhelpub21
172.168.4.4 rhelpub21-vip
172.168.4.3 rhelpub22
172.168.4.5 rhelpub22-vip
2).整個調整過程都不應該影響到私有網路的執行,Linux執行如下的命令重啟單個網路卡:
[root@rhel1 network-scripts]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:36:71:78:38
inet addr:192.168.4.199 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::216:36ff:fe71:7838/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:50 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3274 (3.1 KiB) TX bytes:8519 (8.3 KiB)
[root@rhel1 network-scripts]# ifdown eth0
[root@rhel1 network-scripts]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:36:71:78:38
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:54 errors:0 dropped:0 overruns:0 frame:0
TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3442 (3.3 KiB) TX bytes:8589 (8.3 KiB)
[root@rhel1 network-scripts]# ifup eth0
[root@rhel1 network-scripts]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:36:71:78:38
inet addr:10.168.4.199 Bcast:10.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::216:36ff:fe71:7838/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:378 (378.0 b) TX bytes:6869 (6.7 KiB)
四.修改network、nodeapps、scan、scan_listener、例項註冊等資訊,最後啟動Service等服務。
1).用新的IP地址重新登入到伺服器:
[root@rhel1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DBFILE1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.FRA1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER.lsnr
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.LISTENER2.lsnr
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.OCR.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.asm
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.gsd
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.net1.network
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.net2.network
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.ons
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.registry.acfs
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN2.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN3.lsnr
1 OFFLINE OFFLINE
ora.cvu
1 ONLINE OFFLINE
ora.oc4j
1 ONLINE ONLINE rhel2
ora.ractest.db
1 ONLINE ONLINE rhel1 Open
2 ONLINE ONLINE rhel2 Open
ora.ractest.rtser1.svc
1 OFFLINE OFFLINE
ora.rhel1.vip
1 OFFLINE OFFLINE
ora.rhel2.vip
1 OFFLINE OFFLINE
ora.rhelpub21-vip.vip
1 OFFLINE OFFLINE
ora.rhelpub22-vip.vip
1 OFFLINE OFFLINE
ora.scan1.vip
1 OFFLINE OFFLINE
ora.scan2.vip
1 OFFLINE OFFLINE
ora.scan3.vip
1 OFFLINE OFFLINE
2).調整network資源IP網路:
[root@rhel1 bin]# ./srvctl modify network -h
Modifies a network configuration in the Oracle Clusterware.
Usage: srvctl modify network [-k
-k
-S
-w
-h Print usage
-v Verbose output
[root@rhel1 bin]# ./srvctl modify network -k 1 -S 10.168.4.0/255.255.255.0/eth0
3).調整VIP資源IP地址:
[root@rhel1 bin]# ./srvctl modify nodeapps -h
Modifies the configuration for a node application.
Usage: srvctl modify nodeapps {[-n
-A
-S
-u
-e
-l
-r
-t
-h Print usage
-v Verbose output
[root@rhel1 bin]# ./srvctl modify nodeapps -n rhel1 -A rhel1-vip/255.255.255.0/eth0
[root@rhel1 bin]# ./srvctl modify nodeapps -n rhel2 -A rhel2-vip/255.255.255.0/eth0
4).重建SCAN LISTENER和SCAN:
[root@rhel1 bin]# ./srvctl remove scan_listener
Remove scan listener? (y/[n]) y
j[root@rhel1 bin]#
[root@rhel1 bin]#
[root@rhel1 bin]# ./srvctl remove scan
Remove the scan? (y/[n]) y
[root@rhel1 bin]# ./srvctl add scan -h
Adds a SCAN VIP to the Oracle Clusterware.
Usage: srvctl add scan -n
-n
-k
-S
-h Print usage
[root@rhel1 bin]# ./srvctl add scan -n rhel-cluster-scan -k 1
[root@rhel1 bin]# ./srvctl add scan_listener
5).啟動兩臺伺服器Nodeapps資源:
[root@rhel1 bin]# ./srvctl start nodeapps -n rhel1
PRKO-2421 : Network resource is already started on node(s): rhel1
[root@rhel1 bin]# ./srvctl start nodeapps -n rhel2
PRKO-2421 : Network resource is already started on node(s): rhel2
6).啟動SCAN和SCAN_LISTENER資源:
[root@rhel1 bin]# ./srvctl start scan
[root@rhel1 bin]# ./srvctl start scan_listener
7).啟動本地監聽器:
[root@rhel1 bin]# ./srvctl start listener -n rhel1
PRCR-1013 : Failed to start resource ora.LISTENER2.lsnr
PRCR-1064 : Failed to start resource ora.LISTENER2.lsnr on node rhel1
CRS-2674: Start of 'ora.net2.network' on 'rhel1' failed
[root@rhel1 bin]# ./srvctl start listener -n rhel2
PRCR-1013 : Failed to start resource ora.LISTENER2.lsnr
PRCR-1064 : Failed to start resource ora.LISTENER2.lsnr on node rhel2
CRS-2674: Start of 'ora.net2.network' on 'rhel2' failed
8).檢查資源狀態:
[root@rhel1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DBFILE1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.FRA1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER.lsnr
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER2.lsnr
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.OCR.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.asm
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.gsd
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.net1.network
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.net2.network
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.ons
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.registry.acfs
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rhel1
ora.cvu
1 ONLINE OFFLINE
ora.oc4j
1 ONLINE ONLINE rhel2
ora.ractest.db
1 ONLINE ONLINE rhel1 Open
2 ONLINE ONLINE rhel2 Open
ora.ractest.rtser1.svc
1 OFFLINE OFFLINE
ora.rhel1.vip
1 ONLINE ONLINE rhel1
ora.rhel2.vip
1 ONLINE ONLINE rhel2
ora.rhelpub21-vip.vip
1 ONLINE OFFLINE
ora.rhelpub22-vip.vip
1 ONLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE rhel1
所有跟公共網路相關的服務已經啟動正常。
9).修改資料庫註冊資訊:
[root@rhel1 bin]# su - grid
[grid@rhel1 ~]$ lsnrctl stat listener_scan1
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 20-MAR-2014 20:24:07
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 20-MAR-2014 20:22:15
Uptime 0 days 0 hr. 1 min. 52 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/rhel1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.245)(PORT=1521)))
The listener supports no services
The command completed successfully
[grid@rhel1 ~]$ lsnrctl stat listener
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 20-MAR-2014 20:24:11
Copyright (c) 1991, 2010, 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.2.0 - Production
Start Date 20-MAR-2014 20:23:32
Uptime 0 days 0 hr. 0 min. 39 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/rhel1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.199)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.117)(PORT=1521)))
The listener supports no services
The command completed successfully
[grid@rhel1 ~]$ exit
logout
[root@rhel1 bin]# su - oracle
[oracle@rhel1 ~]$ sql
SQL*Plus: Release 11.2.0.2.0 Production on Thu Mar 20 20:24:55 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> show parameter remote_liste
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_listener string rhel-cluster-scan.grid.example
.com.:1521
SQL> alter system set remote_listener='10.168.4.245:1521';
System altered.
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=192.
168.4.117)(PORT=1521))))
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.168.4.117)(PORT=1521))))' sid='ractest1';
System altered.
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.168.4.114)(PORT=1521))))' sid='ractest2';
System altered.
SQL> alter system register;
System altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@rhel1 ~]$ exit
logout
[root@rhel1 bin]# su - grid
[grid@rhel1 ~]$ lsnrctl status listener_scan1
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 20-MAR-2014 20:27:01
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 20-MAR-2014 20:22:15
Uptime 0 days 0 hr. 4 min. 45 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/rhel1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.245)(PORT=1521)))
Services Summary...
Service "ractest" has 2 instance(s).
Instance "ractest1", status READY, has 1 handler(s) for this service...
Instance "ractest2", status READY, has 1 handler(s) for this service...
Service "ractestXDB" has 2 instance(s).
Instance "ractest1", status READY, has 1 handler(s) for this service...
Instance "ractest2", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@rhel1 ~]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 20-MAR-2014 20:27:07
Copyright (c) 1991, 2010, 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.2.0 - Production
Start Date 20-MAR-2014 20:23:32
Uptime 0 days 0 hr. 3 min. 34 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/rhel1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.199)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.117)(PORT=1521)))
Services Summary...
Service "ractest" has 1 instance(s).
Instance "ractest1", status READY, has 1 handler(s) for this service...
Service "ractestXDB" has 1 instance(s).
Instance "ractest1", status READY, has 1 handler(s) for this service...
The command completed successfully
第二個節點本地監聽狀態:
[grid@rhel2 ~]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 20-MAR-2014 20:28:40
Copyright (c) 1991, 2010, 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.2.0 - Production
Start Date 20-MAR-2014 20:23:43
Uptime 0 days 0 hr. 4 min. 57 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/rhel2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.200)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.168.4.114)(PORT=1521)))
Services Summary...
Service "ractest" has 1 instance(s).
Instance "ractest2", status READY, has 1 handler(s) for this service...
Service "ractestXDB" has 1 instance(s).
Instance "ractest2", status READY, has 1 handler(s) for this service...
The command completed successfully
10).啟動Service服務:
[root@rhel1 bin]# ./srvctl start service -d ractest -s rtser1
11).檢查資源狀態:
[root@rhel1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DBFILE1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.FRA1.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER.lsnr
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER2.lsnr
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.OCR.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.asm
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.gsd
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.net1.network
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.net2.network
ONLINE OFFLINE rhel1
ONLINE OFFLINE rhel2
ora.ons
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.registry.acfs
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rhel1
ora.cvu
1 ONLINE OFFLINE
ora.oc4j
1 ONLINE ONLINE rhel2
ora.ractest.db
1 ONLINE ONLINE rhel1 Open
2 ONLINE ONLINE rhel2 Open
ora.ractest.rtser1.svc
1 ONLINE ONLINE rhel1
ora.rhel1.vip
1 ONLINE ONLINE rhel1
ora.rhel2.vip
1 ONLINE ONLINE rhel2
ora.rhelpub21-vip.vip
1 ONLINE OFFLINE
ora.rhelpub22-vip.vip
1 ONLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE rhel1
--end--
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-1126297/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 例項和RAC叢集下資料庫日誌目錄合集Oracle資料庫
- 3.1.5.3 在不掛載資料庫的情況下啟動例項資料庫
- kafka不停止服務的情況下修改日誌保留時間Kafka
- RAC修改叢集兩個節點public ip地址
- 4 管理資料庫例項和叢集資料庫資料庫
- 資料庫代理服務和叢集管理資料庫
- catalog損壞情況下的資料庫恢復例項資料庫
- 用srvctl 命令停止RAC 資料庫某個例項資料庫
- 【RAC】刪除RAC資料庫節點(六)——刪除Oracle叢集服務資料庫Oracle
- 新增叢集資料庫服務service資料庫
- RAC修改IP地址
- Oracle RAC修改IP和VIP地址Oracle
- RAC叢集資料庫搭建資料庫
- 更改rac的vip地址和叢集互聯地址
- 如何在零停機的情況下遷移 Kubernetes 叢集
- Oracle RAC 修改 IP 地址Oracle
- RAC叢集中IP地址的更改
- 在Windows平臺下修改Oracle例項不隨服務啟動WindowsOracle
- 【RAC】將單例項備份集恢復為rac資料庫單例資料庫
- 【RAC】將RAC備份集恢復為單例項資料庫單例資料庫
- Solaris下修改RAC環境節點IP地址
- 修改叢集資料庫的歸檔模式資料庫模式
- 查詢RAC環境中例項間資源分配情況
- GBase 8a 叢集修改 IP 地址操作步驟
- 修改RAC叢集私網地址和子網掩碼的實施步驟
- RAC常用管理命令--叢集、例項、資源管理-更新中
- rac下修改ip
- 達夢資料庫單例項轉實時同步叢集資料庫單例
- 將RAC備份集恢復為單例項資料庫單例資料庫
- 如何在不開啟txt檔案的情況下,修改utf-8為ansi格式
- 如何修改資料庫例項及資料庫名資料庫
- RAC資料庫恢復到單例項資料庫資料庫單例
- 資料庫和例項資料庫
- 單例項資料庫expdp遷移到RAC庫單例資料庫
- 【RAC】刪除RAC資料庫節點(一)——刪除資料庫例項資料庫
- windows下注冊表中控制例項隨著服務啟動和停止的選項Windows
- oracle 11g 修改資料庫名字和例項名字Oracle資料庫
- 從單例項資料庫轉換到RAC環境——RAC的建立和配置單例資料庫