0

I have a routine that runs through all the non-clustered indexes in a given database on SQL2005 (SP3), and reorganizes and rebuilds them (if fragmentation > 20%). This process is erroring out on one index entry in sys.indexes. The index does not exist on the database in question, but still exists by name in sys.indexes.

My questions:

  1. Is there a way to find other such indexes in all databases?
  2. Is it safe to just delete the absent index(es) from sys.indexes? If not, how do I clean this up?

As always, thank you in advance for your assistance.

4
  • Is the index a "hypothetical index" (left by the database tuning advisor)? – Martin Smith May 19 at 20:25
  • @MartinSmith no, this was a real index that did exist once upon a time (according to documentation I can find) – Kulstad May 20 at 0:46
  • Is it an index in "disabled" state then? – Martin Smith May 20 at 1:22
  • nope. the index does not exist at all – Kulstad May 20 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.