Re: getting a list of groups a specific user belongs to in sql server 2000
From: Tim Garrod (TGarrod5_at_hotmail.com)
Date: 14 Oct 2003 14:24:29 -0700
Try taking a look at xp_logininfo. I had the same issue with a SQL
Server 7 database, where login permissions were dictated by the users
NT groups, and I needed to determine where the permissions were being
The mapped login name should provide you with the groups being used by
the user passed in.
Exec xp_logininfo 'domain\username'
"SriSamp" <firstname.lastname@example.org> wrote in message news:<O$pe2JlkDHA.688@TK2MSFTNGP10.phx.gbl>...
> If you are looking at determining which Windows groups a user is belonging
> to, that information can be fetched from your domain (for example Active
> Directory). To know what database roles a user is part of, check out
> Please reply to the whole group only!
> "Bas" <email@example.com> wrote in message
> > I need to know if there is a way in Microsoft SQL Server 2000 to
> > determine which Windows groups a user belongs to if logging into the
> > database under Windows Authentication. I am making a tool to view all
> > permissions of a user, but since most permissions are granted through
> > groups here, I need to find an efficient way to look this up.
> > Thanks in advance,
> > Bas