Sunday, October 31, 2010

Grant Execute Permission on all SP for a database

Following method can be used to create statement to grant Execute permission on all SP for a Database.

Use DatabaseName

select 'Grant Execute on [' + name + '] to [LoginName]'
from sysobjects where xtype in ('P')

No comments:

Post a Comment