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)? Commented May 19, 2021 at 20:25
  • @MartinSmith no, this was a real index that did exist once upon a time (according to documentation I can find) Commented May 20, 2021 at 0:46
  • Is it an index in "disabled" state then? Commented May 20, 2021 at 1:22
  • nope. the index does not exist at all Commented May 20, 2021 at 11:41

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.