question

colibri avatar image
colibri asked

cannot execute function/stored procedure but can see it

Developer can see a function and store procedure but cannot execute. Any suggestion on how to fix? The developer group they are a member of has the RWX permissions on the database and the two objects. He gets this error: `The EXECUTE permission was denied on the object 'function_name', database 'db_name', schema 'schema_name' ` and `Msg 229, Level 14, State 5, Procedure [stored_procedure_name], Line 1 The EXECUTE permission was denied on the object 'stored_procedure_name', database 'db_name', schema 'schema_name'`
stored-procedurespermissionsfunctionsdatabase-objectsstored
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
WilliamD avatar image
WilliamD answered
Have you tried explicitly granting execute permissions on the objects? GRANT EXECUTE ON [objectname] TO [Username] Also check to see if any DENY permissions have been assigned. DENY overrules GRANT permissions.
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes went through SSMS and granted permissions to the objects through there. Anything else that it could be?
0 Likes 0 ·
As I mentioned at the end of my answer, make sure you don't have a DENY assigned to the users, as this will override any GRANT you may have assigned. Also make sure you are in the right database when doing all this, you may be connecting to the user's default DB and that may be different to the DB you are aiming for.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.