videoAdministration & Setupofficial - Microsoftreviewed - checked by Opus

Use Retention Policies to Avoid Unnecessary Database Growth

Retention policies in Business Central let administrators trim activity logging and archiving tables to avoid unnecessary database growth. The video demos enabling a default policy on the job queue log entry table and using filters to set different retention periods for failed and successful entries.

  1. 0:00 Introduction to retention policies
  2. 0:23 Default retention policies and job queue example
  3. 0:43 Configuring retention period and filtering records
  4. 1:03 Setting retention for failed and successful job queue entries
  5. 1:23 Enabling the retention policy
  6. 1:44 Summary and benefits
video Microsoft Dynamics 365 Business Central (YouTube) · 2023-12-13Watch on YouTube

Overview

The video explains that some Business Central tables are meant for activity logging and archiving, and that keeping them trimmed prevents unnecessary database growth. It shows the default retention policies that ship with the product and notes that each policy must be enabled by the user.

Using the job queue log entry table as an example, it sets a retention period and applies filters so failed entries are kept for 5 days and successful entries get a separate period. Once enabled, the policy continuously deletes data older than the retention period. The video presents this as a way to reduce database cost and help performance.

Key points

  • Business Central ships default retention policies, but none are enforced until you enable the ones you want.
  • Retention policies are meant for activity logging and archiving tables, such as the job queue log entries table.
  • To apply different retention periods to subsets of records, deselect the ‘apply to all records’ setting and define a policy for each subset.
  • The demo keeps failed job queue log entries for 5 days so people have time to analyze errors, and successful entries for only 2 days.
  • After a policy is enabled, it continuously deletes data once each retention period has passed.
  • Stated benefits are lower database cost and better performance.

Features

Every feature below: status not stated, demoed.

Feature At
Retention Policies 0:00
Default Retention Policies 0:23
Filtered Retention Policies 0:43

AL objects mentioned

As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.

Not found in BC28-30: table “job CU log entry”.

Quotes

  • 0:00 “some tables in business Central are intended for activity logging And archiving it’s a good idea to keep these tables trimmed so you don’t”
  • 0:23 “here you see the default retention policies provided with business Central it’s up to you to enable the policies you want enforced”
  • 0:43 “I don’t want to store all data in this table for one month it depends depends on if the job queue has failed or”
  • 0:43 “so I I deselect the apply to all records setting let me Define the policies for the subsets of this table”
  • 1:03 “I want to keep failed job queue log entries for 5 days I want to allow people some reaction time so that they can”
  • 1:23 “I can enable this retention policy and this will now continuously make sure that data in the job key log entry is deleted after”
  • 1:44 “save your database cost and do a good thing for performance use for policies”