Microsoft KB Archive/254598

From BetaArchive Wiki
Knowledge Base

BUG: Index Cannot be Dropped if the Name Begins with "#" Character

Article ID: 254598

Article Last Modified on 10/16/2002


  • Microsoft SQL Server 7.0 Standard Edition

This article was previously published under Q254598

BUG #: 57433 (SQLBUG_70)


An index with a name starting with the identifier '#' can not be dropped using the DROP INDEX statement. The following error message occurs when you try to drop such an index:

Server: Msg 159, Level 15, State 1, Line 1
For DROP INDEX, you must give both the table and the index name, in the form tablename.indexname.


The workaround is to rename the index using SP_RENAME and then drop it.

For example:

sp_rename 'Categories.#index1','index1'
drop index Categories.index1


Microsoft has confirmed this to be a problem in SQL Server 7.0.

Keywords: kbbug kbpending KB254598