Steps to sync Standby with Primary Database in Oracle

In this tutorials, you will learn Steps to sync Standby with Primary Database in Oracle.

We can perform standby DB sync with primary when:

  • If there is a huge gap between primary and standby DB
  • If archivelogs are missing on primary
  • If archivelogs are corrupt on primary

Steps to Sync Standby with Primary Database in Oracle

Step 1: On standby DB – cancel the recovery on standby database with below command.

Step 2: On primary DB –  Determine the point from which standby is out of sync

Step 3: On primary DB – Determine if any datafile was added on primary DB after the standby DB was out of sync.  If yes, we need to restore that datafile on standby separately. If there is no datafile added then continue standby sync activity with below steps.

Step 4: On primary DB – take SCN based incremental backup using RMAN. Here we are using SCN number which we got from step 2. This backup should go on disk. And don’t forget to allocate channel while taking a backup so that backup will be faster.

Also, we are taking control file backup.

Step 5: Transfer backup files from primary DB to standby DB

On primary –

Step 6:  On standby  –  Connect to rman and catalog the copied backup

Step  7: On standBy DB – Now restore the controlfile from backup

Step 8: On standby DB – Now copy restored standby control file to its original location. Use below command to get an original location of a control file.

And replace  control file from original location with /tmp/control.ctl

Step  9: On standby – Now shutdown the standby database

Step 10: On standby – Now restore data file from step 3 using rman.  We are performing this step only if we are getting output in step 3.

Step 11: On standby – Now start recovery with below command.

Step 12: Confirm if the standby database is in sync with primary DB. Check archive log list on  both sides to see current log sequences

Now, you learned the Steps to sync Standby with Primary Database in Oracle real environment.

Related Articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Adblock Detected

Please consider supporting us by disabling your ad blocker
%d bloggers like this: