Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Crm 2016 on premise : Error deleting Audit logs partition

(0) ShareShare
ReportReport
Posted on by 20

Hi

I am using DeleteAuditDataRequest to delete audit log partitions. 

and I receive following Fault exception. Failed to delete audit data from one or more of the specified partitions

Event viewer gives following details: Failed to drop Partition on AuditBase. Exception message ALTER TABLE SWITCH statement failed. Source and target partitions have different values for the DATA_COMPRESSION option.

Also tried using UI to delete the audit partition. but got same error.

Appreciate your help on this.

*This post is locked for comments

  • Suggested answer
    JVorbeck Profile Picture
    JVorbeck 70 on at
    RE: Crm 2016 on premise : Error deleting Audit logs partition

    Hi Karan, I dont know if you ever got your problem resolved. I had the same issue and to get the delete to work I had to logon to the SQL DB in SSMS. Browse to the database associated with your CRM Organization. Expand it and expand the Tables. Find dbo.AuditBase. Right click it and choose storage and then manage compression. The compression wizard will launch. Under select compression type put a checkbox next to "Use same compression type for all partitions" and then from the selection box choose "NONE". Finish the wizard. 

    It takes a little while and tasks the SQL server a lot so if you're a busy organization this may be best performed after hours. When complete you will be able to use the UI to delete the audit partitions. It seems that Dynamics creates a partition with no compression so switching to it fails with the error. I find it strange that I never turned on compression so it seems like a default, yet it doesn't work.

    Good luck!

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans