Time for action – closing a gap with an RMAN incremental backup
Let's see all the required steps to practice this recovery operation:
In this practice, assume that there are missing archived logs (gap) in the standby database, and we're not able to restore these archived logs. We'll synchronize Data Guard using the RMAN incremental backup. To represent this situation, execute the
DEFER
command to defer the log destination in the primary database, and execute the following operation that will generate redo in the primary database:SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2 = 'DEFER';
Now we have a standby database behind the primary database, and we'll use RMAN to reflect the primary database's changes to the standby database. Stop Redo Apply in the standby database:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Query the current system change number (SCN) of the standby database that will be used as the limit for an incremental backup of the primary database. Run...