Msg 15388, Level 11, State 1, Procedure sp_indexoption, Line 101
There is no user table matching the input name ‘%s’ in the current database or you do not have permission to access the table.
This error message appears when you try to use the sp_indexoption system stored procedure, but provide an invalid value for the @IndexNamePattern parameter.
The T-SQL statement can be parsed, but causes the error at runtime.
Error of the Severity level 11 are generated by the user and can be fixed by the SQL Server user. The statement cannot be run this way. The value for the @IndexNamePattern parameter must be valid and you must have permissions to access it.
All versions of SQL Server.
IF OBJECT_ID(‘dbo.t’) IS NOT NULL
DROP TABLE dbo.t;
CREATE TABLE dbo.T
CONSTRAINT cx_t PRIMARY KEY,
EXEC sys.sp_indexoption cx_t, ‘AllowRowLocks’, TRUE
In the above example we try to use the sp_indexoption procedure with the value “cx_t” for the @IndexNamePattern. Since this value is invalid in this context, the error is raised.