SQL Dumbass

Fighting dumbasses, one query at a time…

T-Log, Truncate, and You’re A Dumbass

I have seen the ‘transaction log is full’ message so many times that I am just numb to it. Others do not share the same joy as I do, and thus they may be enamored with the error message when they see it, as if it was a new puppy. Combine this adoration with a tiny bit of SQL knowledge (so tiny it could fit on the head of a pin), and you have a recipe for making my head hurt.

Just to be clear…if you have executed a query that causes the transaction log to fill the entire log drive…the solution to your problem is not for me to truncate and shrink the log. All that does it stop the bleeding. The real solution¬†would also incude¬†that you not run that same query six more times. And it is especially not a solution for you to send emails to my boss asking why I am having trouble maintaining the stability of the server.

Unless, of course, you want me to stab you in the nose repeatedly with the business end of a paper clip.