Invalid %S_MSG '%.*ls' specified.

Error Message:
Msg 1921, Level 16, State 1, Line 1
Invalid %S_MSG ‘%.*ls’ specified.

Severity level:
16.

Description:
This error message appears when you try, for example, to move an index via DROP INDEX to a non-existant filegroup.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
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.

Versions:
All versions of SQL Server.

Example(s):
USE tempdb;
GO
IF OBJECT_ID(‘tempdb..#t’) > 0
 DROP TABLE #t
GO
CREATE TABLE #t
(
 c1 INT
)
GO
CREATE UNIQUE CLUSTERED INDEX CIX_t_c1 ON #t(c1);
GO
DROP INDEX CIX_t_c1 ON #t WITH (ONLINE = ON, MOVE TO abc);

Remarks:
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.

]]>

Leave a comment

Your email address will not be published.