Generating GRANT statements because its quicker

Just a very quick post here, but sometimes when you wish to grant execute right for multiple stored procedures to a particular database user it is easier to simply run the following script in the respective database in order to generate this assignment script. This is far easier than using the 2005 and 2008 GUI interface (and even 2000/ 7) especially if there are a lot of procedures.

USE
SELECT ‘GRANT EXEC ON .’ + name + ‘ TO [user]‘ 
FROM sysobjects WHERE xtype = ‘P’ AND
This entry was posted in SQL, SQLServerPedia Syndication and tagged , , . Bookmark the permalink.