HOW TO: Manage Your Dynamics 365 Database Size (Video Included)

   Words by CRM Consultancy

   on 24/08/2021 13:20:00

Black White Shapes and Widgets Tips and Tricks YouTube Thumbnail


Recently you may have started to receive emails from the Microsoft Power Platform that read something like this “Immediate action required: Out of database capacity”. This means that you have exceeded your quota for storage in Dynamics 365. This is a combination of all the instances that sit in your organisation e.g., live and sandbox. We will be looking at how we can reduce this storage.

STEP 1 - First, you want to navigate to the Power Platform admin centre. Where you will be able to see a breakdown of your instances and their storage. https://admin.powerplatform.microsoft.com/resources/capacity#summary

image


STEP 2 - Navigate to the Dataverse tab and click on the details section to see a breakdown of which entities are taking up the most storage.

Capture


STEP 3 - Here we can see a graph, which shows us the main entities taking up storage and how they’ve been growing over the last month.

image

Nine times out of ten ‘ASyncOperationBase’ is the main culprit for taking up storage. Every workflow job and system job will have been logged against the ‘ASyncOperationBase’ at some point and if you retain jobs that are flagged as succeeded, failed, waiting errored etc. then the size of this entity will continue to grow. Using bulk delete jobs we can easily clear a lot of this space.

STEP 4 - By Navigating to Advanced Settings > Data Management > Bulk Record Deletion we can set up a few recurring jobs that will clear the initial chunk of data and continue to maintain the storage size. The entities we’re going to look at clearing are the following:

  • Process Sessions
  • System Jobs
  • Traces

There are a few options when setting up these jobs. We can decide to only remove succeeded jobs, jobs that are older than a certain timeframe etc. If you’re storage is way over the limit, then I’d suggest remove all records older than a certain timeframe e.g., a month. If you’re storage still has some wiggle room, then only succeeded jobs might be better suited to you. Every environment is different so only use parameters you are comfortable with.

Here is an example of a bulk delete job for Process Sessions. This would remove any system jobs that were created more than a month ago.

image

STEP 5 - I can then decide when to run this job and if I want this to be a reoccurring job. Again, this is down to preference but setting up a reoccurring job would mean the ‘ASyncOperationBase’ would maintain itself moving forward. It’s then a similar process for System Jobs & Traces.

image

STEP 6 - If you’ve been using Dynamics for a few years and you’ve never run these types of jobs before then you can expect some big numbers, sometimes in the millions. You can keep an eye on the number of records being deleted by using the In-Progress Bulk Deletion System Jobs view.

image

It may take a few days for the records to be deleted and to update the Power Platform Admin Centre, but this should take a considerable chunk out of the Database storage.

STEP 7 - Another big contributor to storage can be the audit logs. Again – these are very simple to clear but you don’t have much choice over what you remove. Auditing is broken down into quarterly partitions and these can be found by going to Settings > Auditing > Audit Log Management. Each partition will hold every auditing change for that period. We can’t choose the entities we want to remove the auditing from, It’s all or nothing. We suggest implementing a retention policy where you decide anything older than x amount of time can be removed. We might want to only keep audit logs for the past 12 months so in this case we’d remove audit logs number 1 – 12.

image


To remove a partition, we simply highlight a record and click “Delete Logs”.

Capture1

PLEASE NOTE: This is a very manual process and can’t be setup automatically. If we decide the retention policy is 12 months then someone would have to come into this view each quarter and remove the oldest partition.

        
   



Further Reading

Visit the CRMCS Blog for all ‘How To Guides’ and Technical Articles

If you have any more questions for CRMCS please use our contact form or email us directly at contact@crmcs.co.uk



Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

Release Wave 2 New Feature: The Columns Button HOW TO: Search a date field in Microsoft Dynamics The Relevance Search COMING SOON to Power Apps Portals HOW TO: Manage Your Dynamics 365 Database Size (Video Included) Dynamics 365 Marketing vs ClickDimensions It’s time to pause, reflect and acknowledge a new era of inclusivity and collaboration. Part 2 - How to get the most from a Technology Expert – Asset Management Hub Property & Asset Management Hub Part 1 – Balancing CRM and Asset Management Scopes - Asset Management Hub Creating a Multi-Lingual PowerApps Portal How to Set Up a Microsoft Teams Site Using DocDrive365 Microsoft Teams - Adding a Microsoft Teams URL to a Dynamics Appointment Dynamics 365 Marketing – Customer Voice Survey Not Appearing In Emails? Using SQL Management Studio to connect to the Dynamics DB Calling a Power Platform AI Builder Model via oData How to use DocDrive365 to integrate permissions between Business Units in Dynamics with Sites in SharePoint Getting started with the Power Platform AI Builder. Power Apps Portal Information Hub DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Part 5 - Power Apps Portals: How To Connect Azure B2C With Linked-In Part 4 – Power Apps Portals: Styling Azure B2C for Power Apps Portals The 3 Phases for Using Multi-Select Option Sets in Flow with Microsoft Forms Part 3 – PowerApps Portals: Azure B2C and Power Apps Portals – User Flow for Signup and Signin Part 2 - Power Apps Portals: New Application Registration in Azure B2C for our Power Apps Portal Part 1 – Power Apps Portals: Creating a New Azure AD B2C Tenant
Contact Us

Want expert advice or a demo?

Get in touch now and see how we can help your business grow.

  • Name
  • Email Address
  • Phone Number
 
Close

Understanding Your Challenges

Our strong understanding of CRM and emerging technologies within the Microsoft environment means we deliver the right solutions for you.

Proven Real-World Solutions

As a leader in the field of Dynamics solutions, our pedigree developing and delivering real-world solutions is unsurpassed.

Long Term Support

We provide support beyond our design, implementation and 'go-live' delivery using Sprints and continual updates to our AppSource apps.

CRMCS | Design by Thinktank Marketing | Citrus-Lime Limited

To improve your experience today and in the future, this site uses cookies. Read our full Privacy Policy & Cookie information here I Understand