0

We are using LS for reporting purpose. LS backup runs on primary every 15 minutes. On Secondary nightly restore via LS restore job is done daily at 10 PM.

While the nightly restore job is running, additional log backups are being taken and delivered.

Will the restore job restore the logs through the last one present when the job started? Or, will it keep restoring as long as there's another log to restore.

Let's say our log backups are taken at XX:05, XX:20, XX:35, and XX:50. Our restore job usually runs to, say, 6:00 AM. At that point, does it represent our primary database as it was at 9:50 PM (the last log taken before the restore job started), or as it was at 5:50 AM (because after it restored the 5:50 log, it didn't find another, so it quit)?

Naturally, our users want to know for their queries; whether the data reflects 10PM or 6AM can make a big difference.

4
  • @Kin. Thanks for the link. I get how it catches the LSN no for next restores. But confusion here is how will LS restore job decided when to quit or stop. How can we know what data upto a time can be conveyed to business will be delivered in compare to prod so that they can query as per ii? Sep 17, 2018 at 21:41
  • I've edited the question to try to clarify what I believe you're asking. If you don't think this properly reflects your question, you can either edit it further, or roll back to a previous revision.
    – RDFozz
    Oct 3, 2018 at 15:43
  • @RDFozz : Thats correct, thanks for putting it up the ask i am looking for. Oct 3, 2018 at 15:45
  • 1
    This should be really easy to test. Create a date table with a single row/column of CurrentDateTime DateTime on the primary server and use a SQL Server Agent job to run every minute and update that single row with sysdatetime(). When your secondary logs have all been applied and the secondary server has been put in standby mode, you should be able to select from that table and see the date/time. That will tell you what logs have been applied. Oct 4, 2018 at 8:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.