RAC轉換至RAC One Node
1、刪除RAC中其他例項,保證RAC中只有一個例項
$ su - oracle
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances: jzh_1,jzh_2
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RAC
Database is administrator managed
$ srvctl stop instance -d jzh -i jzh_2
$ srvctl remove instance -d jzh -i jzh_2
Remove instance from the database jzh? (y/[n]) y
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances: jzh_1
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RAC
Database is administrator managed
2、RAC轉換至RAC One Node
$ srvctl convert database -d jzh -c RACONENODE -w 30 -i jzh1
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances:
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: jzh1
Candidate servers: jzh1
Database is administrator managed
3、重新配置服務
$ srvctl remove service -d jzh -s jzhdb
$ srvctl add service -d jzh -s jzhdb -P BASIC
$ srvctl start service -d jzh -s jzhdb
$ srvctl config service -d jzh -s jzhdb
Service name: jzhdb
Service is enabled
Server pool: jzh
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition:
Preferred instances: jzh1_1
Available instances:
4、RAC One Node failover測試
檢查狀態
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ora.DATA.dg
ONLINE ONLINE jzh1
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ora.VOTE.dg
ONLINE ONLINE jzh1
ora.asm
ONLINE ONLINE jzh1 Started
ora.gsd
OFFLINE OFFLINE jzh1
ora.net1.network
ONLINE ONLINE jzh1
ora.ons
ONLINE ONLINE jzh1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh1
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE ONLINE jzh1 Open ====================》已經切換至節點jzh1上了。
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh1
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE INTERMEDIATE jzh1 FAILED OVER
ora.oc4j
1 ONLINE ONLINE jzh1
ora.scan1.vip
1 ONLINE ONLINE jzh1
至此,RAC轉換至RAC One Node完成!
$ su - oracle
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances: jzh_1,jzh_2
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RAC
Database is administrator managed
$ srvctl stop instance -d jzh -i jzh_2
$ srvctl remove instance -d jzh -i jzh_2
Remove instance from the database jzh? (y/[n]) y
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances: jzh_1
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RAC
Database is administrator managed
2、RAC轉換至RAC One Node
$ srvctl convert database -d jzh -c RACONENODE -w 30 -i jzh1
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances:
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RACOneNode
Online relocation timeout: 30
Instance name prefix: jzh1
Candidate servers: jzh1
Database is administrator managed
3、重新配置服務
$ srvctl remove service -d jzh -s jzhdb
$ srvctl add service -d jzh -s jzhdb -P BASIC
$ srvctl start service -d jzh -s jzhdb
$ srvctl config service -d jzh -s jzhdb
Service name: jzhdb
Service is enabled
Server pool: jzh
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition:
Preferred instances: jzh1_1
Available instances:
4、RAC One Node failover測試
檢查狀態
$ olsnodes -n
jzh1 1
jzh2 2
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh1
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE ONLINE jzh2 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh2
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh1
ora.scan1.vip
1 ONLINE ONLINE jzh1
此時,DB與SERVICE執行在jzh2上,也就是第二節點,接下來模擬第二節點private網路中斷,第二節點被驅逐(eviction)
# ifconfig eth1 down
查詢crs狀態
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ora.DATA.dg
ONLINE ONLINE jzh1
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ora.VOTE.dg
ONLINE ONLINE jzh1
ora.asm
ONLINE ONLINE jzh1 Started
ora.gsd
OFFLINE OFFLINE jzh1
ora.net1.network
ONLINE ONLINE jzh1
ora.ons
ONLINE ONLINE jzh1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh1
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE OFFLINE STARTING
ora.jzh.jzhdb.svc
1 ONLINE OFFLINE
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE INTERMEDIATE jzh1 FAILED OVER
ora.oc4j
1 ONLINE ONLINE jzh1
ora.scan1.vip
1 ONLINE ONLINE jzh1
再次查詢jzh1 1
jzh2 2
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh1
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE ONLINE jzh2 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh2
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh1
ora.scan1.vip
1 ONLINE ONLINE jzh1
此時,DB與SERVICE執行在jzh2上,也就是第二節點,接下來模擬第二節點private網路中斷,第二節點被驅逐(eviction)
# ifconfig eth1 down
查詢crs狀態
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ora.DATA.dg
ONLINE ONLINE jzh1
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ora.VOTE.dg
ONLINE ONLINE jzh1
ora.asm
ONLINE ONLINE jzh1 Started
ora.gsd
OFFLINE OFFLINE jzh1
ora.net1.network
ONLINE ONLINE jzh1
ora.ons
ONLINE ONLINE jzh1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh1
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE OFFLINE STARTING
ora.jzh.jzhdb.svc
1 ONLINE OFFLINE
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE INTERMEDIATE jzh1 FAILED OVER
ora.oc4j
1 ONLINE ONLINE jzh1
ora.scan1.vip
1 ONLINE ONLINE jzh1
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ora.DATA.dg
ONLINE ONLINE jzh1
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ora.VOTE.dg
ONLINE ONLINE jzh1
ora.asm
ONLINE ONLINE jzh1 Started
ora.gsd
OFFLINE OFFLINE jzh1
ora.net1.network
ONLINE ONLINE jzh1
ora.ons
ONLINE ONLINE jzh1
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh1
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE ONLINE jzh1 Open ====================》已經切換至節點jzh1上了。
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh1
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE INTERMEDIATE jzh1 FAILED OVER
ora.oc4j
1 ONLINE ONLINE jzh1
ora.scan1.vip
1 ONLINE ONLINE jzh1
至此,RAC轉換至RAC One Node完成!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10271187/viewspace-1464466/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC One Node資料庫的轉換與線上遷移資料庫
- 11.2.0.2管理Oracle RAC One Node DatabaseOracleDatabase
- Oracle 11g RAC One node 安裝與配置Oracle
- 2015.05.15 網路公開課 《Oracle 11G RAC深入探索之RAC和RAC One Node之間的切換》Oracle
- rac one node、Single Instance HA(SIHA)、Oracle Restart的概念OracleREST
- Oracle RAC Cache Fusion 系列十四:Oracle RAC CR Server Part OneOracleServer
- 【RAC】RAC更換心跳地址和RAC更換儲存主要步驟
- Reinstall ASM or DB HOME on One RAC Node From the Install Media_864614.1ASM
- (EXPDP) Fails With Errors ORA-39079 ORA-25306 On One Node In RAC EnvironmentAIError
- 單例項恢復至RAC單例
- Rac One Node在計劃內切換和非計劃內CRASH時例項名的變化區別
- ASM Di Show PROVISIONED On One RAC,UNKNOWN Other Node,Cannot Add To DG_1468642.1ASM
- How to find Master Node in Oracle RAC(zt)ASTOracle
- 從單例項資料庫轉換到RAC環境——RAC的建立和配置單例資料庫
- 【RAC】10條RAC常用優化方向(轉)優化
- DataGuard切換(主庫為Rac+備庫為Rac)
- 9i RAC轉換為SINGLE例項
- Oracle 11g rac add nodeOracle
- 【RAC】RAC中的負載均衡和故障切換--TAF配置負載
- oracle 10g rac 單例項恢復至ORACLE10G RAC RMANOracle 10g單例
- 將RAC軟體轉換為單例項軟體單例
- 【RAC】RAC_for_linux遷移之更換主機裝置Linux
- RAC的VIP切換測試
- Oracle RAC DG手動切換Oracle
- RAC加入新節點 - Add Node to Your Oracle RAC 10g Cluster on LinuxOracleLinux
- [轉] 知識索引--RAC索引
- RAC詳細命令(轉)
- Oracle 11g rac資料庫字符集轉換Oracle資料庫
- ORACLE 10gR2 RAC升級至10.2.0.4Oracle 10g
- 【RMAN】RAC資料恢復至單機環境資料恢復
- Oracle RAC 遷移替換 OCR 盤Oracle
- RAC資料庫心跳更換方案資料庫
- RAC環境STANDBY的SWITCHOVER切換
- Oracle 11G RAC One Node's Instance Arise ORA-01105 ORA-01606Oracle
- oracle單例項轉RACOracle單例
- 轉載:Oracle RAC簡介Oracle
- Oracle RAC之名詞解惑~~(轉)Oracle
- (轉)ORACLE RAC with NFS installOracleNFS