Thursday, 21 May 2015

Can not find the types 'x', because it does not exist or you do not have permission - SQL Server by serverku

Recently, when I was working with security of SQL Server, I faced one permission issue of custom data type and received an error below,
msg 15151, Level 16, State 1, Procedure xxx, Line 9
Cannot find the types 'x', because it does not exist or you do not have permission
This error received while executing stored procedure and this custom data type used in a stored procedure. The user has executed and appropriate permission of base tables, even it raised an error. Finally, I came to a solution and given permission below,
Use <YourDBName>
GO
GRANT VIEE DEFINITION ON TYPE :: DBO.X TO <User Name>
GRANT EXECUTE ON TYPE :: DBO.X TO <User Name>
GRANT CONTROL ON TYPE :: DBO.X TO <User Name>
GO
This is just what I faced and the solution applied to resolve it. Please share your comments if you ran into a custom data type issue.

No comments:

Post a Comment

Please Use Good Leanguage