Introduction of Standby Database

Have you ever thought of scenario where primary database generated is corrupted and what is going to happen in this case? Since database is corrupted, how do we get values and update database by inserting new data? In order to face this situation and maintain the smooth functioning of system, there is concept of standby database.

A standby database is copy of database that’s been generated from primary database backup. If the primary database is lost or its data becomes corrupted, fail over to standby database can be carried out. Now in such situation, standby database becomes new primary database.

Next question is how data is copied from primary database to standby database. What is the procedure to update standby database in accordance with changes made in primary database ?

  1. After an interval primary database gets updated. Interval may vary, but primary database contains many updates, such as adding new user, deleting old content, Password change, and so forth. So database updates are captured in redo logs to replicate them to standby database.
  2. Updates in redo logs made once are not final. They ‘re cyclically overwritten. Because redo logs are temporary one, copy of redo log is made. It’s called an archive log. Unlike redo log, this is permanent copy.
  3. Saved archive log is now moved to standby server. The modifications in transferred archive logs are applied to standby database, thus updating standby database with primary database.




Advantages of StandBy database :

  • Protection of disasters –
    For example, Maintaining primary and standby databases so that if the primary database drive fails, the standby database can be activated and normal operations can be resumed and prevent any upcoming disaster.

  • Protection against corruption in data –
    For example, Standby database provides possible protection against incorrect batch jobs, user errors, or application corruption in primary database by not applying corrupted logs to standby database. The uncorrupted standby database can then be activated, making it the primary database.

Additional reporting :
Additional requirements for standby database are :

  1. Extra Computer –
    To maintain standby database on separate host, an extra computer is used to help minimize disaster in the future.
  2. Extra storage –
    We need additional system resources and extra storage space.
  3. Administration –
    Administration of standby database is needed to replicate operations that are performed on primary database.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.