Drop statistics syntax error

  • I am trying to drop statistics on a table in SQL2008R2 but am having trouble with the syntax. I have tried every combination I can think of but I believe the issue is the : in the name is causing problems.

    drop statistics _SMDBA_._INVENTORY99_. _WA_Sys__INACTIVE_:_0751B745

    go

    Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near '_WA_Sys__INACTIVE_:'.

    The reason I am dropping it is due to this:

    Message

    Warning: A column nullability inconsistency was detected in the metadata of index "_WA_Sys__INACTIVE_:_0751B745" (index_id = 12) on object ID 122795845 in database "XXXXXXX". The index may be corrupt. Run DBCC CHECKTABLE to verify consistency.

  • Have you don this: Run DBCC CHECKTABLE to verify consistency.

    What were the results?

  • It does not report errors. DBCC CHECK DB is clean, DBCC CHECKDB with data_purity is clean

    All three things do not report any issues. I also ran DBCC Update USAGE and Rebuilt indexes and Updated stats.

    Odd. The history behind this is it is a SQL 2000 DB that has been around for 11 years and has moved to three different physical servers. Who knows how this 'corruption' came about.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply