December 2017
Intermediate to advanced
434 pages
10h 14m
English
Servers in the log shipping configuration can be utilized for disaster recovery, but this process is mostly manual. To switch the primary and secondary servers, you need to copy all the available backups to the secondary server. If this is a planned role switch, then you need to take a tail-log backup on the primary database:
USE masterGOBACKUP LOG DW TO DISK = 'c:\backups\DW.trn' WITH NORECOVERY
Once you have finished the tail-log backup, you have to copy the backup to the secondary server and restore the backup using the following script:
RESTORE LOG DW FROM DISK = 'c:\backups\DW.trn' WITH RECOVERY
As you have taken a tail-log backup on the primary server, this has left the database in the restoring mode, which ...
Read now
Unlock full access