spMFCheckLicenseStatus
Summary
Validates the license for a given internal procedure’s module. Caches the encrypted
license in dbo.MFModule
, logs progress to process-batch tables, and writes
warnings/errors to dbo.MFLog
.
- Parameters
- @InternalProcedureName
Default = ‘spMFGetClass’
Procedure whose module license is validated (looked up in setup.MFSQLObjectsControl.Name)
- @ProcedureName
Default = ‘spMFCheckLicenseStatus’
Used for logging context
- @ProcedureStep
Default = ‘Validate connection ‘
Used for logging context
- @ExpiryNotification
Default = 30
Reserved: days before expiry to trigger notification (not currently used)
- @IsLicenseUpdate
Default = 0
Set to 1 to force a license refresh (drops dbo.MFModule), e.g. after installing a new license file
- @ProcessBatch_id (optional, output)
Process-batch identifier used in logging; created/updated by this procedure
- @Debug (optional)
Default = 0
1 = Standard Debug Mode. Shows additional licensing information
Purpose
Validates the license for a specific internal procedure (by module). The license is managed by the Vault Application Framework and is cached locally for performance.
Additional Info
- The license is checked against the M-Files Server at most once every 24 hours (unless
forced) using the last-checked timestamp embedded in the cached license.
A local cache table dbo.MFModule stores the encrypted license and last-checked time.
- Warnings (90003) and errors (90004) are logged to dbo.MFLog. Process logging is written
via spMFProcessBatch_Upsert and spMFProcessBatchDetail_Insert.
Examples
Check the license for the default internal procedure
DECLARE @rc int;
EXEC @rc = dbo.spMFCheckLicenseStatus @Debug = 0;
SELECT @rc;
Verbose output for a specific internal procedure
DECLARE @rc int;
EXEC @rc = dbo.spMFCheckLicenseStatus
@InternalProcedureName = N'spMFGetClass',
@Debug = 1;
SELECT @rc;
Force a license refresh after installing a new license in the Vault App
EXEC dbo.spMFCheckLicenseStatus
@IsLicenseUpdate = 1,
@Debug = 1;
Changelog
Date |
Author |
Description |
2025-05-27 |
LC |
Reduce logging of processbatchdetail |
2024-12-13 |
LC |
Fix bug with getting last check date and calculating hours, add debugging |
2022-11-25 |
LC |
Improve logging and outcome messages |
2021-03-15 |
LC |
Set default schema for MFmodule |
2021-01-06 |
LC |
Debug module 2 license |
2020-12-31 |
LC |
Update message for license expired |
2020-12-05 |
LC |
Rework core logic and introduce new supporting procedure |
2020-12-03 |
LC |
Improve error messages when license is invalid |
2020-12-03 |
LC |
Set additional defaults |
2020-06-19 |
LC |
Set module to 1 when null or 0 |
2019-10-25 |
LC |
Improve messaging, resolve license check bug |
2019-09-21 |
LC |
Parameterise overide to check license on new license install |
2019-09-20 |
LC |
Parameterise email notification, send only 1 email a day |
2019-09-15 |
LC |
Check MFServer for license once day |
2019-09-15 |
LC |
Modify procedure to include expiry notification |
2019-09-15 |
LC |
Redo licensing logic, only update license every 10 days |
2018-07-09 |
LC |
Change name of MFModule table to MFLicenseModule |
2019-01-19 |
LC |
Add return values |
2017-04-06 |
DEV2 |
Create license check procedure |