Pages

Monday, June 21, 2010

Corrupt index(es) in msdb

I was trying to delete a SQL Job using sp_delete_job. It continued to fail with the message:
Unable to find index entry in index ID 1, of table {object_id of table}, in database 'msdb'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.
I found this blog post and the script in it repaired the msdb. 

(The command that fixed it is DBCC CHECKDB('msdb', REPAIR_REBUILD), but there is quite a bit of preparation that needs to be done before this command will execute successfully.  See the blog post I referred to.)

No comments: