Hi experts,
One of my customer is using Business Central online. Their change log table has grown too much like 165 million entries. No we need to remove these entries. I have tried running a report but in 2 hours it just removes around 2 million. Is there any quick way to remove the entries?
Also Is there a way to increase SQL command timeout in Business Central Online?
Thanks
Lots of good suggestions here. One other idea would be to schedule a Job Queue Entry to run every hour, and have it delete a specified number of records. It would take a week or 2, but it would not require a lot of user or developer time.
If you had it do 1 million every hour, you would be done in 1 week. 500,000 per hour would take 2 weeks.
Hi,
You can refer the Retention Policy page to provide your table and on regular interval system will automatic delete those table's data. You can also customize that page if you want to apply retention policy on your custom table.
Hi, Microsoft provides the following standard method, Data Administration page. i think you can try.
https://yzhums.com/15246/
And, we once submitted an SR to Microsoft to ask him to modify the SQL command timeout time. If you really want to modify it, you can try similar operations.
Hope this helps.
Thanks.
ZHU
Thanks @gian for your suggestion
hello, you can take a look at this page for inspiration.
4 Ways To Delete Records From a Table - Business Central Deep Dive (navinsights.net)
my advice is to set the keys correctly to filter quickly the records to be deleted, and set a counter that every fixed interval (e.g. 10000 records, 100000 records) does the commit, so as not to lose what has been done and avoid rollbacks at timeout.
Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,
Gian
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156