The MAXSESSION table unmasked
barbara.ballard 060000G9E4 Visits (2395)
When debugging a problem or when looking to recycle a JVM, it is useful to know which users are logged onto the system and what JVM they are working on. If a JVM needs to be recycled, you could then notify the users on that JVM that they will get an interruption in service. Or when debugging a problem it is useful to know what a user was doing on a particular JVM that was experiencing difficulties. If you know when a problem occurred and what users were logged into the JVM at that time, it helps narrow the potential pool of users considerably. So how can you figure this out? Enter the MAXSESSION table.
The MAXSESSION table is used to track connected servers and users. Every active or inactive user and server on the system has an entry in the MAXSESSION table.
When a user logs in or an application server starts, an entry is made in the MAXSESSION table. The column ISSYSTEM column has a 1 if it is an instance of a server (JVM) that is connected and a 0 if it is a user that is connected.
When a user logs out, their entry is cleared from the MAXSESSION table.
For a user the lastactivity field is updated whenever they do any activity
in the system. Inactive users can be detected when the last activity timestamp
is not current.
When a user is closes a session abnormally (for example not using
the normal Sign Out button but by clicking the X button of an IE window ), that user's session is not deleted from MAXSESSION until the
specified session timeout is reached.
The same is true if some type of error occurs that causes the session to end abnormally.
You can set the system property mxe.
When you understand the function of the MAXSESSION table, it is easy to create queries to pull out the data that you need to diagnose problems or understand who is working on the system.