web analytics

Oracle: who is connected to the server

Here is the simple query, showing who is connected to the server.

col username FOR a15 col program FOR a25 trun SELECT sid, serial#, username, program, SUBSTR(module,1,10) module, logon_time FROM v$session ORDER BY 1,2;

This is almost the same query, limiting the output to the active users:

SELECT sid, serial#, username, program, SUBSTR(module,1,10) module, logon_time […]

WMI: list of the methods and properties

strComputer = "." Set objWMIService=GetObject("winmgmts:{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2")   For Each objclass in objWMIService.SubclassesOf()     intCounter=0     If Left(objClass.Path_.Class,5) = "Win32" Then         For Each Qualifier in objClass.Qualifiers_             If UCase(Trim(Qualifier.Name)) = "ASSOCIATION" Then                 intCounter = […]