Tuesday, 26 May 2009

Grant Permissions to run all stored procedures

An update on a previous post.

This version includes table schema and uses information_schema.routines rather than sysobjects.

select 'GRANT EXECUTE ON [' + specific_schema + '].['+routine_name+'] TO [LoginName]'
from information_schema.routines
where routine_type = 'procedure'

No comments: