Microsoft SQL Maintenance Plans – Part One
December 31, 2004 Leave a comment
I’m collecting a series of notes on MSSQL maintenance plans. There may be some bits herein that can assist; please comment liberally and provide pointers if you think I’ve left something out.
My primary contact with these plans is through BizTalk Server 2004. More detail on these jobs is available in the BizTalk Database Appendix (not yet published in this BLOG), my reference posts and in the BizTalk documentation on MSDN.
I mention these specifically because 1) I work with them the most and 2) I recently resolved issues with these jobs on a system; my memory is still fresh. Some maintenance notes:
- When creating a maintenance plan, group databases with transactional logging (full recovery mode) together. Mixing with other transaction types (simple) will generate errors. You’ll get ‘(SQLSTATE 42000)’ and ‘(ERROR 22029)’ error messages in the job history and error number 208 in the Windows Event Log. Look at each database and ensure the modes are the same for the databases selected for this operation.
- The above error will also arise if you attempt an operation that requires the database to be in single-user mode (rebuilding an index, for example). To look for this issue, click “Management“ and right-click “Database Maintenance Plans” , selecting “Maintenance Plan History“. Sort for the failed job and click “Properties”. Troubleshooting Database Maintenance Plan Failures on MSDN provides some hints on the above issues.
- If you see the ever-present (for me, anyway) “The table ‘#catalogs’ has been created but its maximum row size (8281) exceeds the maximum number of bytes per row (8060)“ error, on a BizTalk server the cause is a missing adm_OtherBackupDatabases table in the BizTalkMgmtDb database. Create this table per the Microsoft SQL Maintenance Jobs for BizTalk Server article on this blog.
More to follow.