Disabled SA user is listed as logged in I was looking for the last time users have been logged into the system and saw SA as being used. Strange is that SA is disabled by default and not used on our systems. How is that possible, what am I missing?
Here is the code used to list users:
SELECT login_name [Login] , MAX(login_time) AS [Last Login Time]
FROM sys.dm_exec_sessions
GROUP BY login_name;
And here is the SA listed as disabled and as logged in:

Thanks.
This is because some &quot;system&quot; session are showing &quot;sa&quot; as the username.
I think you can add a
where is_user_process = 1

in your query to exclude those system session and you should no longer see &quot;sa&quot; as a connected user.