search cancel

need assistance with user audit

book

Article ID: 190623

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

SQL query for login info for the last 90 days

Environment

Release : 12.6, 13

Component : CA Harvest Software Change Manager

Resolution

You can try
SELECT HARAUDITLOGVIEW.AUDITEVENTOBJID, 
HARAUDITLOGVIEW.ACTIONNAME, 
HARAUDITLOGVIEW.SUCCESSFAILURE, 
EVENTTIME, 
HARAUDITLOGVIEW.USERNAME 
FROM HARAUDITLOGVIEW 
WHERE HARAUDITLOGVIEW.ACTIONNAME = 'Login user' 
AND EVENTTIME >=DATEADD(DAY, -90, GETDATE())

Or for some specific user

SELECT HARAUDITLOGVIEW.AUDITEVENTOBJID, 
HARAUDITLOGVIEW.ACTIONNAME, 
HARAUDITLOGVIEW.SUCCESSFAILURE, 
EVENTTIME, 
HARAUDITLOGVIEW.USERNAME 
FROM HARAUDITLOGVIEW 
WHERE HARAUDITLOGVIEW.ACTIONNAME = 'Login user' 
AND HARAUDITLOGVIEW.USERNAME = 'BobS' And EVENTTIME >=DATEADD(DAY, -90, GETDATE())