When checking out who has what permissions to a SQL Server or database you often see that BUILTIN\Administrators has sysadmins. To quickly find out the membership of the group run this bit of code:
EXEC xp_logininfo 'BUILTIN\Administrators' ,'members'
This piece of code is ideal for a Snippet.
Comments
Post a Comment