6

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...?)

Kara Marfia
  • 7,892
  • 5
  • 32
  • 56
BradC
  • 2,200
  • 4
  • 25
  • 35

4 Answers4

12

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

Paul Randal
  • 7,184
  • 1
  • 35
  • 45
5

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.

mrdenny
  • 27,074
  • 4
  • 40
  • 68
0

In my scenario..we are having log shipping

SQL 2005 db full backup time :- 23 Hrs Tran logs @ every 15 mins :- i.e. 22.15, 22.30, 22.45, 23.00.

But whenever db full backup starts...tran logs stops generating, and our standby db goes out of sync.

So we have delayed tran logs by 5 mins...and problem got resloved.

0

One more possibility: if you have mirroring configured and if it is suspended, your transaction log and database backups will grow and continue to grow as long as mirroring is paused.