List all sessions from current user I connect to SQL Server with a given user that is not an administrator. I want to get a list of all my open connections. I've found endless commands to do so but all fall in one of those categories:


I'm not allowed to run that command:


  Msg 297, Level 16, State 1, Line 1
  The user does not have permission to perform this action.

I only see my current session!


Is it possible to list all sessions from current user?
You need to have VIEW SERVER STATE permission on the user account.

GRANT VIEW SERVER STATE TO &lt;username&gt;;


This will need to be granted by someone with sufficient privileges and will allow you to view all sessions when you run commands like sp_who or sp_whoisactive.

If you are worried about security implications of this permission, this post may help Security and Performance implications of &quot;View Server State&quot;

Once you have the permissions to view server state, you can then restrict you just your user by passing that in as a parameter

EXEC sp_who [Domain\mark.sinkinson];
EXEC sp_whoisactive @filter_type = 'login', @filter = [Domain\mark.sinkinson];