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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 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
352 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  
 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.03 seconds. Powered By: Snitz Forums 2000