To help further elucidate my problem, take a look at this SQL:
I'm joining syslogins to sysprocesses. When I've logged in with an SQL authenticated login or a windows authenticated login that corresponds to a single windows user, I get the same value in both columns. When I've logged in with a windows authenticated login that corresponds to a windows user group, my SystemLoginName column is NULL.Code:SELECT sl.name AS SystemLoginName, sp.loginame AS ProcessLoginName FROM master..syslogins sl RIGHT JOIN master..sysprocesses sp ON sl.sid = sp.sid WHERE sp.spid = @@SPID
sysprocesses.sid usually points to a row in syslogins but not in this specific case. Presumably because each user must have a unique ID. But then how can I trace back which login my process relates to?





Reply With Quote