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
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!
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,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156