Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

682


Part V: Enterprise Data Management


FIGURE 26-14
Completely removed log shipping confi guration.

Switching Roles


Log shipping enables the capability to manually switch roles. This action can be performed
for maintenance or in the case of a disaster. Depending on the cause of the disaster and its
severity, the likely fi rst step is to make a backup of the active transaction log, or tail of the
log, on the primary server (if it is still accessible) with the NORECOVERY option.

The next step is to transfer all the transaction log backups to the secondary server either
using a SQL Server Agent job or copying them manually. After copying, the transaction
log backups need to be restored in sequential order to the secondary server using the
WITH NORECOVERY or WITH STANDBY option for all transaction logs except the last one.
The last transaction log is restored using the WITH RECOVERY option to close any open

c26.indd 682c26.indd 682 7/31/2012 9:49:21 AM7/31/2012 9:49:21 AM


http://www.it-ebooks.info
Free download pdf