Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Best practice: deleting 30 Million annotation records

(0) ShareShare
ReportReport
Posted on by 480

We are planing to delete 30 Million annotation records from our production DB. For that we wrote the SP to update the deletionstatuscode=2 and and hand over to crm system to delete it from there end.

Is this this the right way to delete the records from CRM?

How log will it take to perform this update task?

while doing async delete by crm service what time and cpu resources will get consumed?

will CRM async service will take care for use of CPU resource?

*This post is locked for comments

  • Suggested answer
    Hosk Profile Picture
    Hosk on at
    RE: Best practice: deleting 30 Million annotation records

    updating records directly on the database is unsupported and if it goes wrong Microsoft will only offer limited support.  Sometimes the system updates other related records and tables, if you do this by directly on the DB this will not happen and you could find the database is in an odd state, which might cause problems later.

    I would not advise doing this, particularly when you can do this over a number of nights using bulk delete

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Best practice: deleting 30 Million annotation records

    I would strongly advise you do not update the database directly in this (or any other) way.

    If you change the deletionstatuscode, the Deletion Service will try to delete these records and clean up after them (eg removing unnecessary rows from POA), and you have no control over how long that will take or any means to stop it if it overruns into production hours.

    Use Bulk Delete to do this, in chunks as others have suggested. Time a good sized chunk and check the impact of the async job doing the Bulk Delete and the deletion service cleaning up afterwards.

  • Suggested answer
    Bruno Lucas Profile Picture
    Bruno Lucas 5,421 on at
    RE: Best practice: deleting 30 Million annotation records

    Bulkdelete is the best approach.

    msdn.microsoft.com/.../gg334418.aspx

    maybe you can create 1 reoccurring bulkdelete job and find a query that will break it in chunks so it can run on a time that will not interfere with production.

  • Suggested answer
    Royal King Profile Picture
    Royal King 27,686 on at
    RE: Best practice: deleting 30 Million annotation records

    I would create  multiple bulk delete job with created on date of record to group deletion based on like created on year  to delete these many records and let system take care of all the resource handling.

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! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans