Oracle RAC 11.2(12C)正確關閉順序

來源:互聯網
上載者:User

在11.2後的版本中crs被稱為gi,通過crsctl stop cluster來關閉整個執行個體的資源非常方便,但是對於資料庫執行個體需要單獨關閉,stop cluster對於執行個體直接以非正常的方式結束,環境是基於12C的。

正確的順序:

先關閉資料庫

[Oracle@rac1 ~]$ srvctl stop database -db tt

alert.log顯示是通過immediate方式關閉.

Sat Apr 19 05:12:19 2014
 Shutting down instance (immediate)
 Stopping background process SMCO
 Shutting down instance: further logons disabled
 Stopping background process CJQ0
 Sat Apr 19 05:12:28 2014
 Killed process oracle@rac1 (QM05) with pid is 58, OS pid 26310
 Stopping background process MMNL
 Stopping background process MMON
 License high water mark = 8
 All dispatchers and shared servers shutdown
 ALTER DATABASE CLOSE NORMAL /* db agent *//* {1:28512:1593} */
 Sat Apr 19 05:12:33 2014
 SMON: disabling tx recovery
 Sat Apr 19 05:12:33 2014


確認一下配置oracle執行個體是不是immediate方式來關閉的。

[oracle@rac1 ~]$ srvctl config database -db tt
 Database unique name: tt
 Database name: tt
 Oracle home: /u01/app/oracle/product/12.1.0.0/db_1
 Oracle user: oracle
 Spfile: +DATA/tt/spfilett.ora
 Password file: +DATA/tt/orapwtt
 Domain:
Start options: open
 Stop options: immediate
 Database role: PRIMARY
 Management policy: AUTOMATIC
 Server pools: tt
 Database instances: tt1,tt2
 Disk Groups: DATA
 Mount point paths:
Services:
Type: RAC
 Start concurrency:
Stop concurrency:
Database is administrator managed
 [oracle@rac1 ~]$

錯誤的方法:

為圖省事,直接關閉整個cluster

[root@rac1 ~]# crsctl stop cluster -all

CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
 CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
 CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
 CRS-2673: Attempting to stop 'ora.OCR1.dg' on 'rac1'
 CRS-2673: Attempting to stop 'ora.tt.db' on 'rac1'
 CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
 CRS-2673: Attempting to stop 'ora.cvu' on 'rac1'
 CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac1' succeeded
 CRS-2673: Attempting to stop 'ora.rac1.vip' on 'rac1'
 CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
 CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac1'
 CRS-2677: Stop of 'ora.cvu' on 'rac1' succeeded
 CRS-2677: Stop of 'ora.tt.db' on 'rac1' succeeded
 CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac1'
 CRS-2677: Stop of 'ora.rac1.vip' on 'rac1' succeeded
 CRS-2677: Stop of 'ora.scan1.vip' on 'rac1' succeeded
 CRS-2673: Attempting to stop 'ora.crsd' on 'rac2'
 CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac2'
 CRS-2673: Attempting to stop 'ora.tt.db' on 'rac2'
 CRS-2673: Attempting to stop 'ora.OCR1.dg' on 'rac2'
 CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac2'
 CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac2' succeeded
 CRS-2673: Attempting to stop 'ora.rac2.vip' on 'rac2'
 CRS-2677: Stop of 'ora.rac2.vip' on 'rac2' succeeded
 CRS-2677: Stop of 'ora.DATA.dg' on 'rac1' succeeded
 CRS-2677: Stop of 'ora.tt.db' on 'rac2' succeeded
 CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac2'
 CRS-2677: Stop of 'ora.DATA.dg' on 'rac2' succeeded

..............................

alert.log顯示執行個體是非常結束

License high water mark = 6
 Sat Apr 19 05:15:14 2014
 USER (ospid: 5792): terminating the instance
 Sat Apr 19 05:15:14 2014
 opiodr aborting process unknown ospid (3667) as a result of ORA-1092
 Sat Apr 19 05:15:15 2014
 Instance terminated by USER, pid = 5792

由此可以看出通過stop cluster來關閉執行個體會非常危險,直接是以非正常的方式來關閉執行個體的.
 

重啟執行個體可以看到恢複操作
 
Sat Apr 19 05:31:20 2014
 Beginning crash recovery of 1 threads
  parallel recovery started with 2 processes
 Sat Apr 19 05:31:21 2014
 Started redo scan
 Sat Apr 19 05:31:21 2014
 Completed redo scan
  read 255 KB redo, 69 data blocks need recovery
 Sat Apr 19 05:31:21 2014
 Started redo application at
  Thread 2: logseq 2, block 3004
 Sat Apr 19 05:31:22 2014
 Recovery of Online Redo Log: Thread 2 Group 4 Seq 2 Reading mem 0
  Mem# 0: +DATA/tt/redo04.log
 Sat Apr 19 05:31:22 2014
 Completed redo application of 0.14MB
 Sat Apr 19 05:31:22 2014
 Completed crash recovery at
  Thread 2: logseq 2, block 3514, scn 1969283
  69 data blocks read, 69 data blocks written, 255 redo k-bytes read

推薦閱讀:

CentOS 6.3(x32)下安裝Oracle 10g R2

Linux-6-64下安裝Oracle 12C筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.