Incremental Backup solves the log GAP in the DataGuard Database

Source: Internet
Author: User
Tags tmp folder

Incremental Backup solves the log GAP in the DataGuard Database

Sometimes the standby database lags behind the primary database for a long time, and the archive log of the primary database does not exist. How can we eliminate the log interval at this time? Many people choose to recreate the standby database, which is very troublesome, especially when the data volume of the master database is large, another option is to use incremental database backup to roll back the slave database to eliminate the log interval.

The procedure is as follows:

1. Check the scn Number of the Lost Archive in the standby Database

Idle> select current_scn from v $ database;

CURRENT_SCN

-----------

96458277

2. Create an incremental backup for the master database based on the missing archive scn number (make sure that the target directory of the master database and the slave database has enough space. The/tmp folder is used here)

RMAN>

Run {

Backup device type disk incremental from scn 96458277 DATABASE format'/tmp/stb_bk/% U_for_stb.bk 'include current controlfile for standby;

}

3. After the backup is completed, the directory uploaded from the master database to the backup database may be different from the preceding directory.

RMAN> catalog start with '/tmp/stb_bk /';

4. Check the controlfile location, because the backup control file will be used next.

Idle> show parameter control

Check the location of the standby_log file, because it may need to be rebuilt later.

Idle> select * from v $ logfile;

5. Use the following command to restore Data in rman:

RMAN>

Run {

Restore standby controlfile to '/tmp/stb_controlfile01.ctl ';

Recover database noredo;

}

If the following error is reported, it may be that the recover managed standby command is being executed:

ORA-19870: errorwhile restoring backup piece/tmp/stb_bk/05n5a31s_00000000for_stb.bk

ORA-19573: cannotobtain exclusive enqueue for datafile 1

Run the following command or restart the database to the mount status:

Idle> alter database recover managed standby database cancel;

Then execute again in rman:

RMAN>

Run {

Restore standby controlfile to '/tmp/stb_controlfile01.ctl ';

Recover database noredo;

}

6. Close the database and overwrite the original backup control file.

 

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Important configuration parameters of Oracle Data Guard

Configure Oracle 11g Data Guard based on the same host

Explore Oracle 11g elastic uard

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Role conversion for Oracle Data Guard

FAL gap in Oracle Data Guard logs

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby

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.