I recently had the situation where a physical standby (running 10.2.0.3) had got itself so far out of date, that transferring the required archived redo logs would have necessitated retrieving them from tape. As a far quicker method of getting this standby back up-to-date (as opposed to a complete rebuild), I decided to apply an incremental backup to the standby.
This procedure is actually reasonably well documented. Except this leaves the controlfile at one SCN while all your datafiles have marched up to the new scn. Upon restarting the managed recovery process, the standby is still asking for ancient archived logs that your datafiles already have the changes applied.
It is interesting to contrast the instructions for 10g above with similar, though not the same instructions for performing this on 11g. The 11g instructions ask for the controlfile to be restored as well. Except the restore standby controlfile did not work on 10.2.0.3 instance.
So here is my guide to applying an rman incremental backup to a physical standby.
- Find out where your standby thinks you have applied up to:
standby> alter database recover managed standby database cancel;
standby> select current_scn from v$database;
- Make an rman incremental backup on the primary from the above scn:
primary_rman> backup incremental from scn #### database format '/backup/standby_%U';
- Once this backup file is copied to the standby, catalog it with the standby controlfile:
standby_rman> catalog start with '/backup/standby';
- Now actually apply the changes from the backup to the standby:
standby_rman> recover database noredo;
- At this point your datafiles will be up-to-date, but your controlfile is still out of date, create new standby controlfile from the primary:
primary> alter database create standby controlfile as '/tmp/standby.ctl';
Copy this to the standby and replace your current standby controlfiles with this new one. Once this is done you should be able to restart managed recovery and it will take off from your backup scn.
It is this final stage that does not seem to be covered to well with the documentation. Certainly I found I needed this new standby controlfile after applying an incremental backup to my standby.