UK Dynamics 365 & PowerApps partner

How Do I Reduce Storage Space Use in Dynamics 365?

So, you’ve just had notification from Microsoft that your Dynamics storage is full. Not the best news!

There’s more details about what your immediate options are in our previous blog post – My Dynamics System is out of Storage Space – What Can I Do?

If you’ve chosen to reduce the data you’re storing, then you have three areas in Dynamics storage system where you can save space – Database, File and Log.

Reducing Dynamics 365 Database Storage

These recommendations involve deleting data in your system . It’s important that you understand what data is being deleted and the effect that will have. Restoring data is difficult in Dynamics

Look in Power Platform admin centre and note which tables are very large or growing in size quickly.

  • Log in to Power Platform
  • From the Resources menu select Capacity
  • Select the Dataverse tab and click the Details icon for your environment (see image)
Database capacity use by table

Here’s some of the tables which can become huge in your Dynamics system. For each table we’ve made some suggestions below.

  • Activity Pointer Base
  • AsyncOperationBase
  • WorkflowLogBase


The tools you’ll need

Many of the suggestions involve using a Bulk Delete or an Advanced Find.  We won’t go in to details here about how to use these features, as there are many guides on the web. 

How to Reduce Activity Pointer Base Size

The activity pointer (activity) table contains any activity or task that is performed, or to be performed by a user. You’ll notice each activity type also has a matching table (E-mail messages, Phone Calls etc). The data are synched between the matching tables, so if you delete a phone call entry from the Phone Call table, it will be deleted from the Activity table also.

Activities types include:

  • Appointment
  • CampaignActivity
  • CampaignResponse
  • Email
  • Fax
  • Letter
  • PhoneCall
  • RecurringAppointmentMaster
  • ServiceAppointment

To reduce the size of Activity Pointer Base, search for and delete any activities which aren’t relevant to your business. Set up a bulk delete to keep the size down in the future.

Here are some examples of what you can delete. Tailor it for your business and your retention policy

Email Activity Records

Often the largest consumer of storage space are email messages. You can find email messages with a search like this

Search for E-mail messages

There are many possible criteria to search for emails to delete

  • By sender or recipient
  • By subject (out of office / automatic reply)
  • By date

If you’ve previously deleted an email from your inbox (in Outlook for example) it will still exist in Dynamics. Likewise if you delete an email from Dynamics, it will not disappear from Outlook.

It’s good practice for users to regularly review their emails stored on Dynamics and delete any which are irrelevant (spam, personal emails etc)

As of May 2023 email body records are no longer being stored in the Dataverse, but have been moved permanently to an Azure blob storage system. This should free storage space and save money for most users. See Microsoft’s information about this

Phone Call Records
These records can also take up lots of space, depending on your business type. You can search for these in a similar way to email records.

Huge Indexes
If any of your activity views in Dynamics contain a description field, this will cause the index of the view to become large. Audit your views, remove any description fields and contact Microsoft to re-index.

If you’ve tried these ideas, and the size of Activity Pointer Base hasn’t decreased much, then you should contact Microsoft Support

How to Reduce AsyncOperationBase Size

The AsyncOperationBase table is used to store system jobs. System jobs represent asynchronous extensions, such as workflows and plug-ins, bulk deletion, bulk import, and rollup operations. 

Quick wins in AsyncOperationBase
In Dynamics open an Advanced Find and run a search similar to this

system jobs
This shows all the completed System Jobs older than 30 days, which either failed, succeeded or cancelled.

Microsoft recommend deleting all successfully completed system jobs which are older than 30 days

Jobs with other status reasons like Canceled, Failed or Waiting should be investigated before a bulk delete. You may well discover 1000s of waiting system jobs. Some will never finish because their criteria are impossible to meet, but some may be valid, and waiting on a criteria in the future. Be cautious

If you’re happy with deleting records, you can schedule this using a Bulk delete job.

More details and ideas on Microsoft’s Dynamics site

How to Reduce WorkflowLogBase Size

This table stores bulk email and workflow instances. In a similar way to the 2 tables above, you should search for and bulk delete specific system job records

bulk delete system jobs
Look for bulk email and workflow System Jobs and delete old, completed jobs.

How do I reduce file storage size in Dynamics 365?

The main consumer of file storage space in Dynamics are attachments, and in particular email attachments.

Do an advanced find (or modern advanced find) like below to get an idea of how many large emails are in your system and how large they are.

emails with large attachments
This shows all email messages with attachments over 100kb (approx.)

You can use search criteria to help find emails which are safe to delete:

  • By date
  • By sender
  • By recipient
  • By subject

Bear in mind that you’ll be deleting the attachment and the email record. Remember that these emails will not be deleted from your email program, usually Outlook

Remove attachments but keep email records
You might well find many emails with large attachments which you’d like to delete, but you’d like to keep a record of the conversation. We recommend a third-party product called Attachment Extractor from mscrm-addons.com. This add-on moves the attachments from your emails from Dynamics’ expensive storage to SharePoint, which is relatively cheap. There’s a cost calculator on their website.

Attachments in Notes

In a similar way to emails, you can search for notes with attachments to delete like this:

Reducing the size of AsyncOperation in Dynamics file storage

This table contains information about System Jobs, its storage is shared between the file storage and the database storage. To reduce the size of AsyncOperation, follow the steps for reducing the AsyncOperationBase size for database storage above

How do I reduce log file storage size in Dynamics 365?

The largest user of log file storage is Audit Logs.

The default setting for all tables (entities) is to audit all changes to values across all fields, and to keep the logs forever. You can see how these logs will quickly balloon.

Delete audit logs by date

  • Go to the Power Platform admin centre
  • Choose the environment with the large log file storage
  • In the auditing section, click Delete audit logs (nothing will be deleted just yet)
Power Platform admin > delete audit logs

Select All logs up to and including the selected date and enter a date.

The logs will be scheduled for deletion. To see the progress, in Dynamics 365, go to
Settings > Data Management > Bulk Deletion to see the status of your job

Once you have deleted this date range, you might want to enforce a policy of not keeping audit logs older than a certain time period.

To retain logs for a fixed time period only

  • Go to the Power Platform admin centre
  • Choose the environment with the large log file storage
  • In the auditing section, click Manage
  • You can now choose how long you’d like to retain logs for in the future
Change log retention period - Dynamics

Save space by deleting audit logs by table

You’ll most likely want to audit changes to your main business tables (entities) like contacts, opportunities, and invoices, but there are usually many more tables which may not need auditing. You need to make a business decision about which entities you can stop logging on, and which are needed.

View which table are adding to excessive log size

  • In dynamics 365 go to Advanced Settings > Auditing > Audit Summary View
  • Look at the last few pages of logs and see if you can find a table that is showing lots of audit log records.
  • You can filter by that table and if you’re confident, you can delete all logs from that table
View audit logs

To delete audit logs by table

  • Go to the Power Platform admin centre
  • Choose the environment with the large log file storage
  • In the auditing section, click Delete audit logs (nothing will be deleted just yet)
  • Choose by table and then select the table you’d like to remove audit logs for

To turn audit logging off by entity, in Dynamics 365, go to

  • Advanced Settings > Data Management > Customisations ( or via solutions)
  • Click the table you’d like to turn auditing off for
  • In the Data Services section, uncheck Auditing
Turn off auditing
Twitter
LinkedIn
📆 Last update: April 17, 2024

Get the latest articles sent to your inbox

Never more than weekly. No spam, ever.