SQL transaction log backups conflicting with full backups?

5,676

Solution 1

In 2000, log backups could not run at the same time as diff or full backups (because a log backup will clear some transaction log and full/diffs must backup some log to allow the restored copy of the database to be transactionally-consistent).

In 2005 this restriction was lifted. They can occur at the same time but a log backup concurrent with a full or diff will not clear the log. The log clearing will be delayed until the full or diff completes - this adds to the myth that full and diff backups clear the log - they do not.

Thanks

Solution 2

Database backups should normally be serialized.

The large log backup is probably happening because of database maintenance operations which happen between the last log backup and the full backup. Reducing the interval between log backups may help with this.

You can run some T/SQL to check the sysprocesses table (or DMV if SQL 2005+) to see if a backup is already being performed on that database. If not do the backup, if so bail out gracefully.

Share:
5,676

Related videos on Youtube

BradC
Author by

BradC

Updated on September 17, 2022

Comments

  • BradC
    BradC almost 2 years

    On our SQL servers (2000, 2005, and 2008), we run full backups once a day in the evening, and transaction log backups every 2 hrs. We haven't really worried about these two processes conflicting, but lately we've run into some of the following issues:

    1. On one server, the trans log backup occasionally blocks the full backup, and must be manually stopped before the full backup can complete

    2. We sometimes end up with a massively-sized trans log backup file (sometimes larger than the full backup!) that seems to occur at the same time the full backup is running.

    I found a reference that indicate that these are "not allowed" to run at the same time, whatever that means: SQL 2000 Books Online and SQL 2005 Books Online. I'm not sure whether that means that the server will simply prevent them from running simultaneously, or if we ought to be explicitly stopping the log backups while the full backups are running.

    So are there known conflicts/issues between these? Does the answer differ between SQL versions? Should I have the trans log backup job check to see if the full backup is running before it executes? (and how do I do that...?)

  • BradC
    BradC about 15 years
    Thanks, Paul. So what if the job schedules DO overlap (on SQL 2000)? Would weirdness occur like I describe above (unusually huge trans log backups, or blocking)?
  • Paul Randal
    Paul Randal about 15 years
    Basically yes, both.