Skip to content

Instantly share code, notes, and snippets.

@brainded
Created February 20, 2014 22:00
Show Gist options
  • Save brainded/9124178 to your computer and use it in GitHub Desktop.
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.
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