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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

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?

I have the same question (0)
  • Alaa Ramadan Profile Picture
    4,130 on at
    Reducing CRM (on premise) Database size that is too big
    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
    on at
    Reducing CRM (on premise) Database size that is too big
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 107 Super User 2025 Season 2

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 89

#3
#ManoVerse Profile Picture

#ManoVerse 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans