Showing posts with label membership. Show all posts
Showing posts with label membership. Show all posts

Friday, February 24, 2012

Accessing Windows Users assigned to a database role

Is there a way to find a list of Windows User accounts that are directly or indirectly (through Windows Group membership) assigned to a database role?
I could put work in to CLR programming or using a Linked Server to Active Directory, but if there is a sys.* view available that can provide me this information directly it would be much easier.
I'll be looking into this further myself anyway and posting an answer if I can find one, but if anyone has suggestions... well, thanks!

Hi,

guess not, but if you have one ready, feel free to post it to me, I will bring it online on my soon launched site www.sqlserver2005.de

HTH, jens Suessmeyer.

Accessing Users & Members in Active Directory via Linked Server

Hi,

I'm trying to extract all the users and their membership to groups, and the membership of groups to groups from active directory though a link to server.

I can get the users. I can get the groups.... individually.

I can't get the info of what user is a member of or who are members of a group.

Anyone know how to do this or am I going to have to right a vb app? (Anyone already got the code...)

I want to load this data into tables for reporting in my Data Warehouse.

Cheers

Chris

Take a look at the following API:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netgroupgetusers.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netlocalgroupgetmembers.asp

Follow the links from the bottom of the articles for other related API.

Hope this helps.

Laurentiu