TechBrothersIT is the blog spot and a video (Youtube) Channel to learn and share Information, scenarios, real time examples about SQL Server, Transact-SQL (TSQL), SQL Server Database Administration (SQL DBA), Business Intelligence (BI), SQL Server Integration Services (SSIS), SQL Server Reporting Services (SSRS), Data Warehouse (DWH) Concepts, Microsoft Dynamics AX, Microsoft Dynamics Lifecycle Services and all other different Microsoft Technologies.
Sometime a user comes to you and ask you that he does not have permission on some table. You start checking if that user has required permission on object but you do not see user account but AD group added as User in your database but you are not sure if User is part of this AD group. To Find out quickly the members of AD Group we use below statement.
EXEC master.dbo.xp_logininfo 'DomainName\GroupName', 'members' xp_logininfo also can be use to find out what Windows group a particular window user is member of. EXEC master.dbo.xp_logininfo 'DomainName\UserName'