web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Reducing CRM (on premise) Database size that is too big

(0) ShareShare
ReportReport
Posted on by 5

Hello,

I am looking for a way to reduce the size of the crm database which is too large.

Here is the size of the table in my crm database :

size-awal.png

I have tried deleting attachments via bulk deletion but it failed due to sql timeout.

bulk-delete-1.PNG

bulk-delete-2.PNG

I tried through bulk data updater but also failed due to sql timeout.

then I have also tried deleting data in the AsyncOperationBase table following this guide,

support.microsoft.com/.../performance-is-slow-if-the-asyncoperationbase-table-becomes-too-large-in-microsoft-dynamics-crm-334a0738-e132-1ea7-cab3-7fd68cb823a4

the number of rows has been reduced by half, but the size remains the same.

size-after.PNG

Is there any way to avoid timeout during bulk delete or bulk update or any other way to reduce my crm db size?

  • Alaa Ramadan Profile Picture
    4,130 on at
    Hi, 
    You may want to limit your criteria to a specific year, then its completed change the year and try again.
     
    I'm trying to do the same thing, my CRM DB size is 1.6 TB due to the large number of attachments within email messages.
    What criteria are you using within the bulk deletion? 
    Appreciate your reply.
  • Suggested answer
    Pedro Cadavez de Freitas Profile Picture
    Microsoft Employee on at
    Your bulk delete on annotation seems failing because the initial query to "gather" all the records needs to respect a 2 min timeout.
    Make a new bulk delete that only uses a small date first, like select just a specific month of attachments.
     
    Regarding async, it is weird only 200k rows are grabbing 60gb of data.
     
    That is probably some specific workflows that handle attachments that are on failed status, or whatever other status.
     
    there are some ways on SQL side to understand which rows are taking more space but i would advise to search as i haven't touched the topic for ages.

    You start with checking this query on asyncoperationbase:
     
    select top 10 len(Data) as size,*  from asyncoperationBase where Data is not Null order by size desc
     
    The above query might give you some ideas on what rows on async have a huge amount of a data on DATA column, and then you look at the name column and try to bulk delete those workflows with that name and see the outcome.
     

     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 93 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 71

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 54 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans