SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Script to grant exec permission to all sps in a db


Script to grant exec permission to all sps in a db

Author
Message
harsha.majety
harsha.majety
SSC Eights!
SSC Eights! (999 reputation)SSC Eights! (999 reputation)SSC Eights! (999 reputation)SSC Eights! (999 reputation)SSC Eights! (999 reputation)SSC Eights! (999 reputation)SSC Eights! (999 reputation)SSC Eights! (999 reputation)

Group: General Forum Members
Points: 999 Visits: 449
Comments posted to this topic are about the item Script to grant exec permission to all sps in a db
J.O.
J.O.
Old Hand
Old Hand (384 reputation)Old Hand (384 reputation)Old Hand (384 reputation)Old Hand (384 reputation)Old Hand (384 reputation)Old Hand (384 reputation)Old Hand (384 reputation)Old Hand (384 reputation)

Group: General Forum Members
Points: 384 Visits: 321
I usually create a role and grant execute permissions to that role then assign a user to that role.
mehmetguzel
mehmetguzel
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 282
Short Way for SQL Server 2008 and SQL Server 2008 R2:

declare @strSQL varchar(max)
set @strSQL ='';
select @strSQL = @strSQL + ' grant exec on ' + name + ' to User1 ;' from sys.procedures
exec (@strSQL)

MS SQL Server DBA
www.mehmetguzel.net
sa_11
sa_11
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 87
J.O. (12/13/2010)
I usually create a role and grant execute permissions to that role then assign a user to that role.
+1
simon.murin
simon.murin
SSC Veteran
SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)

Group: General Forum Members
Points: 233 Visits: 575
GRANT EXECUTE ON SCHEMA::dbo TO USER1
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (175K reputation)SSC Guru (175K reputation)SSC Guru (175K reputation)SSC Guru (175K reputation)SSC Guru (175K reputation)SSC Guru (175K reputation)SSC Guru (175K reputation)SSC Guru (175K reputation)

Group: General Forum Members
Points: 175235 Visits: 18671
sa_11 (12/13/2010)
J.O. (12/13/2010)
I usually create a role and grant execute permissions to that role then assign a user to that role.
+1

+1

Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Learn Extended Events

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search