Oracle RAC啟動及關閉步驟
Oracle RAC的關閉及啟動,需要嚴格按照步驟來執行,以下就以一套實際的系統為例,來介紹RAC的關閉及啟動過程:
環境說明
主機名 | 例項名 | 監聽埠 | 字符集 |
db-node1 | orcl1 | 1521 | ZHS16GBK |
db-node2 | orcl2 | 1521 | ZHS16GBK |
關閉
順序:關閉資料庫(例項)-> 關閉ASM例項 -> 關閉節點服務
檢視狀態: $ srvctl status database -d orcl
Instance orcl1 is running on node db-node1 Instance orcl2 is running on node db-node2
$crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM.lsnr ora....er.type ONLINE ONLINE db-node1 ora.CRS.dg ora....up.type ONLINE ONLINE db-node1 ora.DATA.dg ora....up.type ONLINE ONLINE db-node1 ora....ER.lsnr ora....er.type ONLINE ONLINE db-node1 ora....AF.lsnr ora....er.type ONLINE ONLINE db-node1 ora....N1.lsnr ora....er.type ONLINE ONLINE db-node2 ora.MGMTLSNR ora....nr.type ONLINE ONLINE db-node2 ora.asm ora.asm.type ONLINE ONLINE db-node1 ora.chad ora.chad.type ONLINE ONLINE db-node1 ora.cvu ora.cvu.type ONLINE ONLINE db-node2 ora....E1.lsnr application ONLINE ONLINE db-node1 ora....de1.ons application ONLINE ONLINE db-node1 ora....de1.vip ora....t1.type ONLINE ONLINE db-node1 ora....E2.lsnr application ONLINE ONLINE db-node2 ora....de2.ons application ONLINE ONLINE db-node2 ora....de2.vip ora....t1.type ONLINE ONLINE db-node2 ora.mgmtdb ora....db.type ONLINE ONLINE db-node2 ora....network ora....rk.type ONLINE ONLINE db-node1 ora.ons ora.ons.type ONLINE ONLINE db-node1 ora.orcl.db ora....se.type ONLINE ONLINE db-node1 ora.qosmserver ora....er.type ONLINE ONLINE db-node2 ora.scan1.vip ora....ip.type ONLINE ONLINE db-node2
關閉資料庫:$ srvctl stop database -d orcl
關閉ASM: $ srvctl stop asm -n db-node1
$ srvctl stop asm -n db-node2
關閉各節點服務(listener,gsd,ons,vip)
$ srvctl stop nodeapps -n db-node1
$ srvctl stop nodeapps -n db-node2
啟動
啟動節點服務 -> 啟動ASM例項 -> 啟動資料庫例項
啟動各節點服務
$ srvctl start nodeapps -n db-node1
$ srvctl start nodeapps -n db-node2
啟動AMS例項:
$ srvctl start asm -n db-node1
$ srvctl start asm -n db-node2
$ srvctl status asm -n db-node1
$ srvctl status asm -n db-node2
Oracle RAC的關閉及啟動,需要嚴格按照步驟來執行,以下就以一套實際的系統為例,來介紹RAC的關閉及啟動過程:
環境說明
主機名 | 例項名 | 監聽埠 | 字符集 |
db-node1 | orcl1 | 1521 | ZHS16GBK |
db-node2 | orcl2 | 1521 | ZHS16GBK |
關閉
順序:關閉資料庫(例項)-> 關閉ASM例項 -> 關閉節點服務
檢視狀態: $ srvctl status database -d orcl
Instance orcl1 is running on node db-node1 Instance orcl2 is running on node db-node2
$crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM.lsnr ora....er.type ONLINE ONLINE db-node1 ora.CRS.dg ora....up.type ONLINE ONLINE db-node1 ora.DATA.dg ora....up.type ONLINE ONLINE db-node1 ora....ER.lsnr ora....er.type ONLINE ONLINE db-node1 ora....AF.lsnr ora....er.type ONLINE ONLINE db-node1 ora....N1.lsnr ora....er.type ONLINE ONLINE db-node2 ora.MGMTLSNR ora....nr.type ONLINE ONLINE db-node2 ora.asm ora.asm.type ONLINE ONLINE db-node1 ora.chad ora.chad.type ONLINE ONLINE db-node1 ora.cvu ora.cvu.type ONLINE ONLINE db-node2 ora....E1.lsnr application ONLINE ONLINE db-node1 ora....de1.ons application ONLINE ONLINE db-node1 ora....de1.vip ora....t1.type ONLINE ONLINE db-node1 ora....E2.lsnr application ONLINE ONLINE db-node2 ora....de2.ons application ONLINE ONLINE db-node2 ora....de2.vip ora....t1.type ONLINE ONLINE db-node2 ora.mgmtdb ora....db.type ONLINE ONLINE db-node2 ora....network ora....rk.type ONLINE ONLINE db-node1 ora.ons ora.ons.type ONLINE ONLINE db-node1 ora.orcl.db ora....se.type ONLINE ONLINE db-node1 ora.qosmserver ora....er.type ONLINE ONLINE db-node2 ora.scan1.vip ora....ip.type ONLINE ONLINE db-node2
關閉資料庫:$ srvctl stop database -d orcl
關閉ASM: $ srvctl stop asm -n db-node1
$ srvctl stop asm -n db-node2
關閉各節點服務(listener,gsd,ons,vip)
$ srvctl stop nodeapps -n db-node1
$ srvctl stop nodeapps -n db-node2
啟動
啟動節點服務 -> 啟動ASM例項 -> 啟動資料庫例項
啟動各節點服務
$ srvctl start nodeapps -n db-node1
$ srvctl start nodeapps -n db-node2
啟動AMS例項:
$ srvctl start asm -n db-node1
$ srvctl start asm -n db-node2
$ srvctl status asm -n db-node1
$ srvctl status asm -n db-node2