RE: How do I bulk Grant?

RE: How do I bulk Grant?

 

  

This is kind of a primitive way of doing it but it works. This sql will
generate a number of statements in a result set. Paste the result set
statements in a query window and execute them.

select 'grant execute on ' + rtrim(name) + ' to MyUser'
from sysobjects
where type = 'p'
and name like 'Fetch%'


-----Original Message-----
From: Dan Guzman
[mailto:mssqldba-ezmlmshield-x68397749.[Email address protected]
Sent: Friday, August 31, 2007 4:08 PM
To: LazyDBA Discussion
Subject: How do I bulk Grant?

How do I grant Execute writes to specific role 'MyUser' for All stored
procedures who's name starts with 'Fetch'?

Dan



---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



MS Sql Server LazyDBA home page