Skip to content

Local Dad Amazes Users with Active Session Table!

ArcherPoint’s technical staff pose questions, find answers, and share new discorveries about Microsoft Dynamics NAV

Today I had an issue with a customer. They’d run out of user licenses, and it was a mystery as to why. They actually had more concurrent user licenses than they needed, so that wasn’t it. We looked into the Active Session table to see what might be going on.

In Microsoft Dynamics NAV 2013, the Active Session table shows you everyone who’s logged in to the database. You can access it by running the debugger from the development environment, or by going to Administration > IT Administration > General > Tasks > Sessions.

Note: For legacy versions of NAV (2009 R2 and before), there’s a Session virtual table that does something similar.

I actually had trouble figuring out what was going on with this, so I called one of my esteemed colleagues who knows more about SQL than I do. He helped me run the Active Session table in SQL Server, and this led to an interesting discovery. (Why didn’t we look at the sessions in NAV natively? Well, there weren’t any spare sessions for us to use, so we couldn’t get into NAV. Thankfully, we could still run some SQL queries to examine the issue.)

When we ran a SQL query to show the Active Session table, I noticed something weird: there were some sessions that had a login date that was weeks (or even months) in the past. Long enough that we’d restarted SQL a few times since those dates, so I knew something was weird. As it turns out, there is a little quirk in NAV 2013 that we’d stumbled across.

The database we were working with had been restored from a native NAV database backup made a few weeks prior, and when that backup had been restored, the Active Session table had been restored along with everything else—complete with some open sessions! Once we figured this out, we managed to delete the sessions, and everyone could get into the system again. So, be careful with your restored databases; you may have to clear out Active Session manually or risk permanently locking a concurrent user license.

I’ve heard some questions about how to kill idle sessions in NAV 2013, and you can do it by adding an action to the Session List page to run the STOPSESSION command for the selected session. Credit for this should go to Olof Simren and his excellent article about adding the action found on his blog, Kill Sessions in Dynamics NAV. I found this while I was trying to fix the customer’s issue, and it didn’t help me—it only works if you can get into NAV. I did go ahead and add it for the customer, however; it’s a quick and easy change to make.

Video Game Update

And finally, because it’s the most popular feature in my blog updates, I’ll mention what’s going on with video games I’m playing. I recently downloaded Castlevania: The Dracula X Chronicles for my Vita. I mostly bought it because it included the all-time PlayStation classic Castlevania: Symphony of the Night. I do have to lodge a complaint, though. For some reason, they re-dubbed all the voices from the original SotN with a new translation and redone voice acting. This is crazy! The original is a so-bad-it’s-good classic, while the new translation is just there. (Thankfully, the gameplay is untouched and it’s still a blast to explore the huge castle.)

If you have any further questions about this or other development issues, contact one of our development experts at ArcherPoint. If you enjoyed this blog, you might like to read more of Tom Hunt’s blogs, or check out our collection of Development Blogs.

Blog Tags: 


PBA's picture


I was investigating a similar situation in NAV 5.0. The customer had 26 licensed users and usually had 30-32 logged users at the same time. The IT department needed to kill session 30-50 times a day. The reason more users were able to log in than were licensed users was because when a logged in user gets timed out of his session, the session is killed but he still has an open NAV Client. Meanwhile, another user was able to log in. When the first user gets back into the system, a new session is created and that is how we get +1 user than licensed. From this point, it is very easy to create a solution which lets your customer use his license in 100% without login problems and without losing the IT guy's time.

PBA's picture


I forgot to add that if IT guys were killing user sessions manually then sometimes NAV was posting shipments without lines but with all ledger entries. 


I definitely wouldn't recommend killing off sessions that have been open for just a few minutes, but it can be helpful when you've got a session that's been open and idle for days. 

Read ArcherPoint's Blog Follow us on Twitter Follow us on Facebook Follow us on LinkedIn Link to our RSS feed Join us on Google+ Watch us on YouTube