locked
Is there any quicker way to delete and Entity with millions of records RRS feed

  • Question

  • Hi, 

    I want to delete an entity which holds millions of records. I tried to delete it through UI and it times out after spending some time. Is there any quicker & possible way to get rid of this entity? 

    Friday, July 26, 2013 9:38 AM

All replies

  • Schedule a Bulk Record Deletion in Settings > Data Management
    Friday, July 26, 2013 9:41 AM
  • Schedule a Bulk Record Deletion in Settings > Data Management
    Bulk delete will take days to delete 90 million records.
    Friday, July 26, 2013 9:44 AM
  • Unsupported


    delete filteredcontact
    where createdon > '2008-08-10 20:45:00' and createdon < '2008-08-10 23:00:00'

    Regards Faisal

    Friday, July 26, 2013 9:49 AM
  • Unsupported


    delete filteredcontact
    where createdon > '2008-08-10 20:45:00' and createdon < '2008-08-10 23:00:00'

    Regards Faisal

    Thanks Faisal, 

    I don't want to use unsupported way of doing. So this is the limitation of CRM that we can't delete an Entity which holds so many records !!!

    Friday, July 26, 2013 12:41 PM
  • If you have CRM OnPremise, then you could try setting the OleDBTimeout to a very high value. Prior to this I'd ensure all security roles have no access to this entity, to prevent potential locks.

    The above is the best you can do in a supported way. Otherwise you could either run the bulk delete job (does it matter that it takes days to run ?), or go the unsupported route through SQL. The quickest unsupported option is to use truncate table on the extensionbase table, then the base table


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Friday, July 26, 2013 4:39 PM
    Moderator