Restore Transaction Log

  • Hello Everyone

    I have not been able to find anything in the SQL BOL, nor have I ever had to try this in the past humpteen years that I have been working with SQL. But as we all know, things change in the different versions.

    Is there any way to restore a transaction log, or multiple transaction logs without first having already created and restored a full backup that is the start of the chain.

    Full Backup

    Tran Log Backup 1

    Tran Log Backup 2

    Tran Log Backup 3

    Tran Log Backup n

    Restore Full Backup

    Restore Tran Log Backup 1

    Restore Tran Log Backup 2

    Restore Tran Log Backup 3

    Restore Tran Log Backup n

    Thanks

    Andrew SQLDBA

  • In a nutshell no.

    the only thing that might look like you have is in log shipping. Take a tail log backup, this leaves the database in recovery.

    apply this log backup to the logship secondary and bring online.

    Use the secondary database and take log backups of that.

    that log backups could then be applied to the original database.

    go back far enough though (could be years) and even that will have an original full backup start point.

    ---------------------------------------------------------------------

  • Yeah, you have to restore logs onto a DB in either norecovery mode or in standby mode, and the only way you get that condition is to restore at minimum a full backup. Log backups can't even be taken if a full backup has not ever been taken. They are useless without a full backup to start from.

  • Just as an explanation WHY you cannot restore a Transaction Log onto an unrestored DB.

    Transaction logs contain a copy of the WORK that was done during a period of time in SQL Server. In order to be able to duplicate the work (restore the log), the database must be at the same starting point that it had when the transactions were originally written into the log.

    Hope this helps.

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

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