非歸檔模式下資料檔案被誤刪的解決方法

shiyihai發表於2007-06-20

昨天停電一天,今早啟動一資料庫時拋“ORA-01251: Unknown File Header Version read for file number 42”,經諮詢原來該檔案被誤刪後將備份的檔案copy回後結果導致檔案頭部資訊不一致資料庫無法open起來。現在急需解決的是要儘快啟動資料庫。

[@more@]

[bocbi@portal3115 bdump]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 20 09:18:27 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> startup force mount;
ORACLE instance started.

Total System Global Area 1157627904 bytes
Fixed Size 1219016 bytes
Variable Size 251659832 bytes
Database Buffers 889192448 bytes
Redo Buffers 15556608 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 42 failed verification check
ORA-01110: data file 42: '/opt/ora_data/unm/unmeaf.dbf'
ORA-01251: Unknown File Header Version read for file number 42


SQL> alter database datafile 42 offline;
alter database datafile 42 offline
*
ERROR at line 1:
ORA-01145: offline immediate disallowed unless media recovery enabled


SQL> alter database datafile 42 offline drop;

Database altered.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 60 - see DBWR trace file
ORA-01110: data file 60: '/opt/ora_data/unm/idx_unmeaf.dbf'


SQL> alter database datafile 60 offline drop;

Database altered.

SQL> alter database open;

Database altered.

SQL> select tablespace_name from dba_data_files where file_id in (42,60);

TABLESPACE_NAME
------------------------------
UNMEAF
IDX_UNMEAF

SQL> drop tablespace unmeaf including contents and datafiles;

Tablespace dropped.

SQL> drop tablespace idx_unmeaf including contents and datafiles;

Tablespace dropped.

SQL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-919541/,如需轉載,請註明出處,否則將追究法律責任。

相關文章