Dbvisit Community Dbvisit home       

Go Back   Dbvisit Community > Dbvisit Standby - Technical > Dbvisit Standby - Technical Questions or Issues

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-09-2012, 02:42 PM
Arjen Visser Arjen Visser is offline
Dbvisit Team
 
Join Date: Jan 2008
Location: Auckland, New Zealand
Posts: 381
Default Archive log file missing - How to Resync the standby database using RMAN incremental

Occasionally there is an archive log file missing from the primary which is needed by the standby database to keep it up to date. The standby database must have all archive log files and no archive log file can be skipped.

If an archive log file is missing Dbvisit Standby usually reports this with the Archive log missing error (Return code = 6001).

When this happens there are 3 options:
1) Restore the missing archive from backup on the primary server and Dbvisit Standby will be able to pick it up and transfer to the standby server to apply to the standby database.
2) Rebuild the standby database. The standby database can be rebuild using the CSD (create standby database) wizard in Dbvisit Standby. This can be through the Web interface or through the command line (dbvisit_setup).
3) Resync the standby database using an incremental RMAN backup from the primary database. This does not require a full rebuild of the standby database and can be a lot more efficient.

The steps to resync the standby database using an incremental RMAN backup from the primary database are as follows.

1. Obtain current SCN from the standby:
SQL> SELECT CURRENT_SCN FROM V$DATABASE;
CURRENT_SCN
-----------
233995

2. Connect to the primary database as the RMAN target and create an incremental backup from the current SCN (for a standby lagging far behind the primary):
RMAN> BACKUP INCREMENTAL FROM SCN 233995 DATABASE FORMAT '/tmp/ForStandby_%U'
3. Transfer all the backup pieces created on the primary to the standby
4. Catalog backup pieces if the location on the standby is different from the primary
5. Create a standby controlfile on the primary and ship to the standby
6. Recreate the standby controlfile on the standby:
SQL> shutdown abort
SQL> startup nomount
RMAN> RESTORE STANDBY CONTROLFILE FROM '';
SQL> alter database mount standby database;
7. Rename standby data/temp files and redo if different from the primary using ALTER DATABASE RENAME FILE
8. Apply incremental backup to the standby:
RMAN> RECOVER DATABASE NOREDO;


SPECIAL NOTE As of Dbvisit Standby 6.0.34, there is an automatic resync feature to automate the above process. Please see http://blog.dbvisit.com/synchronize-...visit-standby/

Last edited by Arjen Visser; 07-30-2012 at 12:41 PM.
Reply With Quote
Reply

Tags
backup incremental, rman resync

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +12. The time now is 08:43 PM.