tbMFVaultSettings

Description

Configuration table for connection settings used by integration procedures.

The table holds one row: the M-Files user the connector signs in as, the encrypted password, the server address, the vault, the protocol, the port and the authentication type. Every procedure that calls M-Files reads it through fnMFVaultSettings, which joins the row with the protocol and authentication values and the vault GUID from MFSettings into the @VaultSettings string the CLR procedures take. When this row is wrong, nothing in the connector can reach the vault.

The vault GUID and the M-Files web address are not in this table. They are the VaultGUID and ServerURL rows of MFSettings.

Columns

ID (int, identity, primary key)

Row ID.

Username (nvarchar(128))

M-Files user, or Windows user for authentication type 3, that the connector signs in as.

Password (nvarchar(128))

The user’s password, encrypted with spMFEncrypt. The column never holds the password as plain text; see Changing the settings.

NetworkAddress (nvarchar(128))

Host name or IP address of the M-Files server as reachable from SQL Server: the bare host, without https:// or a path (for a New Cloud vault, <vault>.cloudvault.m-files.com).

VaultName (nvarchar(128))

Vault name. The connector finds the vault by MFSettings.VaultGUID first and by this name when the GUID does not match a vault on the server.

MFProtocolType_ID (int, foreign key to MFProtocolType.ID)

1 TCP/IP, 2 SPX, 3 Local Procedure Call, 4 HTTPS, 5 gRPC. New Cloud vaults use 5, Classic Cloud vaults 4.

Endpoint (int)

Port for the connection, for example 2266 for TCP/IP on premises and 443 for a cloud vault.

MFAuthenticationType_ID (int, foreign key to MFAuthenticationType.ID)

1 Unknown, 2 Current Windows User, 3 Specific Windows User, 4 M-Files User.

Domain (nvarchar(128))

Windows domain for Windows authentication.

The values each authentication type uses are listed on spMFsettingsForVaultUpdate.

Changing the settings

Change the row with spMFsettingsForVaultUpdate, passing only the values that change. The procedure encrypts the password with spMFEncrypt before it stores it. Do not update the Password column directly: the trigger tMFVaultSettings_Password runs after any update of that column and reads the new value with spMFDecrypt, so it expects an encrypted value.

EXEC dbo.spMFSettingsForVaultUpdate @Password = N'<vault password>';

Every install and upgrade runs the script 30.901.script.VaultSettings.sql, which calls spMFSettingsForVaultUpdate with the values entered in the installer: user name, network address, vault name, protocol, port, authentication type and domain, and the password when spMFDecrypt already exists. An upgrade therefore replaces the stored settings with the installer’s values. Check the row after every install or upgrade.

When the vault sign-in fails

  1. Read the row without the password value:

    SELECT Username, NetworkAddress, VaultName, ProtocolType, Endpoint, AuthenticationType,
           PasswordIsNull = CASE WHEN [Password] IS NULL THEN 1 ELSE 0 END,
           PasswordLength = LEN([Password])
    FROM dbo.MFvwVaultSettings;
    
  2. Check that the protocol and port match the vault (gRPC and 443 for New Cloud, HTTPS for Classic Cloud, the server’s protocol and port on premises) and that the network address is a bare host name.

  3. If spMFDecrypt fails with “Length of the data to decrypt is invalid”, or the password is NULL or empty, the stored value is not a valid encrypted password. Enter the password again with spMFSettingsForVaultUpdate @Password.

  4. If the assemblies were installed or reloaded by hand or out of order, run spMFUpdateAssemblies to completion first, then enter the password again.

  5. Test with spMFVaultConnectionTest.

Usage

  • Consumed by connection and integration procedures that accept @VaultSettings

Changelog

  • 2026-11-16 AC - Describe the columns, password storage, how to change the settings and the sign-in checks

  • 2025-08-23 LC - Add rST documentation