We are using a SQL Login as a vehicle for issuing permissions, but once authenticated through SQL, we'd still like to know the Active Directory name of the connected user?
We've tried:
SELECT SUSER_NAME()
SELECT SUSER_SNAME()
SELECT SUSER_SID()
SELECT USER_NAME()
SELECT USER_ID()
SELECT SYSTEM_USER
SELECT SESSION_USER
SELECT ORIGINAL_LOGIN()
Is that information still available somewhere?
Note: This is different from how to get windows user login name from sql server since we're using SQL Login, not a Windows Login to connect to SQL Server