Identifying examples in the archiver
Hi
I wanted to demo what it does at the moment. I wondered if there was a flag in the analytics database that I can use to track down examples so I can demo what they look like in the portal.
I can try reducing retention so the archived outnumber those that are current but I wondered if there was another way? Possibly something that will come later
Best Answer
-
Justin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
Hi @Sean_Terry - This query against CiresonAnalytics will get you the incidents that are older than your retention period as configured in Administration -> Settings -> Retention Settings in the SCSM console:
DECLARE @RetentionTime int = 40;
DECLARE @RetentionWindow datetime = dateadd(day, -@RetentionTime, getdate());
SELECT amo.Name
FROM Archive_Managed_Object amo
WHERE amo.ManagedTypeId = 'a604b942-4c7b-2fb2-28dc-61dc6f465c68' --incident
AND JSON_VALUE(amo.ObjectDefinition, '$.ClosedDate') < @RetentionWindow
You can replace the 40 with your retention period.
0
Answers
Hi @Sean_Terry - This query against CiresonAnalytics will get you the incidents that are older than your retention period as configured in Administration -> Settings -> Retention Settings in the SCSM console:
DECLARE @RetentionTime int = 40;
DECLARE @RetentionWindow datetime = dateadd(day, -@RetentionTime, getdate());
SELECT amo.Name
FROM Archive_Managed_Object amo
WHERE amo.ManagedTypeId = 'a604b942-4c7b-2fb2-28dc-61dc6f465c68' --incident
AND JSON_VALUE(amo.ObjectDefinition, '$.ClosedDate') < @RetentionWindow
You can replace the 40 with your retention period.