683
Chapter 26: Log Shipping
26
transactions and bring the secondary database up in an online state. If all the transaction
log backups have been restored using the WITH NORECOVERY or WITH STANDBY
option, there is no need to panic. You can still recover the database using the
RESTORE DATABASE <database_name> WITH RECOVERY command. Then disable the
log shipping jobs and alerts on the servers participating in the log shipping confi guration.
Next verify that any database objects such as logins, jobs, maintenance plans, SSIS pack-
ages, and linked servers that reside outside the log shipping database are created on the
warm standby server. For example, if the logins are not created on the warm standby
server, then the users cannot connect, and you still have a server down situation.
Finally, manually redirect the applications and users to the new primary server.
Best Practice
It is highly recommended that you thoroughly execute the role reversal steps and document them
prior to needing to failover to the warm standby server. Failure to do this can signifi cantly increase the
downtime and complexity when you actually need to failover to the warm standby server.
Returning to the Original Primary Server
Once the primary server has been repaired and is ready to return to service, the following
steps reinitialize the primary server during a period when users are not connected:
- Use Integration Services job to move all the user logins from the warm standby
server to the primary server. - Transfer the database from the warm standby server to the primary server using
either a full database backup and restore method or a detach and attach method.
If you had failed over to the warm standby server in a controlled environment,
you may be able to avoid taking a complete backup and restore of the database by
applying the transaction log backups from the warm standby server to the original
primary server. - Redirect the applications and users to the original primary server.
Summary
Availability is paramount to the success of most database projects and is becoming increas-
ingly important for business requirements. Log shipping, failover clustering, database
mirroring, AlwaysOn, and replication are all high-end features to provide a stable database
environment for the users.
c26.indd 683c26.indd 683 7/31/2012 9:49:22 AM7/31/2012 9:49:22 AM
http://www.it-ebooks.info