Skip to main content
Tweeted twitter.com/#!/StackDBAs/status/336981640280686593
edited tags
Link
Jon Seigel
  • 16.9k
  • 6
  • 45
  • 84
Post Migrated Here from stackoverflow.com (revisions)
Source Link
PseudoToad
  • 838
  • 2
  • 11
  • 23

Dropping Hypothetical Indexes

In the past I thought I'd deleted hypothetical indexes using either a DROP INDEX statement for clustered indexes and DROP STATISTICS statement for non-clustered indexes.

I have a database that is full of DTA remnants that I would like to cleanup; however, when I try to drop the object I always receive an error telling me that I cannot drop the object "because it does not exist or you do not have permission". I am a full sysadmin on the server so would expect to have rights to do anything.

I've tried this with both DROP STATS and DROP INDEX statements but both give me the same error.

Has anyone deleted these before and is there a trick I'm missing?


Addendum

Poking around in this, I just noticed that if I R-Click on the object, both the 'Script As' and 'DELETE' options are greyed out.