If I have a log shipping scenario where a report runs for 30 minutes and the log shipping is set up for not killing the connection, and because of that, the restore will fail, the question is if all the accumulated transaction logs will be restored the next time the db is available for that (no connections open) ?


The log-shipping process includes 3 steps.

  1. T-Log backup of the primary database
  2. Copy the backup file to the target destination (shared)
  3. Restore to the target database with standby or no-recovery.

If we use stand-by, there are 2 option available disconnect user or go without disconnecting it. If we don't disconnect active sessions restore wouldn't begin until there's no active connection with the database.

In this case, steps 1 & 2 (backup & copy) will execute normally but restore will fail.

The log-shipping process wouldn't delete any backup file until it's older than the defined threshold.

Once there's no connection with the database it will restore all transaction log file greater then last LSN.


  • Thanks Rajesh, so my assumption is correct, as long as the trn files have the same LSN, log shipping will be able to restore them until the the next restore job run if db is available of course. – giantLincecum Jul 24 '19 at 17:34

At the end of the day, it's a file transfer right? So if you can't restore the file while it's being transferred but it transfers successfully later, you can use it as a restore. The restore process only cares about logs having the correct LSN sequence and being the correct type of usable file.

I would try to test this by trying a trans log restore in test environment after it finishes and see rather than taking my word for it though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.