Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

One of the databases that I've taken over monitoring is set to full recovery mode but there is no plan to have the transaction log backed up. Naturally this has caused the log file to grow to a fairly large size. I understand that when running in full recovery mode you want to do a transaction log backup to clear your log files but I'm concerned about any backup failures.

I just want to confirm if my log file will be cleared if the backup fails.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The question in the subject is different than the question in the body text, and the answers are opposite.

"If my transaction log backup fails will it still clear my log file?" - No.

"Is the log file only cleared after it has been successfully backed up?" - Yes.

share|improve this answer
    
Thanks for the help. I've edited the question to get rid of the conflict. –  Sean Howat Jun 1 '09 at 14:10
    
+1 If the log file were cleared irregardless of the outcome of the log backup, then the backup chain could become broken and corrupted. This would result in all log backups following the failed one to be unsuccessful or incomplete. –  NYSystemsAnalyst Jun 1 '09 at 14:11

Technically its the next checkpoint following a log backup that clears the log - it usually follows so quickly that it appears to be the log backup that clears the log. So if the log backup fails, the checkpoint can't clear the log.

Thanks

share|improve this answer
    
I should flag this for archiving. A T-Log question answered by @BrentO before @paulrandal! –  SQLChicken Jun 1 '09 at 14:41
    
He's in an earlier timezone than me - that's my excuse :-) –  Paul Randal Jun 1 '09 at 19:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.