SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DBgroup membership of a ADuser member of an ADgroup declared as DBuser


DBgroup membership of a ADuser member of an ADgroup declared as DBuser

Author
Message
Jose Manuel Fuentes
Jose Manuel Fuentes
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 85
Hi all.
We are migrating an application from SQL2000 to SQL2005 and changing the authentication mode from SQL to windows integrated.
The application accepts SSI credentials, but behaves wrong because need to know the role membership of the user to show the menus.
Seems to use sp_helpuser to know the DBrole for the DBuser,
select suser_name() returns the ADuser name but the ADuser being member of an ADgroup declared as DBuser returns nothing when using sp_helpuser.
If we give sp_helpuser the ADgroup name, returns the needed value in the GroupName column.

So, is there any way to know the ADgroup membership for a ADuser?

The application vendor wants me to declare manually each ADuser as login, DBuser and DBrole member!!!!

Any idea would be appreciated.
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (24K reputation)

Group: Moderators
Points: 24732 Visits: 1917
With the nesting of AD groups I've seen flaky behavior using such methods. One workaround that we've used is to take the Windows groups and make them members of the appropriate database roles and then look against the database roles themselves.

K. Brian Kelley
@‌kbriankelley
Jose Manuel Fuentes
Jose Manuel Fuentes
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 85
Hi Brian. thank you for your reply.

We have done that you suggest. The active directory groups are members of the database roles, but we only have the user credentials. How can we query the roles if we have not the name of the active directory group?
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (24K reputation)

Group: Moderators
Points: 24732 Visits: 1917
Use the IS_MEMBER() function.

K. Brian Kelley
@‌kbriankelley
Jose Manuel Fuentes
Jose Manuel Fuentes
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 85
Thank you, I'll try and tell you somethig about.
Jose Manuel Fuentes
Jose Manuel Fuentes
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 85
Hi Brian.

IS_MEMBER() is like magic for my eyes!!

THEY will not have more excuse....

I'll try do someone to reprogram something to use it and cross my fingers to have the program modified instead do the things in the bad way.

Thanks a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search