Our PFE colleague in Norway Ritesh Ranjan recently published the following article on his blog. We are cross-posting here for your reading pleasure!

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.



Do this

View all alerts Go to Sales > Alerts.
  • To delete all alerts at once, click or tap the Delete all alerts icon on the alerts wall.
  • To view just errors, warnings, or information, click or tap Errors, Warnings, or Information respectively.

If you are also synchronizing appointments, contacts, and tasks through server-side synchronization, you’ll see alerts for the following:

  • When one or more duplicate records are found in Microsoft Dynamics 365 when saving a record from Exchange to Microsoft Dynamics 365.
  • When a scheduling conflict is found when saving an appointment from Exchange to Microsoft Dynamics 365 because a mailbox is unavailable at the time.
  • When previously linked items are found for a specific mailbox.

You’ll be prompted to take actions on the errors about the appointment, contacts, and tasks synchronization.


View alerts specific to mailbox


  1. Go to Settings > Email Configuration.
  2. Click Mailboxes.
  3. Open a mailbox record, and on the left navigation bar, under Common, click or tap Alerts.


View alerts specific to an email server profile


  1. Go to Settings > Email Configuration.
  2. Click Email Server Profiles.
  3. Open an email server profile record, and on the left navigation bar, under Common, click or tap Alerts.



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.