How to query list of logged in users?(No more running PSADX outside)

1 minute read time.

You may have used PSADX system command outside of Enterprise management to determine the classic sessions and list of users , in this blog post I like to show, how that was done prior to V11 and what changed in V11 and what is the replacement. 

So prior to V11 one could use below instructions in Application server to get a listing of all logged users in classic session. 

For prior to V11:

  1. Remote in to the application server. 
  2. Open a command line( preferably run as Administrator)
  3. Change your directory to runtime\bin  



  4. Run env.bat to set the environmental variables.



  5. Enter psadx -agix 


Notice that by running psadx -agix you will get same information that you would have seen by visiting Function PSADX under Development, Utilities, Verifications, System Monitor, Users. 

But the above steps does not work on V11 because how we manage session has changed on V11. 

Before I get to the steps that can be used for V11 please review online help page titled "Manage sessions information"




So in order to determine the list of users in Enterprise management there are two ways. One is using code as it is explained in the online help and one can be done by running a query in SQL server

For V11 and using code (as an example):

  1. Open Development, Script dictionary, Scripts, Script editor. 
  2. Create a new file name and enter below. 



  3. In the above example SEED is the name of the folder and by compiling and running the above code I would have below. ( it shows admin and admca are logged in)




Another option for V11 to run a query in SQL:

So for those of you who quickly want to find out the session you can just simply run below in SQL.

Select * from X3.ASYSSMDBASSO X3SM1 Join X3.ASYSSMINTERN X3SM0 on X3SM1.SESSIONID_0 = X3SM0.SESSIONID_0
join sys.dm_exec_connections VDS On VDS.session_id = convert(integer, X3SM1.DBIDENT1_0) and VDS.connect_time = convert( datetime, X3SM1.DBIDENT2_0, 121 )

Conclusion: You have different options to get the listing of your connected users.  

  • Hello, nice stuff! Does the ASESSION script have any other routines? I need to implement concurrency on a table (I want to delete data associated to sessions that no longer exist). USER_LISTE gives you the user list but not the SESSIONID or whatever, and I cannot fetch data from ASYSSMINTERN since it's on the X3 folder and not the production one.