MFSQL Delete History for <database>

Job Definition

  • Job name: MFSQL Delete History for <database>

  • Owner: MFSQLConnect

  • Category: Database Maintenance

  • Schedule: Monthly, disabled by default on install

  • Step: deletes history older than 90 days via spMFDeleteHistory

Purpose

Deletes rows older than 90 days from MFLog, MFUpdateHistory, MFProcessBatchDetail, and MFProcessBatch via spMFDeleteHistory. Not enabled by default - enable the schedule manually after install if automatic history pruning is wanted.

Warnings

SQL Server Agent required. On SQL Server Express (no SQL Server Agent) this script skips cleanly (severity 10) and the job is not created; call spMFDeleteHistory manually or via an external scheduler instead.

Changelog

Date

Author

Description

2026-05-27

AC

Add SQL Server Express edition guard - skip job creation

cleanly where no SQL Agent is present

2021-12-15

LC

Only update the job if it does not already exist

2019-08-01

LC

Fix bug setting the job name to include the database name.

An old job from a prior release must be removed manually.