Need to find out users' logon activities


 

Product

  
 Applies To 
  
 Product(s):eB Information Manager
 Version(s):15.x.x
 Environment: N/A
 Area: User
 Subarea: Logon
 Original Author:Dennis Chan, Bentley Product Advantage Team

Requirement:

Need to find out the logon activities of eB users.

Solution:

Run the following SQL statement directly against the eB database (e.g. using SQL Server management Studio). Note that the query will show any logon activity with the oldest audit records first. If there is no audit record for the person, the last access date will be '1/1/1753'. (Credit to Eric Rajala.)

select *

from (

select p.person_code, Max(oai.action_date) last_access_date

from object_audit_info oai

inner join audit_info_defs aid on oai.action_type = aid.action_type

and oai.object_type = aid.object_type

inner join persons p on oai.person_id = p.person_id

where oai.object_type = 116

and aid.name in ('Logged On', 'Logged Out', 'Failed Logon')

group by p.person_code

) _

union

select p.person_code, '1/1/1753' last_access_date

from persons p

order by _.last_access_date

Workaround:

N/A