没有备份的current状态的redo日志损坏


SQL> select* from v$log;

 

   GROUP#    THREAD#  SEQUENCE#     BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM

---------- ---------- ---------- -------------------- --- ---------------- ------------- ---------

        1          1         2   52428800          1 YES ACTIVE                  464602 07-SEP-12

        2          1          3  52428800          1 NO  CURRENT                 464604 07-SEP-12

        3          1          1  52428800          1 YES ACTIVE                  464091 07-SEP-12

 

SQL> select * from v$logfile;

 

   GROUP# STATUS  TYPE    MEMBER                                   IS_

---------- ------- ----------------------------------------------- ---

        3         ONLINE  /u01/tiger/oradata/orcl/redo03.log       NO

        2         ONLINE  /u01/tiger/oradata/orcl/redo02.log       NO

        1         ONLINE  /u01/tiger/oradata/orcl/redo01.log       NO

 

SQL> !cp /etc/passwd/u01/tiger/oradata/orcl/redo02.log

 

SQL> alter system switch logfile;

alter system switch logfile

*

ERROR at line 1:

ORA-03113: end-of-file on communicationchannel

 

 

SQL> conn /as sysdba

Connected to an idle instance.

SQL> startup

Oracle instance started.

 

Total System Global Area  314572800 bytes

Fixed Size                  1219136 bytes

Variable Size             117441984 bytes

Database Buffers          188743680 bytes

Redo Buffers                7168000 bytes

Database mounted.

ORA-00316:log 2 of thread 1, type 14900 in header is not log file

ORA-00312: online log 2 thread 1:'/u01/tiger/oradata/orcl/redo02.log'

 

 

SQL> recover database;

ORA-00283: recovery session canceled due toerrors

ORA-00316: log 2 of thread 1, type 14900 inheader is not log file

ORA-00312: online log 2 thread 1:'/u01/tiger/oradata/orcl/redo02.log'

 

 

SQL> recover database until cancel;

ORA-00279: change 464604 generated at09/07/2012 15:26:50 needed for thread 1

ORA-00289: suggestion :/u01/tiger/flash_recovery_area/ORCL/archivelog/2012_09_07/o1_mf_1_3_%u_.arc

ORA-00280: change 464604 for thread 1 is insequence #3

 

 

Specify log: {<RET>=suggested |filename | AUTO | CANCEL}

cancel

ORA-01547:warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194:file 1 needs more recovery to be consistent

ORA-01110: data file 1:'/u01/tiger/oradata/orcl/system01.dbf'

 

 

ORA-01112: media recovery not started

 

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01589: must use RESETLOGS orNORESETLOGS option for database open

 

 

SQL> alter database open resetlogs;

 

Database altered.

 

无备份的使用隐含参数恢复

如果出现如下情况

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01194: file 1 needs more recovery to beconsistent

ORA-01110: data file 1:'/u01/oracle/oradata/ora10g/system01.dbf'

我们只能放弃不完全恢复使用隐含参数恢复

altersystem set "_allow_resetlogs_corruption"=true scope=spfile;

相关内容