bschelst/ May 15, 2019/ Uncategorized/ 0 comments

You can use the T-SQL code below within your database to give permissions to ‘MYUSER’ for viewing all stored procedures. (of course, replace “MYUSER” with your own user)

Once executed, you can copy and paste the output to a new query window an execute it.

select 'GRANT VIEW DEFINITION ON ' + quotename(specific_schema) 
+ '.' + quotename(specific_name)
+ ' TO ' + 'MYUSER'
  from INFORMATION_SCHEMA.routines
where routine_type = 'PROCEDURE'
Share this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*

eighteen − 12 =