Is Dynamics CRM (On-Premise as well as Online) Server-Side Sync filling up your ORG_MSCRM database and you wonder why?
Well, if you are wondering, looking at the TraceLogBase table size, that there is a problem with the Dynamics CRM Server-Side Sync, then I would say ‘NO’. There is no problem with the product but the fact that you might have ignored the fact that you are capturing all the logs, Information, Warnings & Errors!
Dynamics CRM Server-Side Sync allows you to capture logs which could help in troubleshooting any issues with users mailboxes in regards to the Server-Side Sync. The alerts are shown on the Alerts wall or the Alerts section in the mailbox or email server profile records.
The following table shows how to view the alerts and the actions you can take on these alerts.
|View all alerts||
Go to Sales > Alerts.
You’ll be prompted to take actions on the errors about the appointment, contacts, and tasks synchronization.
|View alerts specific to mailbox||
|View alerts specific to an email server profile||
Now I believe you would have got an idea on what is going wrong and once you decide to uncheck the Check Boxes for Warnings and Information those data would not be captured thereafter. However, you still need to clean the database with these unwanted data, isn’t it? So, you could use the Bulk Delete Job to clean the data like this.
- Login to Dynamics CRM Application as an administrator and then navigate to Settings-->Data Management
- Then click on Bulk Record Deletion
- Click on New-->Click on Next.
- In ‘Look For’, select Traces
- Select Level and then make sure to select set it Equals to Information and Warning
- Click on Ok
Then select the Regarding Object Type (In my example, I was dealing with a lot of data in regards to the Email Server Profile and Mailboxes).
Give this view a name and save it for future usage. If you wish you could also remove or add a few columns to select your data precisely.
Note: please make sure to start this job during off peak hours and schedule it to run during off peak hours only if the data set is huge. You can start and stop the job manually or schedule it too.
Also, you should always take the backup of the ORG_MSCRM database before making any changes.
In this case while working with my customer, cleaning up their database we could around delete 2 billion records, which was almost 80-90% of the total volume of data in the TraceLogBase table. However, you might encounter a problem that while deleting these many records you might would like to add more filters so that you don’t get any SQL Timeouts.
However, if you still can’t overcome the SQL Timeout errors with this then please work with Microsoft Support Team on this for further assistance.
Hope this helps and please do share your comments or feedbacks.