Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

672


Part V: Enterprise Data Management


FIGURE 26-6
Confi guring the restore transaction log job on the secondary server.

To use log shipping as a reporting solution, you need to select Standby Mode on the Restore Transaction Log tab.
The restore job needs exclusive access to the database and will fail if users are running reports. You may select the
option to disconnect the users in the database when restore runs, but this means that longer running reports may
never complete, for example, if you have a restore job that runs every 15 minutes and you have a report that takes 25
minutes to complete. That report will always be killed by log shipping every 15 minutes. On the other hand you may
confi gure the restore job to occur every few hours, but in that case the secondary server will lag behind the primary
server. Because log shipping allows multiple secondary servers, you may have two secondary servers. Set one to no
recovery mode and schedule the restore job to run every 15 minutes or earlier, and set the recovery mode to standby
mode on the second secondary server. Then, schedule the restore job to run every few hours. This way you can have
two copies of your primary database and can use log shipping for high availability and reporting solution. If near real-
time data is required for reporting, consider using either Transactional Replication or AlwaysOn Availability Groups.


  1. On the Restore Transaction Log tab, the option for delaying a restore and alerting
    is available as well. This confi guration option enables all the transaction log back-
    ups to be held until the end of the business day or to apply the transaction logs as
    soon as they are received.


c26.indd 672c26.indd 672 7/31/2012 9:49:19 AM7/31/2012 9:49:19 AM


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