Wednesday, 14 May 2014

Getting list of stored procedures and granting execute to a user

Get a list of stored procedures
select SPECIFIC_NAME  from [database_name].information_schema.routines where routine_type = 'PROCEDURE'

Granting the permission to execute specific stored procedure
GRANT EXECUTE ON [_TextGet] TO [some_user]

Granting the permission to execute all stored procedures
GRANT EXEC TO [some_user]
GO

No comments:

Post a Comment