Saturday, 16 February 2013

Log Shipping - How you can convert the secondary database into primary


This topic explains the log shipping if the primary database is suspected or corrupted and how you can convert the secondary database into primary database.
To recover a database without restoring (to be done in the master data base)

Execute the RESTORE DATABASE statement, specifying:
  • The name of the database to be recovered
  • The RECOVERY clause



/* To recover a database without restoring (to be done in the master data base)
   
   Execute the RESTORE DATABASE statement, specifying:
   The name of the database to be recovered
   The RECOVERY clause

Example
For example, you can recover the database, AdventureWorks2008R2, as in a restore operation without restoring data*/

-- Restore database using WITH RECOVERY.
RESTORE DATABASE AdventureWorks2008R2
   WITH RECOVERY

No comments:

Post a Comment