How do I identify the oldest record in the ChangeAuditor Database without running a report (147327)

Title

How do I identify the oldest record in the ChangeAuditor Database without running a report

Description

A Change Auditor Administrator may wish to find the oldest record in the Change Auditor database, however, running a report that would return all events would take too much time and resources because of the high number of records in the database.

Resolution

The following SQL script, executed in SQL Management Studio will return the date of the oldest record:

Select MIN(AET.TimeDetected)

FROM dbo.AuditEvent AS AET WITH(NOLOCK) WHERE AET._id IN (

SELECT _id FROM AuditEvent_IX_SeverityID WITH(NOLOCK)

where [_date_hh] = (

SELECT MIN([_date_hh])

FROM AuditEvent_IX_SeverityID WITH (NOLOCK)

)

)

STATUS:

Enhancement request number TF00430513 has been submitted to Development to consider adding this feature in a future release of Change Auditor