Explore Oracle RMAN_07 redo log redu file loss recovery

Source: Internet
Author: User

Redo log files Record Database Change Data. Generally, the failure of redo log files will not cause database data loss, but will affect database recovery. Redo logs can be divided into two statuses: Current online redo logs and non-current online redo logs.

4.1Non-currentRedo (Online redo log)File loss recovery

When the database is running, the following error is reported in the log:

ORA-00313: openfailed for members of log group 1 of thread 1

ORA-00312: onlinelog 1 thread 1: '/DBData/WWL/redo01.log'

 Check the log group to determine whether the damaged log group is the current one.

SQL> select * from v $ log;

GROUP # THREAD # SEQUENCE # bytes members arc status FIRST_CHANGE # FIRST_TIM

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

1 1 32 31457280 1 yes inactive 1063037 04-JUL-12

3 1 34 31457280 1 no current 1118555 05-JUL-12

2 1 33 31457280 1 yes inactive 1086278 05-JUL-12

 

We can see that the corrupted log group is not the current log. Can I useClearCommand to recreate the log file group.

 

Restore non-current log groups by rebuilding to enable the database.

SQL> startup

Oracle instancestarted.

 

Total SystemGlobal Area 100663296 bytes

Fixed Size 1217884 bytes

Variable Size 88083108 bytes

DatabaseBuffers 8388608 bytes

Redo Buffers 2973696 bytes

Database mounted.

ORA-00313: openfailed for members of log group 1 of thread 1

ORA-00312: onlinelog 1 thread 1: '/DBData/WWL/redo01.log'

 

SQL> alter database clear logfile group 1;

Databasealtered.

 

After reconstruction, the database can be opened and the restoration is complete.

SQL> alter database open;

Database altered.

4.2CurrentRedo (Online redo log)File loss recovery

The following error is reported when the database is started.

SQL> startup

ORACLE instance started.

 

Total System Global Area100663296 bytes

Fixed Size1217884 bytes

Variable Size88083108 bytes

Database Buffers8388608 bytes

Redo Buffers2973696 bytes

Database mounted.

ORA-00313: open failed for members of log group 1 ofthread 1

ORA-00312: online log 1 thread 1: '/DBData/WWL/redo01.log'

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

Check the log group to determine whether the damaged log group is the current one.

SQL> select * from v $ log;

 

GROUP # THREAD # SEQUENCE # bytes members arc status FIRST_CHANGE # FIRST_TIM

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

1 1 35 31457280 1 no current 1139915 05-JUL-12

3 1 34 31457280 1 yes inactive 1118555 05-JUL-12

2 1 33 31457280 1 yes inactive 1086278 05-JUL-12

Here we can see that the damaged log group is the current log group, which means that online data will be lost, because the current status in the redo log contains activity data that is not archived and written to the data file, therefore, such restoration will inevitably lead to data non-synchronization and data loss.

We can first try to clear the log group information and recreate it to restore it:

SQL> alter database clear unarchived logfile group 1;

Alter database clear unarchived logfile group 1

*

ERROR at line 1:

ORA-01624: log 1 needed for crash recovery of instanceWWL (thread 1)

ORA-00312: online log 1 thread 1: '/DBData/WWL/redo01.log'

The preceding method is not applicable.SCNTo restore the database.

  • 1
  • 2
  • Next Page

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.