spMFsettingsForVaultUpdate

Signature

EXEC dbo.spMFsettingsForVaultUpdate
    @Username = N'Admin',
    @Password = N'********',
    @NetworkAddress = N'example.server',
    @Vaultname = N'MyVault',
    @MFProtocolType_ID = 1,
    @Endpoint = 2266,
    @MFAuthenticationType_ID = 4,
    @Domain = NULL,
    @VaultGUID = NULL,
    @ServerURL = NULL,
    @Debug = 0;

Returns

INT: 1 on success; -1 on error.

Parameters

@Username
  • Type: NVARCHAR(100)

  • Required: No

  • Description: M-Files user with vault admin rights.

@Password
  • Type: NVARCHAR(100)

  • Required: No

  • Description: Password (will be encrypted).

@NetworkAddress
  • Type: NVARCHAR(100)

  • Required: No

  • Description: Vault server URL as reachable from SQL Server.

@Vaultname
  • Type: NVARCHAR(100)

  • Required: No

  • Description: Vault name.

@MFProtocolType_ID
  • Type: INT

  • Required: No

  • Description: Protocol type ID (see MFProtocolType).

@Endpoint
  • Type: INT

  • Required: No (default = 2266)

  • Description: Port number for accessing the vault.

@MFAuthenticationType_ID
  • Type: INT

  • Required: No

  • Description: Authentication type ID (see MFAuthenticationType).

@Domain
  • Type: NVARCHAR(128)

  • Required: No

  • Description: Domain for Windows authentication.

@VaultGUID
  • Type: NVARCHAR(128)

  • Required: No

  • Description: Vault GUID from M-Files Admin.

@ServerURL
  • Type: NVARCHAR(128)

  • Required: No

  • Description: Web address of M-Files.

@Debug
  • Type: SMALLINT

  • Required: No (default = 0)

  • Description: Debug level.

Purpose

Procedure to allow updating of specific settings in both MFVaultSettings and MFSettings related to the vault Table MFVaultSettings show the settings to connect to M-Files. MFSettings table show the other settings for the Connector.

Examples

-- check out the settings tables
SELECT * FROM mfVaultSettings
SELECT * FROM  [MFSettings] AS [ms]

--the Protocol type and authentication type are referenced in related tables
SELECT * FROM [dbo].[MFVaultSettings] AS [mvs]
LEFT JOIN [dbo].[MFProtocolType] AS [mpt]
ON mvs.[MFProtocolType_ID] = mpt.[ID]
LEFT JOIN [dbo].[MFAuthenticationType] AS [mat]
ON mvs.[MFAuthenticationType_ID] = mat.[ID]

--updating the M-Files user name
EXEC [spMFSettingsForVaultUpdate] @Username = 'Admin'

--change the password

EXEC spmfsettingsForVaultUpdate @Password = 'MotSys123'

-- It is only necessary to specify the settings that need to change

DECLARE @RC INT
DECLARE @Username NVARCHAR(100) = 'MFSQLConnect'
DECLARE @Password NVARCHAR(100) = 'Connector01'
DECLARE @NetworkAddress NVARCHAR(100)
DECLARE @Vaultname NVARCHAR(100)
DECLARE @MFProtocolType_ID INT = 1
DECLARE @Endpoint INT = 2266
DECLARE @MFAuthenticationType_ID INT = 4
DECLARE @Domain NVARCHAR(128)
DECLARE @VaultGUID NVARCHAR(128)
DECLARE @ServerURL NVARCHAR(128)
DECLARE @Debug SMALLINT

EXECUTE @RC = [dbo].[spMFSettingsForVaultUpdate] @Username
, @Password
, @NetworkAddress
, @Vaultname
, @MFProtocolType_ID
, @Endpoint
, @MFAuthenticationType_ID
, @Domain
, @VaultGUID
, @ServerURL
, @Debug

Changelog

Date

Author

Description

2016-10-12

LC

Update procedure to allow for updating of settings into the new MFVaultSettings Table

2016-08-22

LC

Change settings index

2016-04-20

LC

Created Procedure