Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Automatically Grant Execute to SP

Author  Topic 

gpc44
Starting Member

35 Posts

Posted - 2013-03-19 : 10:42:37
Hi,
is there a way to set "Grant Execute to [domain \ Active Directory Group] automatically without explicit Grant Execute to ....
Once a new SP is added, is automatic. Grant to be set.
Thank you

Regards
Nicole

djj55
Constraint Violating Yak Guru

352 Posts

Posted - 2013-03-19 : 11:04:41
What I did is create a role within a database,

USE yourdatabase;
go
CREATE ROLE db_executor AUTHORIZATION DBO;
-- Grants permissions on a securable to a principal.
GRANT EXECUTE TO db_executor;

then give permission to the group.

EXECUTE sp_addrolemember
@rolename = 'db_executor',
@membername = 'yourgroup';


djj
Go to Top of Page
   

- Advertisement -