SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Automatically Grant Execute to SP
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gpc44
Starting Member

35 Posts

Posted - 03/19/2013 :  10:42:37  Show Profile  Reply with Quote
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

USA
337 Posts

Posted - 03/19/2013 :  11:04:41  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000