Hello.
For some reason the CRM database has grown to 60GB due to dbo.workflowlogbase - have notice Process sessions - with Status Reason = Failed to be over 5000+ all seem to be failed real-time workflows.
When am running a total Record count for the WorkflowlogBase SQL Script, receiving 3072577 Failed Records and 50736 succeeded Records which I like to delete.
However when run Advanced find - System Jobs with Status Reason = Failed it's only showing up 420 records and not 3072577 records.
What is the best and way to delete the total count failed records of 3072577 from the crm 2016 sp1 on premise?
The disk usage by top tables are dbo.workflowlogbase at 28GB and dbo.processSessionBase 16GB - dbo.attachment 14GB.
Ideally I like to delete all failed and completed recodes for both dbo.workflowlogbase and dbo.processsessionbase and all 2 years older dbo.attachment email attchments.
Am I able to do this within CRM? if not please provide the SQL script.
Many thanks,
PJ