When trying to activate (rebuild) a disabled index, you get the generic error rrent command. The results, if any, should be discarded.
There is no difference if you try to enable it via T-SQL with:
ALTER
INDEX
[PK_tYourTable]
ON
[dbo].[tYourTable] REBUILD
GO
or if you try to enable it in the GUI by setting the "Use index" on the Properties --> Options page of the index that throws the error.
In SQL Server the above behavior was first experienced in SQL 2008 Standard Edition (10.0.6241), but it probably happens on other versions as well. There doesn't seem to be much documentation on the impact of SET options on index
rebuild, but the following
post gave the right idea to try resolving the above error. Only in the post, the error message is much more specific and helps with resolving the error. In the scenario above, it was not the QUOTED_IDENTIFIER option, but XACT_ABORT that was set via the
default connection options, which resulted in the rather generic error message.
This article isn't meant as a how-to for dealing with the error above but as an idea what could cause it. If you see the error, consider if you changed server Options.