Restoring transaction logs out of sequence

  • Hello,

    I'm wondering if it's possible to restore transaction log backups out of sequence. I.e. I have a full backup and then a set transaction log backups. The DB is restored from the full backup with NORECOVERY. Will SQL report an error if a newer log backups then restored (with NORECOVERY again) before the older ones? Also, what would happen if I try to restore the same log backup twice?

    Thanks!

  • Without trying it on my system, I believe it would give you an error something along the lines of missing lsn numbers.

  • Hi,

    You will have the follow the same sequence of restore as per the backup sequence. Skipping a TL-Log backup in between will report an error stating that LSN 340000001 for newer backup cannot be restored unless the backup for LSN 30000001 has been restored.

    SQL server tracks the backups as per LSN. For each TLbackup an LSN is recorded. For every restore the continuity of LSN is ensured.

    Thanks,

    Amit Kulkarni

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply