Question:
I cannot figure out how to determine if a Domain/UserID is in a Windows Group for a SQL Server database that has Windows Authentication.
Details:
I have tried searching for days how to do this and figure I must be phrasing it wrong in search engines to find the answer. I am hoping someone here can help =).
I have a SQL Server (2k) that has 3 user groups set up that "point?" to it. If I go into Enterprise Manager and click on the Security folder -> Logins, I can see the groups.
For example, here is one group:
Name: Tier1_User
Type: Windows Group
Server Access: Permit
Default Database: MyDatabase
The database uses Windows Authentication. I am using VB.net and I know how to get the Domain/UserID that the user is logged in with.
What I cannot figure out is how to determine if the Domain/UserID is in the Windows Group. I have found a Win32 statement that can pull in the group, but as yet found nothing about users in the groups.
If anyone has code, SQL, or information to point me in the right direction I would really apreciate it ;-).
Thanks,
Joel
I cannot figure out how to determine if a Domain/UserID is in a Windows Group for a SQL Server database that has Windows Authentication.
Details:
I have tried searching for days how to do this and figure I must be phrasing it wrong in search engines to find the answer. I am hoping someone here can help =).
I have a SQL Server (2k) that has 3 user groups set up that "point?" to it. If I go into Enterprise Manager and click on the Security folder -> Logins, I can see the groups.
For example, here is one group:
Name: Tier1_User
Type: Windows Group
Server Access: Permit
Default Database: MyDatabase
The database uses Windows Authentication. I am using VB.net and I know how to get the Domain/UserID that the user is logged in with.
What I cannot figure out is how to determine if the Domain/UserID is in the Windows Group. I have found a Win32 statement that can pull in the group, but as yet found nothing about users in the groups.
If anyone has code, SQL, or information to point me in the right direction I would really apreciate it ;-).
Thanks,
Joel