Oracle Database Redo fault recovery

Source: Internet
Author: User

Redo faultYesOracle DatabaseIf a fault occurs during the operation, the Oracle database operation fails due to the fault, the following describes how to recover Redo faults in Oracle databases.

I. Recovery of lost inactive Log File groups:

Because the inactive Log File Group indicates that the checkpoint has been completed (the dirty data has been written to the data file ). The database itself will not be lost. If the corresponding redo is lost/damaged at this time, you can use clear to recreate the log file group for recovery.

Run the following command:

Alter database clear logfile group n

If the database mode is archived, You Need To forcibly clear

Alter database clear unarchived logfile group n

2. Recovery of lost active or current log file groups:

There are two types of loss:

One is to close the database normally (such as shutdown immediate)

The other is to shut down the database abnormally (such as shutdown abort)

1. When the current log is lost, the database is shut down normally.

Because shutdown immediate performs a full checkpoint, the current log does not need to be redo when the instance is restored.

In Oracle 8i, we can use alter database clear logfile group n for restoration.

However, in Oracle 9i, you may not be able to clear the current redo log. You need to recover the log through recover database until cancel (required)

Use the resetlogs option.

For example:

Alter database clear logfile group n

Recover database until cancel;

Alter database open resetlogs;

2. When the current log is lost, the database is shut down unexpectedly:

In this case, because the database is closed when the full check is not performed, the current log must be required for Oracle instance recovery. Otherwise, the Oracle database cannot be opened.

In this case, we usually need to recover data files from the backup and deduct them forward by applying archive logs. Until the last log file is intact, you can start the database through resetlogs to complete restoration. The lost data is the data in the damaged log file.

Note: _ allow_resetlogs_corruption is an implicit parameter in Oracle. If the system cannot open it in resetlogs mode, this policy can only be applied. Set the pfile to open the database. This function allows you to forcibly reset the log and open the database when the consistency is damaged. _ Allow_resetlogs_partition uption will use the oldest SCN of all data files to open the database. Therefore, we usually need to ensure that the SYSTEM tablespace has the oldest SCN. Ora-600 may be available for various reasons after a database is forcibly opened.

The Redo fault recovery of the Oracle database is introduced here. If you encounter a Redo fault in your future work, you can easily solve it, I hope the content mentioned above will be helpful to you.

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.