Databases are not archivedActiveStatus log corruption
SQL> select * from v $ Log;
GROUP # THREAD # SEQUENCE # bytes members arc status FIRST_CHANGE # FIRST_TIM
-------------------------------------------------------------------------------------------
1 1 1 2 52428800 1 no active 462055 07-SEP-12
2 1 3 52428800 1 no current 462062 07-SEP-12
3 1 1 52428800 1 no active 461887 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/redo01.log
SQL> shut abort
Oracle instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 1219136 bytes
Variable Size 109053376 bytes
Database Buffers 197132288 bytes
Redo Buffers 7168000 bytes
Database mounted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/tiger/oradata/orcl/redo01.log'
ORA-27046: file size is not a multiple oflogical block size
Additional information: 1
------Log group found at startup1An error occurred.
SQL> select * from v $ log;
GROUP # THREAD # SEQUENCE # bytes members arc status FIRST_CHANGE # FIRST_TIM
-------------------------------------------------------------------------------------------
1 1 1 2 52428800 1 no active 462055 07-SEP-12
3 1 1 52428800 1 no active 461887 07-SEP-12
2 1 3 52428800 1 no current 462062 07-SEP-12
----View the log Group1YesActiveStatus
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Current log sequence 3
------Let's look at the database mode again: Get the non-archive status
SQL> recover database;
ORA-00283: recovery session canceled due toerrors
ORA-00313: open failed for members of loggroup 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/tiger/oradata/orcl/redo01.log'
ORA-27046: file size is not a multiple oflogical block size
Additional information: 1
SQL> recover database until cancel;
ORA-00279: change 462055 generated at09/07/2012 14:03:23 needed for thread 1
ORA-00289: suggestion:/u01/tiger/flash_recovery_area/ORCL/archivelog/2012_09_07/o1_mf_1_2 _ % u _. arc
ORA-00280: change 462055 for thread 1 is insequence #2
Specify log: {<RET> = suggested | filename | AUTO | CANCEL}
ORA-00308: cannot open archived log '/U01/tiger/flash_recovery_area/ORCL/archivelog/2012_09_07/o1_mf_1_2 _ % u _. arc'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-01547: warning: RECOVER succeeded butOPEN RESETLOGS wocould get error below
ORA-01194: file 1 needs more recovery to beconsistent
ORA-01110: data file 1: '/u01/tiger/oradata/orcl/system01.dbf'
------During the above recovery, we can see that the database is not archived, but they are looking for archiving logs during recovery.
At this time, we will not recover the Direct start of the database (with implicit parameters)After this parameter is setOpenIn process,OracleWill skip some consistency checks, so that the database may skip the inconsistent status,OpenOpen
OracleThe implicit parameter must be in the test environment orOracle SupportSupported
SQL>Alter system set "_ allow_resetlogs_upload uption" = true scope = spfile;
System altered.
Implicit parameter:RedoBlock damage
First, if the damage is not currentRedoFiles that have been archived can be used
Alter database clear logfile group 1Clear the log file
Second, if the damaged item is not currentRedoFile and the file group is not archived.
Alter database clear unarchived logfilegroup 1Forcibly clear logs
Third, there are two types of log corruption in archive mode:
1The database is shut down normally, and no pending transactions in the log file need to be recovered by the instance. If the current log group is damaged, you can directly useAlter database clear unarchived logfile group n.
2There are active transactions in the log group, the database needs to recover the media, and the log group needs to be used for synchronization. There are two ways to remedy this problem.
A:The best way is to ensure Database Consistency through Incomplete recovery, but this method requires that the archive mode and available backup
B:Mandatory recovery may cause Database Inconsistency.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 1219136 bytes
Variable Size 109053376 bytes
Database Buffers 197132288 bytes
Redo Buffers 7168000 bytes
Database mounted.
The ORA-01589: must use RESETLOGS orNORESETLOGS option for database open
SQL> alter database open resetlogs;
Database altered.