Handling of oracle redo corruption

Source: Internet
Author: User

Oracle redo corruption handling if only INACTIVE redo is damaged, there are three ways to restore: 1. clear logfile commands: alter database clear logfile '/database/oradata/skyread/redo04.log '; -- the archived operation alter database clear unarchived logfile '/database/oradata/skyread/redo04.log'; -- inactive unarchived operation 2. incomplete recovery until cancel start to mount status run recover database until cancel; 3. the resetlogs method of the resetlogs control file resetlogs method is used to re-build the Control File Script resetlogs, apply the related redo to restore the media, and resetlogs does not check the log file, so no error is reported. Recovery with exceptional shutdown: SQL> alter database backup controlfile to trace as '/home/oracle/ctl. SQL 'reuse resetlogs; Database altered. SQL> create table t1 as select * from dba_objects; Table created. SQL> select * from v $ log; GROUP # THREAD # SEQUENCE # BYTES MEMBERS ARC STATUS FIRST_CHANGE # FIRST_TIME ------------------------------------------------------------------------------------------------------------- ------ ------------------- 1 1 31 536870912 1 yes inactive 122695597193 14:41:24 2 1 32 536870912 1 yes inactive 122695676280 13:38:04 3 1 29 536870912 1 yes inactive 122695590894 10:29:29 4 1 33 536870912 1 yes active 122695698110 14:15:47 5 1 34 536870912 1 no current 122695861946 13:48:31 corrupt the log file archived by the activity, damage control file, abnormal shutdown: SQL> shutdown abort; ORACLE in Stance shut down. when the mount status is started, an error occurs: SQL> startup; ORACLE instance started. total System Global Area 5049942016 bytesFixed Size 2090880 bytesVariable Size 1375733888 bytesDatabase Buffers 3657433088 bytesRedo Buffers 14684160 bytesORA-00205: error in identifying control file, check alert log for more info to recreate the control file, NOTE: If it is noresetlogs, It is unsuccessful. Because redo04.log is damaged, you can only use resetlogs instead of checking the log file SQL> CREATE CONTROLFILE REUSE DATA BASE "SKYREAD" noresetlogs force logging archivelog 2 MAXLOGFILES 20 3 MAXLOGMEMBERS 5 4 MAXDATAFILES 1000 5 MAXINSTANCES 8 6 MAXLOGHISTORY 2337 7 LOGFILE 8 GROUP 1'/database/oradata/skyread/redo01.log 'size 512 m, 9 GROUP 2'/database/oradata/skyread/redo02.log 'SIZE 512 M, 10 GROUP 3'/database/oradata/skyread/redo03.log' SIZE 512 M, 11 GROUP 4'/database/oradata/skyread/redo04.log 'size 512 M, 12 GROUP 5'/database/oradata/skyread/redo05.log 'size 512 M 13 DATAFILE 14'/database/oradata/skyread/system01.dbf ', 15'/database/oradata/skyread/tbs_test.dbf ', 16'/database/oradata/skyread/sysaux01.dbf', 17'/database/oradata/skyread/users01.dbf ', 18 '/database/oradata/skyread/system02.dbf', 19 '/database2/oradata/skyread/undotbs02.dbf', 20'/database2/oradata/skyread/comment ', 21'/dat Abase/oradata/skyread/sf01.dbf '22 character set UTF8; create controlfile reuse database "SKYREAD" noresetlogs force logging archivelog * ERROR at line 1: ORA-01503: create controlfile failedORA-01565: error in identifying file '/database/oradata/skyread/redo04.log 'ora-27046: file size is not a multiple of logical block sizeAdditional information: 1 SQL> CREATE CONTROLFILE REUSE DATABASE "SKYREAD" RES Etlogs force logging archivelog 2 MAXLOGFILES 20 3 MAXLOGMEMBERS 5 4 MAXDATAFILES 1000 5 MAXINSTANCES 8 6 MAXLOGHISTORY 2337 7 LOGFILE 8 GROUP 1'/database/oradata/skyread/redo01.log 'SIZE 512 M, 9 GROUP 2'/database/oradata/skyread/redo02.log 'SIZE 512 M, 10 GROUP 3'/database/oradata/skyread/redo03.log' SIZE 512 M, 11 GROUP 4'/database/oradata/skyread/redo04.log 'size 512 M, 12 GROUP 5'/database/o Radata/skyread/redo05.log 'size 512 M 13 DATAFILE 14'/database/oradata/skyread/system01.dbf ', 15'/database/oradata/skyread/tbs_test.dbf ', 16'/database/oradata/skyread/sysaux01.dbf ', 17'/database/oradata/skyread/users01.dbf', 18'/database/oradata/skyread/system02.dbf ', 19 '/database2/oradata/skyread/undotbs02.dbf', 20'/database2/oradata/skyread/TBS_MRPMUSIC01.dbf ', 21'/database/oradata/skyrea D/sf01.dbf'22 character set UTF8; Control file created. the following is a series of open process, because redo04.log is active, so you need to restore SQL> alter database open; alter database open * ERROR at line 1: ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/database/oradata/ Skyread/system01.dbf 'SQL> recover database; ORA-00283: recovery session canceled due to errorsORA-01610: recovery using the backup controlfile option must be done SQL> recover database using backup controlfile; ORA-00279: change 122695861946 generated at 06/04/2013 13:48:31 needed for thread 1ORA-00289: suggestion:/database/oradata/arch/41534_815416841.dbfora-00280: change 122695861946 for thread 1 is in sequence #34 Specify log: {<RET> = suggested | filename | AUTO | CANCEL}/database/oradata/arch/201734_815416841.dbfora-00308: cannot open archived log '/database/oradata/arch/41534_815416841.dbf' ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3. Apply the log and open the database: Specify log: {<RET> = suggested | filename | AUTO | CANCEL}/database/oradata/sky Read/redo05.logLog applied. media recovery complete. SQL> alter database open resetlogs; Database altered. if an Unarchived active online log file is corrupted, a backup of the data file is required for restoration.
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.