Please start any new threads on our new site at 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!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 Grant Permissions on a list of Stored Procedures
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

12 Posts

Posted - 08/01/2013 :  09:52:42  Show Profile  Reply with Quote
I have a list of existing stored proceudures that I can get by running the below query. I have a new sqluser called "XXXXXX" . How can I iterate through the result set in sql and give execute permissions to user XXXXXX. Any help or direction would be most appreciated.


SELECT [name]
FROM sys.objects obj
WHERE obj.[type] = 'P' and name like'JL_%'


James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 08/01/2013 :  10:45:04  Show Profile  Reply with Quote
Modify the query to generate the grant statements, run it, copy the results to an SSMS query window and execute it
FROM sys.objects obj
WHERE obj.[type] = 'P' and name like'JL_%'
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