The function is called “Get-NAVServerSessions”, so with an extra s at the end. It read all properties from the active session table, and also adds the tenant id for each database.
In Microsoft Dynamics NAV you can fire a function whenever something changes within your session (and from NAV 2016 this is even easier with the new Event model), however there is not an easy way to know what is happening in other sessions. Sometimes you would like to know what has happened since your last read, without reading everything again, e.g. when you need to pass a large dataset to a Control Add-in.
Have seen many of the forum users are posting question on how to find active user sessions in an instance of Microsoft SQL Database Engine.
In order to get the current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine, we can use the “sp_who2” SQL stored procedure.
Finally! How many hours have I spent debugging sessions without UI with MESSAGEs and ERRORs… The good old days.
If you have done that, like me, then you will probably agree that it was not the most elegant way of finding the source of the problem. Have you ever forgotten to delete a funny MESSAGE after a session debugging with that method and had the client bring it up? I know I have.
Understanding and Configuring Session Timeout
When you start the Microsoft Dynamics NAV Windows client or the Microsoft Dynamics NAV Web client, a connection is established with the Microsoft Dynamics NAV Server instance, and a corresponding session is added on Microsoft Dynamics NAV Server.