Posted By

rengber on 05/06/07


Tagged

sql script security


Versions (?)

Script to Create a Script Granting EXECUTE to all Stored Procs in a DB


 / Published in: SQL
 

URL: http://www.geekzilla.co.uk/View2356DC3A-9F53-4A95-9849-C4518B8E1F92.htm

  1. DECLARE @User varchar(50)
  2. SELECT @User = 'UserOrRole'
  3.  
  4. SELECT
  5. 'GRANT EXEC ON ' + name + ' TO ' + @User
  6. FROM
  7. sysobjects
  8. WHERE
  9. type = 'P'
  10. AND category = 0

Report this snippet  

You need to login to post a comment.