ora-01189故障解決辦法

ORA-01189: 文件來自於與先前文件不一樣的 RESETLOGS
ORA-01110: 數據文件 4: 'D:\ORCLDATA\XEPACS\USERS01.DBF'
ORA-01189解釋:
Cause: In a CREATE CONTROLFILE command, either this file or all previous files were backups from before the last RESETLOGS. This also may occur if this is a file that is offline and has been offline since before the last RESETLOGS.
Action: If the file was taken offline normally before the last RESETLOGS and is still offline, omit it from the CREATE CONTROLFILE command. Rename and online the file after the database is open. Otherwise, find the version of the mentioned file consistent with the rest of the datafiles and retry the command.
1 跳過有問題的數據文件重建控制文件或只用system01.dbf重建;數據庫

2 resetlogs打開數據庫 ,注意更改undo相關參數爲manual;ide

alter system set "_allow_resetlogs_corruption"=true scope=spfile
    alter system set audit_trail=none scope=spfile;
    alter system set undo_management=MANUAL scope=spfile;

3 啓動後rename 有問題的datafile this

alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DBHOME_1\DATABASE\MISS
ING00004' to 'd:\orcldata\xepacs\users01.dbf';

因爲scn較低,須要從新resetlogs調成一致,或者用bbed調整;
#4 推動scn
ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME ADJUST_SCN LEVEL 1';
LEVEL: Level 1 is usually sufficient - it raises the SCN to 1 billion
5 alter database datafile 4 online;
startup mount;
SQL> recover until cancel;
完成介質恢復。
SQL> alter database datafile 4 online;
數據庫已更改。rest

6 SQL> alter database open resetlogs;
此場景適用於offline了好久的數據文件,再online,丟失歸檔,或者數據庫意外宕機code

相關文章
相關標籤/搜索