Updating settings

Procedures to inspect and update MFSQL Connector settings for vault and database configuration.

The settings can be updated by rerunning the installation packages.

Alternatively, procedures can be used:

  • Updating vault connection settings

  • Updating standard Connector settings

Check out the settings table

Select * from mfvaultsettings

Inspect the settings if there is a problem with the connection to the vault. Table MFVaultSettings show some settings but not all while MFSettings table show the other settings for the Connector and other structure tables need to be join to show all the related components of the vault settings. Use the view to show these relations.

SELECT * FROM MFvwVaultSettings

or use the function to provide vault connection settings string as an input for the Vaultsettings parameter used in the CLR procedures.

SELECT dbo.fnMFVaultSettings()

Update the settings using the dedicated procedure. Only the items requiring a change need to be included as parameters.

Update the M-Files user name

EXEC spMFSettingsForVaultUpdate @Username = 'Admin'

Change the password

EXEC spmfsettingsForVaultUpdate @Password = 'MotSys123'

Perform a connection test to confirm the changes were successful

DECLARE @MessageOut NVARCHAR(50);

EXEC dbo.spMFVaultConnectionTest @MessageOut = @MessageOut OUTPUT

SELECT @MessageOut

Other settings that can be reset with spMFSettingsForVaultUpdate include

  • @NetworkAddress

  • @Vaultname

  • @MFProtocolType_ID (default: 1)

  • @Endpoint (default: 2266)

  • @MFAuthenticationType_ID (default: 4)

  • @Domain

  • @VaultGUID

  • @ServerURL

The protocol type and authentication type are referenced in other tables

SELECT * FROM dbo.MFProtocolType AS mpt
SELECT * FROM dbo.MFAuthenticationType AS mat

To make changes to the other Connector settings:

DECLARE
@MFInstallationPath     nvarchar(128),
@MFilesVersion     nvarchar(128),
@AssemblyInstallationPath     nvarchar(128),
@SQLConnectorLogin     nvarchar(128),
@UserRole     nvarchar(128),
@SupportEmailAccount     nvarchar(128),
@EmailProfile     nvarchar(128),
@DetailLogging     nvarchar(128),
@DBName     nvarchar(128),
@RootFolder     nvarchar(128),
@FileTransferLocation     nvarchar(128),
@Debug     SMALLINT;

EXEC dbo.spMFSettingsForDBUpdate
   @MFInstallationPath = @MFInstallationPath,
   @MFilesVersion = @MFilesVersion,
   @AssemblyInstallationPath = @AssemblyInstallationPath,
   @SQLConnectorLogin = @SQLConnectorLogin,
   @UserRole = @UserRole,
   @SupportEmailAccount = @SupportEmailAccount,
   @EmailProfile = @EmailProfile,
   @DetailLogging = @DetailLogging,
   @DBName = @DBName,
   @RootFolder = @RootFolder,
   @FileTransferLocation = @FileTransferLocation,
   @Debug = @Debug