非法刪除資料檔案導致資料庫不能開啟ORA-01122 ORA-01251

來源:互聯網
上載者:User

今天一同事找我,說他本地的資料庫被他誤刪除了檔案,導致不能開啟,然給看看。
SQL> conn jjw/jjw
ERROR:
ORA-01033: Oracle initialization or shutdown in progress

Warning: You are no longer connected to ORACLE.
SQL>
資料庫已經啟動,但串連報錯。如是,我重啟一下,看報什麼錯誤。
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size                  2020384 bytes
Variable Size             218106848 bytes
Database Buffers          989855744 bytes
Redo Buffers               14753792 bytes
Database mounted.
ORA-01122: database file 10 failed verification check
ORA-01110: data file 10: '/oracle/database/tabjj_tab.dbf'
ORA-01251: Unknown File Header Version read for file number 10

SQL>
首先,得從資料庫中刪除這個有問題的檔案。
SQL> startup mount
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size                  2020384 bytes
Variable Size             218106848 bytes
Database Buffers          989855744 bytes
Redo Buffers               14753792 bytes
Database mounted.
SQL> alter database datafile  '/oracle/database/tabjj_tab.dbf' offline drop;
Database altered.
 
SQL> alter database open;
Database altered.
SQL>
資料庫恢複正常。
 
以上只是測試環境下的操作,正式系統上,千萬不能這樣隨意刪除檔案了。

聯繫我們

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