Hi all,
I am looking for any SQL scripts that have been successfully used to clean out any of the tables regarding the workflows, workflow log, process sessions, system jobs etc.
I am currently working with a MS Support resource on my issues posted here: https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/384261/crm-2015-sql-deadlocks-on-processsessionbase-table
Ive enabled the trace logs and ran the SQL Profiler. The MS resource currently has copies of these items and said he will investigate on his own time, but for now I am trying my best to clean out these tables associated to workflows or processes.
The first step he wanted me to make is cleaning out AsyncOperation table like here: https://support.microsoft.com/en-us/help/968520/performance-is-slow-if-the-asyncoperationbase-table-becomes-too-large I did this and there are only 6878 records left as Failed or Completed, which is fine i think.
I currently have a bulk delete operation cleaning out ProcessSessionBase table, but at the rate its going it might take another week to delete 1076851 records. Id love to find away around the bulk delete job to make this quicker!
Another thing I noticed was 3120932 records under the WorflowLogBase table.
My main goal is to find anything stuck in a "In Progress" or "Waiting" type status to see if thats whats causing all my deadlocks. Cleaning out any of the completed records shouldn't hurt either.
Any help is much appreiciated!