Saturday, February 17, 2018

How To Use Incremental Backup to Fix DataGuard Gap

Top Steps
  • Get SCN of Primary and Standby
  • Backup incremental from scn ******** database;
  • alter database create standby controlfile as '/u02/backup/***_standby.ctl';
  • Copy backup and controlfiles to Standby Host
  • Startup nomount
  • RESTORE STANDBY CONTROLFILE FROM '/u03/backup/****_standby.ctl';
  • Alter database mount
  • Alter system set standby_file_management=manual;
  • Change datafile location (example commands)
    alter database rename file '/u10/oradata/test/users01.dbf' to '+DATA/test/DATAFILE/USERS.623.831847799'; 
  • Change temp file location(example commands)
    alter database rename file '/u10/oradata/test/temp01.dbf' to '+DATA/test/tempfile/TEMP.849.824255731';    
  • Change temp file location(example commands)
    alter database rename file '/u10/oradata/test/temp01.dbf' to '+DATA_test/lglholdu/tempfile/TEMP.849.824255731';    
  • Change redo log location  (example commands)
    • alter database clear logfile group 6;
    • alter database drop logfile group 6;
    • alter database add logfile thread 1 group 6;
    • select group#,member from v$logfile;
    • select group#, thread#, sequence#, status from v$log;
  • Catalog start with '/u03/backup';
  • Recover database;
  • Start MRP
  • Switch logfile in Primary to make  current redo log group of standby switch as well
  • Drop and recreate last current redo logs

No comments: