June 18, 2008 at 1:20 pm
theres an app that uses a db i manage. for simplicity lets say there are two logins, a group called AdminUsers and stdusers.
StandardUsers have basic privilges, AdminUsers have everything.
both logins are actually active directory groups.
when i run a trace, the NTUserName is the actual alias of the user in quetion, but not one of the logins mentioned above. I can easily find the username using suser_Name() but how do i find out what group/login the user is associated with?
June 18, 2008 at 8:31 pm
Check out the IS_MEMBER() function in books on line. If you know what explicit groups you want to check for, this will do it.
If you need an actual list of groups associated with a user/login, that may be harder...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 19, 2008 at 5:14 am
is member is perfect. im playing with resource governor and want to write a classifier UDF. this should work nicely. thanks a mil.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply