RAC資料庫啟用、禁用一個例項
---禁用節點
srvctl disable instance -d mbs -i mbs2
SQL> alter database disable thread 2;
--啟用節點
SQL> alter database enable thread 2;
srvctl enable instance -d mbs -i mbs2
------下面進行測試:
1. 禁用節點2的例項mbs2
[oracle@rac01 ~]$ srvctl disable instance -d mbs -i mbs2
[oracle@rac01 ~]$ srvctl stop instance -i mbs2 -d mbs
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac01
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 465 52428800 1 NO CURRENT 15045204 26-APR-14
2 1 463 52428800 1 YES INACTIVE 15024844 26-APR-14
3 2 344 52428800 1 YES INACTIVE 15024846 26-APR-14
4 2 345 52428800 1 YES INACTIVE 15024848 26-APR-14
5 1 464 52428800 1 YES INACTIVE 15024987 26-APR-14
6 2 346 52428800 1 NO CURRENT 15046541 27-APR-14
6 rows selected.
SQL> alter database disable thread 2;
Database altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 465 52428800 1 NO CURRENT 15045204 26-APR-14
2 1 463 52428800 1 YES INACTIVE 15024844 26-APR-14
3 2 344 52428800 1 YES INACTIVE 15024846 26-APR-14
4 2 345 52428800 1 YES INACTIVE 15024848 26-APR-14
5 1 464 52428800 1 YES INACTIVE 15024987 26-APR-14
6 2 346 52428800 1 YES INACTIVE 15046541 27-APR-14
6 rows selected.
--禁用例項後,使用srvctl啟動和關閉資料庫只針對一個例項操作
[oracle@rac01 ~]$ srvctl stop database -d mbs
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application OFFLINE OFFLINE
ora....s1.inst application OFFLINE OFFLINE
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
[oracle@rac01 ~]$ srvctl start database -d mbs
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac02
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
----------啟用節點
SQL> alter database enable thread 2;
Database altered.
SQL> set lines 132 pages 100
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 465 52428800 1 NO CURRENT 15045204 26-APR-14
2 1 463 52428800 1 YES INACTIVE 15024844 26-APR-14
3 2 347 52428800 1 NO CURRENT 15050115 27-APR-14
4 2 345 52428800 1 YES INACTIVE 15024848 26-APR-14
5 1 464 52428800 1 YES INACTIVE 15024987 26-APR-14
6 2 346 52428800 1 YES INACTIVE 15046541 27-APR-14
6 rows selected.
[oracle@rac01 ~]$ srvctl enable instance -d mbs -i mbs2
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac02
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
[oracle@rac01 ~]$ srvctl start instance -d mbs -i mbs2
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac02
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application ONLINE ONLINE rac02
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
srvctl disable instance -d mbs -i mbs2
SQL> alter database disable thread 2;
--啟用節點
SQL> alter database enable thread 2;
srvctl enable instance -d mbs -i mbs2
------下面進行測試:
1. 禁用節點2的例項mbs2
[oracle@rac01 ~]$ srvctl disable instance -d mbs -i mbs2
[oracle@rac01 ~]$ srvctl stop instance -i mbs2 -d mbs
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac01
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 465 52428800 1 NO CURRENT 15045204 26-APR-14
2 1 463 52428800 1 YES INACTIVE 15024844 26-APR-14
3 2 344 52428800 1 YES INACTIVE 15024846 26-APR-14
4 2 345 52428800 1 YES INACTIVE 15024848 26-APR-14
5 1 464 52428800 1 YES INACTIVE 15024987 26-APR-14
6 2 346 52428800 1 NO CURRENT 15046541 27-APR-14
6 rows selected.
SQL> alter database disable thread 2;
Database altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 465 52428800 1 NO CURRENT 15045204 26-APR-14
2 1 463 52428800 1 YES INACTIVE 15024844 26-APR-14
3 2 344 52428800 1 YES INACTIVE 15024846 26-APR-14
4 2 345 52428800 1 YES INACTIVE 15024848 26-APR-14
5 1 464 52428800 1 YES INACTIVE 15024987 26-APR-14
6 2 346 52428800 1 YES INACTIVE 15046541 27-APR-14
6 rows selected.
--禁用例項後,使用srvctl啟動和關閉資料庫只針對一個例項操作
[oracle@rac01 ~]$ srvctl stop database -d mbs
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application OFFLINE OFFLINE
ora....s1.inst application OFFLINE OFFLINE
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
[oracle@rac01 ~]$ srvctl start database -d mbs
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac02
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
----------啟用節點
SQL> alter database enable thread 2;
Database altered.
SQL> set lines 132 pages 100
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 465 52428800 1 NO CURRENT 15045204 26-APR-14
2 1 463 52428800 1 YES INACTIVE 15024844 26-APR-14
3 2 347 52428800 1 NO CURRENT 15050115 27-APR-14
4 2 345 52428800 1 YES INACTIVE 15024848 26-APR-14
5 1 464 52428800 1 YES INACTIVE 15024987 26-APR-14
6 2 346 52428800 1 YES INACTIVE 15046541 27-APR-14
6 rows selected.
[oracle@rac01 ~]$ srvctl enable instance -d mbs -i mbs2
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac02
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
[oracle@rac01 ~]$ srvctl start instance -d mbs -i mbs2
[oracle@rac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.mbs.db application ONLINE ONLINE rac02
ora....s1.inst application ONLINE ONLINE rac01
ora....s2.inst application ONLINE ONLINE rac02
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10972173/viewspace-1155819/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 用srvctl 命令停止RAC 資料庫某個例項資料庫
- 連線RAC資料庫中單個例項(一)資料庫
- 【RAC】刪除RAC資料庫節點(一)——刪除資料庫例項資料庫
- 一臺MySQL資料庫啟動多個例項MySql資料庫
- RAC環境只啟動單例項資料庫單例資料庫
- 連線RAC資料庫中單個例項(二)資料庫
- 單例項恢復RAC資料庫步驟(一)單例資料庫
- RAC資料庫恢復到單例項資料庫資料庫單例
- 多個資料庫是否可以共有一個Oracle 11g RAC例項KG資料庫Oracle
- 單例項資料庫expdp遷移到RAC庫單例資料庫
- Oracle Restart啟動資料庫例項故障一例OracleREST資料庫
- 使用任意例項名來開啟資料庫測試--男人(例項)理論上能OPEN任意一個女人(資料庫)資料庫
- duplicate複製資料庫(rac-單例項)資料庫單例
- 恢復RAC資料庫到單例項(ASM)資料庫單例ASM
- srvctl 是否能夠將RAC資料庫像單例項資料庫的方式一步一步啟動資料庫單例
- 單例項環境利用備份恢復RAC資料庫(一)單例資料庫
- 為同一個資料庫建立新的例項資料庫
- 單例項恢復RAC資料庫步驟(三)單例資料庫
- 單例項恢復RAC資料庫步驟(二)單例資料庫
- 【RAC】將單例項備份集恢復為rac資料庫單例資料庫
- 【RAC】將RAC備份集恢復為單例項資料庫單例資料庫
- 3.1.5.4 啟動例項並mount 資料庫資料庫
- 3.1.5.1 關於啟動資料庫例項資料庫
- 多例項資料庫一個用PSU資料庫
- RAC資料庫只能啟動一個節點的故障資料庫
- RAC環境單例項啟動資料庫收到ORA-29702報錯單例資料庫
- RAC環境下單例項啟動Oracle資料庫重建控制檔案案例單例Oracle資料庫
- 利用STANDBY將單例項資料庫升級為RAC環境(一)單例資料庫
- 【轉】新建例項開啟已有的資料庫 — 資料庫與例項的區分測試資料庫
- Oracle資料庫例項啟動步驟分析Oracle資料庫
- 一個資料庫最多可有多少個例項,多少個日誌組資料庫
- oracle 資料庫例項Oracle資料庫
- 資料庫和例項資料庫
- 將RAC備份集恢復為單例項資料庫單例資料庫
- JDBC連線自定義sqlserver資料庫例項名(多個例項)JDBCSQLServer資料庫
- Oracle 資料庫例項啟動關閉過程Oracle資料庫
- 例項管理及資料庫的啟動關閉資料庫
- 多例項資料庫一個用PSU(轉載)資料庫