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

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

book

Article ID: 185819

calendar_today

Updated On:

Products

CA IT Asset Manager CA IT Asset Manager Asset Portfolio Management CA Service Management - Asset Portfolio Management ASSET PORTFOLIO MGMT- SERVER CA Service Desk Manager CA Service Management - Service Desk Manager CA Service Catalog Process Automation Manager CA Process Automation Base

Issue/Introduction

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

Environment

Release : 17.1

Component : SERVICE DESK MANAGER

Resolution

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.