My sysindexes table is corrupt and causing a lot of problems. It all started when I first changed the server setting to allows updates to system tables, created an index on the field 'name', then un-set the server setting to allow updates to system tables. Now when I run DBCC checkdb or DBCC checktable, it shows that sysindexes is corrupt and there are entries in the sysindexes.xName that are not there and some that are extra. Is this because I have allows updates to system tables turned off and the index is not getting written to?
Now, when I try to remove the index I created, I get a message that I can't delete an index on a system table.
If I run DBCC checktable with repair_rebuild, do I need to allow updates to system tables first?
Any input to this problem is greatly appreciated. The problems occur when we use the IF EXISTS clause looking for indexes and create them or drop them as necessary, the condition gives us a false result.