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 ?
- 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.
- 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.
- 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 :
- Extra Computer –
To maintain standby database on separate host, an extra computer is used to help minimize disaster in the future.
- Extra storage –
We need additional system resources and extra storage space.
- 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.
- How to pre populate database in Android using SQLite Database
- Difference between Database Administrator (DBA) and Database Engineer
- Difference between Centralized Database and Distributed Database
- Introduction of Database Normalization
- Introduction of DBMS (Database Management System) | Set 1
- Introduction of Enterprise Database
- Database Management Systems | Set 1
- Database Management Systems | Set 2
- Database Management Systems | Set 3
- Database Management Systems | Set 4
- Database Management Systems | Set 5
- Database Management Systems | Set 6
- Database Management Systems | Set 7
- Database Management Systems | Set 10
- Database Management Systems | Set 8
- Database Management Systems | Set 9
- Database Management Systems | Set 11
- How to store a password in database?
- Database Management System | Dependency Preserving Decomposition
- Distributed Database System
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.