Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Change Log Entries clean up

(0) ShareShare
ReportReport
Posted on by 233

Hi,

We have a client that was badly guided when they moved from Nav to Business Central SaaS.

They configured their change log setup to track almost every changes in the system and made a modification to prevent deleting entries or running the retention policy

We are now at a point where they have over 385M records in the change log entry table and the size of their database is huge, creating capacity issues when creating a sandbox from production.

I am trying to help them clean them up but everything we try, it ends up in the server timing out.

We tried different retention policy to delete a month a time, starting from the oldest entries

We also tried using the Change Log - Delete option int the Data Administration page

A process only report, filtering on the entry no. field

Everything times out and ends up failing.

What else can we try?

-Julie

  • Suggested answer
    Suraj Vekaria Profile Picture
    Suraj Vekaria 4 on at
    Change Log Entries clean up
    I have been tasked with the following to delete the Change Log. The No. of records in the Change Log is sitting at 97 million currently. Taking up around 39GB of space. 
     
     
    The maximum records BC will delete at once is 10,000 records. 
    By clicking the Apply Manually - you see a message 
     
    Thats the message you will see.
     
    I have setup a Job Queue with the following parameters and letting it run 24 hours. Once I have proved this is working in the sandbox, I will narrow starting time and ending time and leave it running overnight. The following parameters was through trial and error and seems to be sweet spot of allowing the job to run continuously. So far so good, the record number are coming down. I'm opting for this option due the fact it's a built-in functionality and if there was any related table this would capture and deleted them.  
     
     
    The No. of records is coming down. So, this will take few days. 
     
     
     
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,723 Super User 2024 Season 2 on at
    RE: Change Log Entries clean up

    Or make a small tool to delete 10M records each time, so that all can be deleted after 30 manual operations.

    If there is no developer, Valentin's suggestion is better.

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Valentin Castravet Profile Picture
    Valentin Castravet 25,066 Super User 2024 Season 2 on at
    RE: Change Log Entries clean up

    try making the date range shorter until it doesn't time out. You said you tried a month, try 1 day. If that doesn't time out increase it to 2 days, 3 days, and so on. If it times out, then make it even shorter. What you can then do is create a job queue with a CU that takes something along the lines of 30 seconds to run. Then setup this job queue to run every minute. The date range of entries being deleted in that 30 seconds is very small, but because the job queue is recurring eventually it will delete them all.

    I had the same issue and the only way I managed to get it to not time out was to make the date range short. 

    Maybe other users will have different ideas...

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,684 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,414 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans