Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

syntax to remove permissions previously granted via GRANT EXECUTE?

Tags:

tsql

If I grant execute permissions to a role via

GRANT EXECUTE ON [DBO].[MYPROC] TO MY_ROLE

what's the equivalent syntax to remove them?

like image 743
Eric Avatar asked Oct 30 '08 15:10

Eric


3 Answers

REVOKE EXECUTE ON [DBO].[MYPROC] TO MY_ROLE

like image 170
mathieu Avatar answered Oct 21 '22 22:10

mathieu


DENY EXECUTE ON [DBO].[MYPROC] TO MY_ROLE

or

REVOKE EXECUTE ON [DBO].[MYPROC] TO MY_ROLE

depending on your goal. The first acts as a filter for any granted permissions, the second removes an explict permission.

like image 43
Godeke Avatar answered Oct 21 '22 21:10

Godeke


DENY EXECUTE ON [DBO].[MYPROC] TO MY_ROLE
like image 1
Marcus King Avatar answered Oct 21 '22 21:10

Marcus King