ORA-01089 資料庫無法正常關閉

來源:互聯網
上載者:User

標籤:bug   system   upd   stop   網站   style   bytes   方法   原因   

今天在做SOA幾個資料庫的重啟操作,其中一個資料庫在關閉過程中一直處於HANG住狀態,十幾分鐘沒有任何進展,具體操作過程如下:

一:當時的情景

SQL> shutdown immediate

     --無任何返回結果

二:問題定位過程

1.查詢相關進程只有ORACLE的關鍵進程存在

   ps -ef |grep ora_

   soadb  4487     1  0 22:57:05 ?         0:00 ora_reco_soadbprd
   soadb  4485     1  5 22:57:05 ?         0:00 ora_smon_soadbprd
   soadb  4526     1  0 22:57:15 ?         0:00 ora_arc0_soadbprd
   soadb  4479     1  0 22:57:04 ?         0:00 ora_dbw1_soadbprd
   soadb  4483     1  0 22:57:04 ?         0:01 ora_ckpt_soadbprd
   soadb  4468     1  0 22:57:02 ?         0:02 ora_pmon_soadbprd
 

2.查看alter日誌,顯示如下:

    Shutting down instance: further logons disabled
    Thu Nov 14 22:04:24 2013
    Stopping background process CJQ0
    Thu Nov 14 22:04:24 2013
    Stopping background process QMNC
    Thu Nov 14 22:04:26 2013
    Stopping background process MMNL
    Thu Nov 14 22:04:27 2013
    Stopping background process MMON
    Thu Nov 14 22:04:27 2013
    Shutting down instance (immediate)
    License high water mark = 152
    Thu Nov 14 22:04:27 2013
    Stopping Job queue slave processes, flags = 7
    Thu Nov 14 22:04:27 2013
    Job queue slave processes stopped
    Waiting for dispatcher ‘D000‘ to shutdown
    All dispatchers and shared servers shutdown
    Thu Nov 14 22:04:30 2013
    ALTER DATABASE CLOSE NORMAL
    Thu Nov 14 22:09:34 2013
    Waiting for smon to disable tx recovery.
    Thu Nov 14 22:23:46 2013
    MMNL absent for 1201 secs; Foregrounds taking over

3.針對紅色字型的提示,查詢官方網站,ID 1076161.6

    官方描述如下:   

    During shutdown the SMON process is cleaning up extents and updating the data
dictionary tables with the marked free extents. As the extents are marked as
freed, they are removed from the table for used extents, UET$ and placed on the
table for free extents, FET$.

    官方描述的原因是因為smon進程在清時暫存資料表空間資料塊和更新資料字典時造成的資料庫HANG住,原理講的很清楚,裡面還有一個連結,一個是講述這種情況可能是一個BUG,另一個連結教我們診斷資料庫HANG住的具體原因。但現在的問題是,如果一直等下去,可能需要幾個小時,此次變更資料庫重啟只有半小時時間,不可能待下去,怎麼辦?

4.嘗試取消shutdown immediate命令

   CTRAL + C沒有任何作用,建立一個連結執行查詢或其它操作,會報一個錯,具體資訊如下:

   ORA-01089: immediate shutdown in progress - no operations are permitted

   可以看到,此時什麼都不允許操作,這時想找從作業系統上找到shutdown immediate進程KILL掉,後來仔細一想,這個操作可能比shutdown abort更危險,很可能造成資料庫無法啟動,在網上找到了相關資源,也沒找到辦法,此時突然想到剛學ORACLE資料庫啟動和停止時有一條命令是

   startup force:中止當前資料庫的運行,並開始重新正常的啟動資料庫  

   startup force = shutdown abort +startup 此時也只能用它了

5.強制停止shutdown immediate

  新開啟一個sqlplus / as sysdba

  SQL> startup force
       ORACLE instance started.

       Total System Global Area 3206836224 bytes
       Fixed Size                  2180024 bytes
       Variable Size            1778388040 bytes
       Database Buffers         1409286144 bytes
       Redo Buffers               16982016 bytes
       Database mounted.
       Database opened.

    此時shutdown immediate視窗停止了,資料庫恢複到可操作狀態,此時我再次用shutdown immediate命令再次正常停止資料庫,依然無法停止,沒辦法,再次執行startup force擷取資料庫控制權,選擇shutdown abort方法停止資料庫。重新啟動,很幸運,啟動成功了!(注意此操作有一定的風險,小心操作)

轉:http://blog.sina.com.cn/s/blog_61cd89f60102eeg1.html

ORA-01089 資料庫無法正常關閉

聯繫我們

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