Local Dad Amazes Users with Active Session Table!

Local Dad Amazes Users with Active Session Table!

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.

Trending Posts

Stay Informed

Choose Your Preferences
First Name
*required
Last Name
*required
Email
*required
Subscription Options
Your Privacy is Guaranteed