SQL transaction log backups conflicting with full backups?
Asked By: BradC
Originally Asked On: 2009-05-27 16:42:58
Asked Via: serverfault
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:
On one server, the trans log backup occasionally blocks the full backup, and must be manually stopped before the full backup can complete
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…?)
He received 4 answers
eventually accepting:
Paul Randal’s answer to
SQL transaction log backups conflicting with full backups?
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
The answer with the highest score with 5 points was:
mrdenny’s answer to
SQL transaction log backups conflicting with full backups?
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.
If the selected answer did not help you out, the other answers might!
All Answers For: SQL transaction log backups conflicting with full backups?
mrdenny’s answer to
SQL transaction log backups conflicting with full backups?
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.
Paul Randal’s answer to
SQL transaction log backups conflicting with full backups?
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
Jerry Rubin’s answer to
SQL transaction log backups conflicting with full backups?
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.
Nitin Shetye’s answer to
SQL transaction log backups conflicting with full backups?
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.
Of course, you should really check out the original question.
The post SQL transaction log backups conflicting with full backups? [ANSWERED] appeared first on Tech ABC to XYZ.