Created
October 30, 2014 14:06
-
-
Save ademar/dcb5cd2fdd832fc34baa to your computer and use it in GitHub Desktop.
Generate GRANT statements for stored procedures (SQL Server 2000)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @User varchar(50) | |
SELECT @User = 'myuser' | |
SELECT | |
'GRANT EXEC ON ' + name + ' TO ' + @User | |
FROM | |
sysobjects | |
WHERE | |
type = 'P' | |
AND category = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment