Monday, 1 January 2018

Restore Database

         
           What is Restore? What are the recovery states? Explain Each?

Restore means recover the data from backups. There are three recovery states for Restore.    

  •  With Recovery 
  •  With No-Recovery 
  •  Standby

  •   With Recovery:- With Recovery, Database will comes to Online and get ready to use Database. Generally while restoring recent (last) T.Log we can choose with recovery option.
  •    With No-Recovery:- With No-Recovery Databases will comes to Offline and we can’t access DB. Generally except recent log we can choose With No-Recovery option.
  •    Standby:- With Standby, Databases will comes to Offline and users can have read only access. Generally except recent log we can choose Standby option for Read only access.

Restore Commands:

• RESTORE DATABASE - Allows us to restore a full, differential, file or filegroup backup


• RESTORE LOG - Allows us to restore a transaction log backup



           What are the common scenarios to Restoring the Data?

  •     To restore the lost and corrupted data after a system failure
  •   To restore a database onto a development system for user by application developers while developing and testing new code.
  •    To restore a database onto a test system to load test applications and database features.
  •    To restore a database on separate server as a read-only database to perform queries for reports.


                                                   Restore Strategy?

  •         First restore recent last full backup
  •         Then restore latest Diff. backup
  •         Then restore all Transaction Log backups.



No comments:

Post a Comment

PowerShell script to backup/restore procedures for Migrating each database

  Below is the PowerShell script that will implement backup/restore procedures for each database which we want to migrate to complete the mi...