Today, I got a message from a developer that she is getting the following error when trying to execute a store procedure.
Msg 229, Level 14, State 5, Procedure cp_s_proc_dc_incr, Line 1 [Batch Start Line 2]
The EXECUTE permission was denied on the object 'cp_s_proc_dc_incr', database 'entpr_dat_wrhs', schema 'dbo'...
This error would mean that her account or the AD group that she belongs to doesn't have EXECUTE permission on the procedure in question.
I went into SSMS and expanded the database Security/Users folder. Here I can see if she has a user for herself or the AD group that she belongs to exists.
She seems to belong to an AD group. Her individual AD account isn't there. But I see her AD group. I'll use that.
I also went into the Security/Roles/Database Roles folder to see if there is already an execute stored procedure role that we usually create in my DBA team.
Nice, we already have an "exec_procs_role" in there. So, I will just use that to give her the permission she needs.
GRANT EXECUTE ON [exec_procs_role] TO [AD Group Name];
Easy peasy. I got her to test and the issue was resolved.
No comments:
Post a Comment