There is no user table matching the input name ‘%s’ in the current database or you do not have permission to access the table.
Error Message:
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.
Severity level:
11.
Description:
This error message appears when you try to use the sp_indexoption system stored procedure, but provide an invalid value for the @IndexNamePattern parameter.
Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.
Resolution:
Error of the Severity level 11 are generated by the user and are corrigible by the 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.
Versions:
All versions of SQL Server.
Example(s):
IF OBJECT_ID(‘dbo.t’) IS NOT NULL
DROP TABLE dbo.t;
GO
CREATE TABLE dbo.T
(
c1 int
CONSTRAINT cx_t PRIMARY KEY,
x1 xml
);
EXEC sys.sp_indexoption cx_t, ‘AllowRowLocks’, TRUE
Remarks:
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.



No comments yet... Be the first to leave a reply!