Msg 1973, Level 16, State 1, Line 1
Cannot perform the specified operation on disabled index ‘%.*ls’ on %S_MSG ‘%.*ls’.
This error message appears when you try to perform certain operations on a disabled index.
The T-SQL statement can be parsed, but causes the error at runtime.
Error of the Severity Level 16 are generated by the user and can be fixed by the SQL Server user. The statement cannot be executed this way. You can only perform a few specific operations on a disabled view. For further information refer to the Books Online (BOL).
This error message was introduced with SQL Server 2005
IF OBJECT_ID(‘tempdb..#t’) > 0
DROP TABLE #t
CREATE TABLE #t
CREATE UNIQUE CLUSTERED INDEX CIX_t_c1 ON #t(c1);
ALTER INDEX CIX_t_c1 ON #t
ALTER INDEX CIX_t_c1
STATISTICS_NORECOMPUTE = ON,
IGNORE_DUP_KEY = ON,
ALLOW_PAGE_LOCKS = ON
In the above example we try to perform the specified SET operation on the disabled index CIX_t_c1. This raises the error.