如何進行 Oracle 10g RAC關閉及啟動

來源:互聯網
上載者:User

如何進行 Oracle 10g RAC關閉及啟動

情況1: 保養資料庫及作業系統,伺服器,需要關閉DB(所有執行個體),OS及Server

a. 首先停止Oracle10g 環境
$ lsnrctl stop (每個節點上停止監聽,也可以用srvctl來操作)
$ emctl stop dbconsole (每個節點停止dbconsole)
$ srvctl stop database -d RACDB (停止資料庫所有執行個體)
$ srvctl stop nodeapps -n node1 (停節點1服務)
$ srvctl stop nodeapps -n node2 (停節點2服務)
# /etc/init.d/init.crs stop (root 停cluster 軟體)(兩節點)
或者用 $ crs_stop -all
crsctl stop crs
b. 然後# init 0 關閉伺服器,或者如果重新啟動#init 6
c. 關閉電源 。
d. 開啟Server ,開始開啟Oracle10g資料庫及服務等(如果OS重新啟動,那麼下面的所有服務是自動開啟的【除了dbconsole】,不用手工執行了)。
$ srvctl start nodeapps -n node1 (開啟節點1服務)
$ srvctl start nodeapps -n node2 (開啟節點2服務)
# /etc/init.d/init.crs start (root  開啟cluster 軟體)
或者用 $ crs_start -all
$ srvctl start database -d RACDB (開啟資料庫所有執行個體)
$ lsnrctl start (每個節點上停止監聽,也可以用srvctl來操作)
$ emctl start dbconsole (每個節點開啟dbconsole)

註: srvctl 也可以用來關閉某個執行個體:
srvctl stop instance -d RACDB -i RACDB1

srvctl 開啟關閉監聽器:
srvctl stop listener -n orcl2
srvctl start listener -n orcl2

情況2: 調整資料庫參數的時候,只關閉所有節點執行個體,不重新啟動OS及Server 。

a.首先停止Oracle10g 環境
$ lsnrctl stop (在所有節點上停止監聽,也可以用srvctl)
$ srvctl stop database -d tpc (停止資料庫所有執行個體)
b. 然後開啟所有執行個體及監聽器。
$ srvctl start database -d tpc (開啟資料庫所有執行個體)
$ lsnrctl start (開啟所有節點上監聽,也可以用srvctl 開啟監聽)


情況3: 不關閉作業系統的情況下,由於問題點或調整某些服務而需要關閉然後開啟某些服務程式等
關閉某些服務的時候,由於涉及到RAC運行,所以也需要先關閉資料庫執行個體,類似於第一種情況。

 
 
附Oracle10g RAC檢查命令 :
----------------------------------------------
Oracle10g RAC資料庫的 nodeapps 有 VIP, GSD, Listener, ONS .

$ srvctl status nodeapps –n dbrac1 (檢查VIP, GSD,ONS, Listener 等(所有節點))
VIP is running on node: dbrac1
GSD is not running on node: dbrac1
Listener is not running on node: dbrac1
ONS daemon is not running on node: dbrac1

gnd-rac01$crsctl check crs (檢查Oracle Cluster 狀態: CSS, CRS, EVM .)
CSS appears healthy
CRS appears healthy
EVM appears healthy

gnd-rac01$ crs_stat -t (全面檢查狀態 )

Name Type Target State Host
┅┅┅┅┅┅┅┅┅?br /> ora....01.lsnr application ONLINE ONLINE gnd-rac01
ora....c01.gsd application ONLINE ONLINE gnd-rac01
ora....c01.ons application ONLINE ONLINE gnd-rac01
ora....c01.vip application ONLINE ONLINE gnd-rac01
ora....02.lsnr application OFFLINE OFFLINE
ora....c02.gsd application ONLINE ONLINE gnd-rac02
ora....c02.ons application ONLINE ONLINE gnd-rac02
ora....c02.vip application ONLINE ONLINE gnd-rac02
ora.tpc.db application ONLINE ONLINE gnd-rac01
ora....c1.inst application ONLINE ONLINE gnd-rac01

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.