Microsoft Dynamics AX Session Types
Microsoft Dynamics AX Session Types:
Following database components are responsible for persisting and managing the session information in the database:
- SysServerSessions table – This table is used to manage the AOS instances. Each running AOS in an installation has a row in this table with the STATUS column equal to 1.
- SysClientSessions table – This table is used to manage the various client sessions connected to different AOS servers. Each client session has a row in this table with the STATUS column equal to 1.
- CREATESERVERSESSIONS stored procedure – This stored procedure is used to populate the SysServerSessions table. This stored procedure is invoked during the startup of an AOS server.
- CREATEUSERSESSIONS stored procedure – This stored procedure is used to populate the SysClientSessions table. This stored procedure is invoked each time a client is launched.
- Session type – This column is used to provide information on the client type. The following client types are valid client types in Dynamics Ax.
- User – This corresponds to the rich client (Ax32.exe). For each rich client instance that is running there will be a row in this tab representing that client with this user type.
- Business Connector – This is used to represent the session that is established when the Logon or LogonAs methods are called using the Business Connector (BC).
- Worker – This session type is overloaded to represent different session types but it is primarily seen in the context of the Business Connector. When BC is used to connect to an AOS, 2 sessions are initially created. The Worker session type corresponds to the main session that is used to represent the BC process. Each time a Logon related method is called a Business Connector session is created, when LogOff is called then the Business Connector session type is removed from the AOS memory and in the database. But the Worker session will be present as long as the BC process is active. This is the reason why there are at 2 sessions shown in the Online users form when connecting using BC.
- Web user – This session type corresponds to an Enterprise Portal (EP) session which is created when using a web browser. EP uses BC as the underlying infrastructure to connect to the AOS so you will see a corresponding Business Connector session in the Online users form. The Business Connector session that is created when using EP is actually a Worker session inside the AOS but it is represented as a Business Connector session in the database because of the way licenses are counted for EP sessions. I will provide more details about the number of licenses consumed for different session types in a later post. One thing to note is that the web user sessions are transient in nature because EP uses session caching and the web user sessions have a very short lifetime as they often map to web page based requests.
- Impersonated session – This session type is created when using the RunAs method in X++.
- Status – This represents the status of the client session. Currently the only value that this column shows is “Running” which represents an active client.
- SPIDs – This column give you the SPID of the connection currently being used by that client. The Ax server uses a connection pool where connections are given to a session on an on-demand basis from a cache. One consequence of this functionality is that if you might not see any SPID for a particular session at that instant if that session is not executing a SQL statement. SPIDS are valuable to troubleshoot database deadlock issues and you can use the functionality provided by the “End Sessions” button to terminate any blocking user. There are various tools available to troubleshoot deadlocks and investigate database blocking issues but I will address that in greater detail in a separate post.
Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here. https://www.pageview.com/ For true fans of this thread I will address is a free online!
ReplyDeletei Want to see AX Client SPID reference SPID's in SQL(Are both same?), Please help me understand
ReplyDeletehow to bring running status in online user session, now its shows inactive. how to active please suggest
ReplyDelete