web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Crm 2016 on premise : Error deleting Audit logs partition

(0) ShareShare
ReportReport
Posted on by 26

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

I have the same question (0)
  • Suggested answer
    JVorbeck Profile Picture
    70 on at

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans