Error Message:

Msg 4606, Level 16, State 1, Line 1
Granted or revoked privilege SELECT is not compatible with object.

This error occurs when you try to grant or revoke select permissions on stored procedure.
You cannot revoke/grant Select permission on the procedure.

Example:
[sql]
GRANT SELECT ON OBJECT::dbo.test TO AAAAAA
[/sql]
where dbo.test is a stored procedure
Fix:
– Remove SELECT in the query and give any of the below permissions as required.

[sql]
GRANT ALTER ON OBJECT::dbo.test TO AAAAAA
[/sql]
[sql]
GRANT CONTROL ON OBJECT::dbo.test TO AAAAAA
[/sql]
[sql]
GRANT EXECUTE ON OBJECT::dbo.test TO AAAAAA
[/sql]
[sql]
GRANT TAKE OWNERSHIP ON OBJECT::dbo.test TO AAAAAA
[/sql]
[sql]
GRANT VIEW DEFINITION ON OBJECT::dbo.test TO AAAAAA
[/sql]

Refer to the below link to learn more about permissions on Stored Procedures
Permissions On Stored Procedures in SQL Server

Leave a Reply

Your email address will not be published. Required fields are marked *