Discover How User Is Accessing SQL Instance (PowerShell and T-SQL)

ben himself's picture

When your security gets unruly, it can get time consuming to figure out how a user is accessing a SQL instance. Sometimes you may know that a user is getting access via one certain AD group but you aren't sure if any other groups are granting access. Furthermore, a user might be in a group that's nested in another group, through which they are gaining access to your SQL instance.


SQL Server – Find Stored Procedures User Can Access

ben himself's picture

Returns a report that has information about user permissions for an object, or statement permissions, in the current database.

To find stored procedures that “username” can access:

exec sp_helprotect @username = 'username'

To see all objects in database and who has access:

exec sp_helprotect

For complete capabilities see



Subscribe to RSS - security