Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the SQL User name and not the NT user name

Status
Not open for further replies.

latwv

Programmer
Nov 19, 2001
16
US
I have nt authentication going on for SQL Server 2000 with Win 2000 server. I have NT User user1 in NT Group group1 and I have a sqluser called domain\group1 which is authenticated for nt group group1. I want a function that brings me back 'domain\group1' when I am logged in as user1. User_Name, User, Current_User and every other user function I could find returns 'domain\user1'

Please help
Thanks in advance.
Lori
 

Here is a query that returns the NT Groups that the current user is a member of.

Select LoginName As NTGroupName
from master.dbo.syslogins
Where IS_MEMBER(loginname)=1 Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top