Monday, January 19, 2015

grant the permission to execute (use) a sproc to a particular role

IF OBJECT_ID(N'dbo.UpdateElephants') IS NULL
BEGIN
   EXECUTE('CREATE PROCEDURE [dbo].[UpdateElephants] AS RETURN 0')
      GRANT EXECUTE ON [dbo].UpdateElephants TO [Tusker]
END
GO

No comments:

Post a Comment