Msg 1921, Level 16, State 1, Line 1
Invalid %S_MSG ‘%.*ls’ specified.
This error message appears when you try, for example, to move an index via DROP INDEX to a non-existant filegroup.
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. All options and parameters used in the specific statement must be valid for that statement.
All versions of SQL Server.
IF OBJECT_ID(‘tempdb..#t’) > 0
DROP TABLE #t
CREATE TABLE #t
CREATE UNIQUE CLUSTERED INDEX CIX_t_c1 ON #t(c1);
DROP INDEX CIX_t_c1 ON #t WITH (ONLINE = ON, MOVE TO abc);
In the above example we try to move the clustered index for the table #t to the non-exsitant filegroud abc. This raises the error.