Differential backup in 2005

  • 1. If I'm taking a Differential backup in MS SQL Server 2005, then what is the status of the Trans. log?

    2. Does it still contain all the trans till last full backup or last differential backup?

    3. Also, does the Trans log get empty or dos it still have any more trans after a specified backup has been taken?

  • The transaction log backup is not affected by a full or a differential backup. It will still contain the log entries from the last log backup.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Thanks Andras! Just wanted to be doubley sure before going-ahead on a critical DB.

    So, this means that trans log is only affected when there is any trans backup taken and not when Full or Full Differential backup is taken...right?

  • Ambuj Mathur (4/7/2008)


    Thanks Andras! Just wanted to be doubley sure before going-ahead on a critical DB.

    So, this means that trans log is only affected when there is any trans backup taken and not when Full or Full Differential backup is taken...right?

    Yes, this is correct. If you want to be sure, and not just listen to somebody on the forum :)), have a look at your backups in msdb.dbo.backupset and look at the first_lsn and last_lsn entries for the log backup. Full and differential backups do not affect the chain in the log backups (chain: the last_lsn is the same as the first_lsn of the next log backup).

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Andreas is (of course) correct - both full and differential backups do not affect the transaction log in anyway. I'd personally suggest that you try it yourself on a test/development system - I find that seeing and doing something yourself helps the learning process.

  • Sure Andras/Peter,

    I will be testing this before making it live. I will be working on the Dev env. first. Thank for the confirmation!

  • In that case, what happens if you restore a TranLog backup where the Time range of the Transaction Logs 'overlap' a full or differential backup? What happens to the changes recorded by the restored Transaction Log which are 'before' the time of the Full or Differential Backup?

  • They'll get applied. When restoring a database, you generally start with the latest full + differential then move onto the transaction logs. However, it is entirely possible to start your restore process from an older full backup then apply all the transaction logs to roll it forward. Slow way of doing things, but I have read stories of where it had to be done (due to more recent full backups being corrupted - fortunately they had an unbroken chain of log backups from that full backup up to current day).

    Your full backup is the state of a database at a point in time (the time when the backup finished). The transaction log backups are a record of what happened to the database over a period of time.



    Scott Duncan

    MARCUS. Why dost thou laugh? It fits not with this hour.
    TITUS. Why, I have not another tear to shed;
    --Titus Andronicus, William Shakespeare


Viewing 8 posts - 1 through 7 (of 7 total)

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