ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

SDM: The Last Known Date that an End User Logged into Service Desk Web Interface


Article ID: 185819


Updated On:


CA Service Desk Manager SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service CA Service Desk Manager - Mobile Application CA Service Desk Manager - Xtraction


This article discusses a SQL Query that can be used to determine the last time a given user had logged into the SDM Web interface


Release : 17.1



The following query returns the last time that a given user had logged into Service Desk

select MAX( dateadd(S, [session_log].[login_time], '1970-01-01')),  [ca_contact].[userid]
FROM [mdb].[dbo].[session_log]
INNER JOIN [ca_contact] ON [session_log].[contact]=[ca_contact].[contact_uuid] 
group by [ca_contact].[userid]

The given time in the above query is UTC Timezone.

Additional Information

The above query would be executed direct on the SQL Server MDB database via SQL Server Management Studio.

Please be cautious when running any queries direct to the MDB database.  Improper execution may cause a lockout of the database for the Service Desk application.

Please make sure you have session logging enabled.  This article discusses how session logging may be disabled.