Tag Archives: active users

Find active users in NAV using SQL

Here is a simple query to discover who are the users that are currently connected to your Dynamics NAV instance using SQL Server Management Studio:

USE DatabaseName
GO
SELECT [User ID],[Client Computer Name],[Login Datetime] from [Active Session]

This will return you the user ID, computer name and the login time of the user. You can use * instead if you want to get all the data:

SELECT * from [Active Session]

You can also add a where clause if you are looking for something specific in an instance with large user count, for example:

USE DatabaseName
GO
SELECT [User ID],[Client Computer Name],[Login Datetime] from [Active Session]
WHERE [User ID] LIKE ‘%john%’

Michael

 

Find out who is connected to AX and from which computer

Here is a very simple query you can run against your Business Database to find out who are the users that have an active sessions in AX:

SELECT DISTINCT USERID, CLIENTCOMPUTER FROM SYSCLIENTSESSIONS WHERE STATUS = 1

This table has some more useful info that you can extract so you can tune the query for your own use.

use SELECT * from SYSCLIENTSESSIONS to see the whole table.

** This works for AX 2009 /2012