. Advertisement .
..3..
. Advertisement .
..4..
I get the “the execute permission was denied on the object” issue when trying to create a function using SQL Server Management Studio. Here is the detail of the warning message that I found it:
The EXECUTE permission was denied on the object 'xxxxxxx', database 'zzzzzzz', schema 'dbo'.
Please give me some advice to solve this problem.
The cause: This problem is obvious and has to do with the rights of the user who is executing or operating the database object.
The solution: To solve this error, you should make a new database role:
After that, give the role exec permission.
Now the new role will appear in the Database role membership for: section when you go to the properties of the user and go to User Mapping and select the database where you have added new role.
It sounds like you must grant execute permission to the user or a group they are a part of for the stored procedure.
You could grant such access, for example: