Monday, November 29, 2010

Useless SQL Server Errors

Okay, there's nothing more useless than getting an error that doesn't tell you anything about how to fix it or, at the very least, why it occurred.
I had a Transaction Log backup job that was running regularly on SQL Server 2000, and was regularly getting failure, with nothing more than "SQLSTATE 42000, Error 22029".   Googling was not very helpful--seemed this could be caused by a who slew of possibilities, none of which appeared to apply to me.
It wasn't until I opened the text log file that was produced from the job and googled on the specific message ("Backup can not be performed on database <database>. This sub task is ignored.") that I found my answer, at http://support.microsoft.com/kb/303229.  It would have been nice to have something basic in the error message that told me the problem--it would have saved me a few hours of digging.
Basically, the Recovery Model for this database was "Simple".  Apparently you can't back up the transaction log on databases defined as Simple Recovery Model.  So there are two simple choices:  1. Change the Recovery Model to something other than "Simple" ("Bulk-Logged" or "Full" are both valid for backing up the transaction log), or 2. Don't back up the transaction log.
Since, in my case, the database is replicated to another server, it seemed rather redundant to back up the transaction log.  So, I turned off this job altogether.  Problem solved.