Created
February 20, 2014 22:00
-
-
Save brainded/9124178 to your computer and use it in GitHub Desktop.
Get a list of Stored Procedures a user has rights to in TSQL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Database | |
go | |
execute as user = 'Some_User' | |
go | |
select has_perms_by_name('p', 'OBJECT', 'execute') as HasRights, name from sys.procedures | |
go | |
revert --This will discontinue the above EXECUTE AS to stop you from impersonating Some_User |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment