Search code examples
sqlsql-serverstored-proceduresaltersql-grant

Does grant ALTER imply grant EXECUTE to a SQL Server stored procedure


I want a database user to have ALTER and EXECUTE permissions to a stored procedure. Do I need to grant those separately, or does granting ALTER allow the user to EXECUTE also?

e.g.

GRANT ALTER ON [STOREDPROC] TO [SP_USER];

GRANT EXECUTE ON [STOREDPROC] TO [SP_USER];

or just:

GRANT ALTER ON [STOREDPROC] TO [SP_USER];

(does ALTER imply EXECUTE?)

Thanks!


Solution

  • The short answer is: no, ALTER does not imply EXECUTE.

    Slightly longer answer: there's a chart that says what permissions imply other permissions. Check it out!

    https://msdn.microsoft.com/en-us/library/ms188371.aspx