0

I want to grant a user permissions to view a stored procedure, but not execute it. I tried this but the user says that they cannot see it in SSMS.

GRANT VIEW DEFINITION ON MyProc TO SomeUser

How can I grant permissions for a user to view but not execute a stored procedure?

2 Answers 2

1

i suppose you have to deny select to him

DENY SELECT ON OBJECT::schema.MyProc TO SomeUser;  
GO  
1

After doing a screen share with the user, it was evident that the code below indeed works to grant permissions for a user to view but not execute a stored procedure. It was a case of receiving inaccurate feedback from the user.

GRANT VIEW DEFINITION ON MyProc TO SomeUser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.