Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Delete Audit Logs using SQL query or Adapters

(0) ShareShare
ReportReport
Posted on by 242

Hello Experts ,

I came across a scenario where i need to do data cleaning activity on CRM 2013. As first step i checked Audit log in CRM but it didn't  display any log at first. 

when I execute data size report on SQL DB it displayed a huge amount of disk space consumed in Auditbase table keeping all  the logs since 2015 till  to-day.

How can I purge this data (without burning hands :) ) using a SQL query or KingswaySoft Adapter.

Thanks. 

*This post is locked for comments

  • Suggested answer
    SergeyT Profile Picture
    SergeyT 310 on at
    RE: Delete Audit Logs using SQL query or Adapters

    You can try to execute DeleteAuditData request. More details and example here: docs.microsoft.com/.../gg327533(v%3Dcrm.8)

    If you see nothing in 'Audit Log Management' it can be caused by moving DB between SQL enterprise and non-enterprise edition. The difference is that enterprise version supports table partitioning.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 1,019 Super User 2025 Season 1 on at
    RE: Delete Audit Logs using SQL query or Adapters

    Hi Deepak Gaur,

    You can TRUNCATE the AuditBase table. This will increase the amount of available space by a large margin, but it will remove the entire contents of your Audit logs.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans