MFSQL Validate <database> M-Files Version

Job Definition

  • Job name: MFSQL Validate <database> M-Files Version

  • Owner: sa (see Warnings - existing installs self-heal forward from the legacy MFSQLConnect owner)

  • Category: Database Maintenance

  • Schedule: Daily, disabled by default on install

  • Step: EXEC dbo.spMFCheckAndUpdateAssemblyVersion;

Integration Connector only.

Purpose

Daily fallback health check: reads the installed M-Files client version from the registry and, on a mismatch against MFSettings.MFVersion, reloads the CLR/Interop assemblies via spMFCheckAndUpdateAssemblyVersion which in turn calls spMFUpdateAssemblies. This is the fallback path - see WMI Update Alert (Integration Connector) for the primary, immediate-detection path.

Warnings

SQL Server Agent required. Skips cleanly (severity 10) on SQL Server Express. Job owner: the step delegates to spMFUpdateAssemblies, which requires sysadmin context (sp_configure 'clr enabled', ALTER DATABASE ... SET TRUSTWORTHY, CREATE ASSEMBLY UNSAFE, sp_changedbowner); the job is owned by sa for that reason. On existing installs where the job owner was the legacy MFSQLConnect login, re-running this script self-heals the owner to sa - an environment that has intentionally set a different sysadmin login as owner is left untouched.

Changelog

Date

Author

Description

2026-05-28

AC

Job owner changed from MFSQLConnect to sa so the step’s

sysadmin-only assembly reload can succeed; added idempotent owner self-heal for existing installs

2026-05-28

AC

Step-content self-heal: existing installs whose job step

body predates a script change are dropped and recreated automatically, keyed off a version marker

2026-05-27

AC

Add SQL Server Express edition guard

2026-05-06

AC

Reframe purpose: validate assembly health, not just

M-Files version

2020-02-08

LC

Set the job disabled by default; do not update it on

upgrade/reinstall if it already exists