
SQL DBA Tools: Sudden Performance Drops via Parameter Sniffing
August 6, 2026

When troubleshooting Windows authentication and permission issues, xp_logininfo allows you to quickly identify what Active Directory groups a user belongs to — and how those memberships translate into SQL Server permissions.
When working as a SQL Server DBA, troubleshooting Windows authentication and permission issues is a common task. One of the most useful tools to rely on is the xp_logininfo extended stored procedure.
Instead of manually digging through Active Directory (AD), xp_logininfo allows you to quickly identify what AD groups a user belongs to — and how those memberships translate into SQL Server permissions.
Managing access through Active Directory groups is significantly more efficient than handling individual user permissions. In most organizations, users frequently join and leave teams. By assigning access to AD groups instead of individuals:
xp_logininfo is an extended stored procedure in SQL Server that returns information about Windows users and groups, including their associated SQL Server login privileges.
It is particularly useful for:
EXEC xp_logininfo 'DOMAINNAME\USER', 'all';This command returns all permission paths for a user, including the AD groups that grant access to SQL Server.
EXEC xp_logininfo 'DOMAINNAME\AD GROUP NAME', 'members';This shows all members within the specified AD group — but only if that group exists as a login in SQL Server.
xp_logininfo
[ [ @acctname = ] 'account_name' ]
[ , [ @option = ] 'all' | 'members' ]
[ , [ @privilege = ] variable_name OUTPUT ]To execute xp_logininfo, you must have one of the following:
Need help managing SQL Server security? Datazip provides expert DBA services and 24/7 monitoring. Call 1-833-DATAZIP or visit www.SQLBrainBox.com.
Datazip provides 24/7 managed backup monitoring, encryption, and Azure Recovery Vault setup. US-based engineers, fluent in T-SQL.