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)
 grant permissions to all stored procedures
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

HenryFulmer
Posting Yak Master

USA
110 Posts

Posted - 02/21/2013 :  09:16:05  Show Profile  Reply with Quote
How do I grant permissions to a user to alter,write and execute ALL stored procedures in my database?

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 02/21/2013 :  22:39:53  Show Profile  Reply with Quote
use GRANT t-sql statement

http://msdn.microsoft.com/en-in/library/ms187965.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

DonAtWork
Flowing Fount of Yak Knowledge

2167 Posts

Posted - 02/22/2013 :  07:18:21  Show Profile  Reply with Quote
More specifically,
http://msdn.microsoft.com/en-in/library/ms188371.aspx
All the way at the bottom of the page:

apparently ON is optional

Example:


--To Grant execute rights to all stored procedure to a role

GRANT EXECUTE TO db_executor

where db_executor is a role created by:

--Create a new role for executing stored procedures
CREATE ROLE db_executor









How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Go to Top of Page

ScottPletcher
Aged Yak Warrior

USA
550 Posts

Posted - 02/22/2013 :  15:53:58  Show Profile  Reply with Quote
As noted:


USE <db_name_to_be_affected>
GRANT EXECUTE TO <user_name>


Since there is no "ON <object>", this grant applies to the entire database.

Edited by - ScottPletcher on 02/22/2013 15:54:21
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.08 seconds. Powered By: Snitz Forums 2000