Update the Configuration File for Microsoft SQL Server Region and Cross-Region Databases

Attention: This feature is in Early Adopter Product (EAP) release status. We will continue the development of additional features and provide additional interfaces via patch updates and future releases. Please contact Micro Focus SupportLine if you require further clarification.

Use these steps to create or update a configuration file to include entries to one or more region databases, and a cross-region databases.

You should only create or update a configuration file using the dbfhconfig command line utility.

  1. Open an command prompt.
  2. Set the MFDBFH_CONFIG environment variable to locate the configuration file to be created or updated:
    set MFDBFH_CONFIG=<location-and-name-of-file>

    If you do not set this variable, a file named MFDBFH.cfg is assumed to be located in the current directory.

    Note: The MFDBFH_SCRIPT_DIR environment variable is also required to point to the stored procedures used to interact with a datastore; however, this variable is implicitly set already when using an command prompt.
  3. Add a database server instance that you intend to connect to:
    dbfhconfig -add -server:<server-name> -provider:ss

    where <server-name> is the name of the database server instance. An entry of (local) or localhost is also valid, which defaults to your machine name. If you have already updated the configuration file with the MSSQL datastores, this entry will already exist, and you will receive a message informing you of this; you can skip to the next step.

    Now specify the required databases within the instance.

  4. Firstly, you need to create a reference to the master database - this is the primary configuration database supplied with MSSQL:
    Note: If the <server> element for your database server instance already exists, this reference should already exist as well, and so again, skip this step.
    dbfhconfig -add -server:<server-name> -dsn:<dsn-name> -type:database -name:master [-connect:<connection-string>]

    where <dsn-name> is the ODBC data source for the MSSQL master database, or if you are using a connection string (instead of an ODBC data source), it is a unique name within the configuration in which to reference the database; and <connection-string> is the database connection string if you are establishing a database connection without the use of an ODBC data source - see Database Connection Strings for the database-specific syntax.

    Note: On Windows, you may omit the userid and password attributes for local MSSQL installations that allow Windows (SSPI) authentication.
  5. Repeat the following step for each required region database:
    dbfhconfig -add -server:<server-name> -dsn:<dsn-name> -type:region -name:<region-name> -feature:<options> [-connect:<connection-string>] 

    where <dsn-name> is the ODBC data source for the region database, or if you are using a connection string (instead of an ODBC data source), it is a unique name within the configuration in which to reference the region database; <region-name> is the name of the enterprise server region; and <options> is a list of features for which the region will use the database.

    <options> can be one or more of:
    • all - all available region features enabled (default).
    • none - no region features enabled.
    • [+|-]reslocking - enables\disables database resource locking.
  6. Now add a reference to a single cross-region database:
    dbfhconfig -add -server:<server-name> -dsn:<dsn-name> -type:crossregion [-connect:<connection-string>]  
    where <dsn-name> is the ODBC data source for the cross-region database, or if you are using a connection string (instead of an ODBC data source), it is a unique name within the configuration in which to reference the cross-region database.

Example configuration file

The configuration file is written to after each command. The following is an example of a configuration file that contains two datastores, a region database and a cross-region database. The MSSQL server instance is also configured for Windows authentication, hence the omission of the userid and password attributes.

<datastores usevault="false">
   <server name="(local)" type="sqlserver" access="odbc">
      <dsn name="SS.MYMASTER" type="database" dbname="master"/>
      <dsn name="SS.VSAM" type="datastore" dsname="VSAM"/>
      <dsn name="SS.SEQ" type="datastore" dsname="SEQ" optio="all -ooseq"/>
      <dsn name="SS.CAS.ESDEMO" type="region.cas" region="ESDEMO" feature="all"/>
      <dsn name="SS.CROSSREGION" type="crossregion.cas"/>
   </server>
</datastores>
Next, you must create the region and cross-region databases using the dbfhadmin command line utility.