I need a query that provides the current number of running instances of a client application.
The application is developed on VS2008 (.NET3.5, VB.NET) and accesses an Oracle 10g database via System.Data.OracleClient 22.214.171.124. Here the view SYS.V_$SESSION yields all I need to get the current number of running applications (which is the same as the number
of users logged in on each application instance).
I extended the application in order to access the database alternatively hosted on Sql Server 2008 R2 using System.Data.SqlClient 126.96.36.199. The view sys.dm_exec_sessions seems to be an equivalent to Oracles SYS.V_$SESSION but actually it is not!:
- Instead of the application name, sys.dm_exec_sessions.program_name yields ".Net SqlClient Data Provider" which is useless information.
- After a while all session information is gone although the application is still running.
View Complete Post