x
login about faq Site discussion (meta-askssc)

How to check login group of any member?

As I know we can check the members of any login group through command 'xp_logininfo 'mssqlSQL 2005', 'members'' similarly am looking command to find out login group for any member.

Example:Domain user 'mssqltest' that is related to Domain Group 'mssqlSQL 2005', SQL server have so many login group available so it is time taking to check member for all group and find related group for member so looking any command to find related group of member.

Solution could be on SQL command or OS command.

more ▼

asked Jul 05 '12 at 04:39 AM in Default

Amardeep gravatar image

Amardeep
1.3k 74 83 87

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

I am not sure what you are after, but should not the use of account_name and 'all' option gives the desired result?

EXEC xp_logininfo 'FullyQualifiedName', 'all'

From BOL

If account_name and all are specified, all permission paths for the Windows user or group are returned. If account_name is a member of multiple groups, all of which have been granted access to SQL Server, multiple rows are returned

more ▼

answered Jul 05 '12 at 05:46 AM

Usman Butt gravatar image

Usman Butt
13.8k 6 8 14

Thanks, It is giving desired results.

Jul 06 '12 at 05:40 AM Amardeep
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x73
x11
x1

asked: Jul 05 '12 at 04:39 AM

Seen: 823 times

Last Updated: Jul 06 '12 at 05:40 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.