Use these steps to create or update a configuration file to include entries to one or more region databases, and a cross-region databases.
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.
dbfhconfig -add -server:<server-name> -provider:az
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.
dbfhconfig -add -server:<server-name> -dsn:<dsn-name> -type:database -name:master [-user:<user-name>] [-password:<password>] [-connect:<connection-string>]
where <dsn-name> is the ODBC data source for the Azure 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; <user-name> and <password> are valid credentials for the instance - you do not need to specify theses if you are using a connection string; 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.
dbfhconfig -add -server:<server-name> -dsn:<dsn-name> -type:region -name:<region-name> -feature:<options> [-user:<user-name>] [-password:<password>] [-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.
dbfhconfig -add -server:<server-name> -dsn:<dsn-name> -type:crossregion [-user:<user-name>] [-password:<password>] [-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 database.
The following is an example of a configuration file that contains two datastores, a region database and a cross-region database. The database instance is indicated by the VAR2AZDB variable. As the login credentials are required to establish a connection to this database, the secrets vault has also been enabled: see Configure a Secrets Vault for the Micro Focus Database File Handler for more information.
<datastores usevault="true"> <server name="${VAR2AZDB}" type="azuresqldb" access="odbc"> <dsn name="AZ.MYMASTER" type="database" dbname="master" userid="azusr" password="$$vault$$"/> <dsn name="AZ.VSAM" type="datastore" dsname="VSAM" userid="azusr" password="$$vault$$"/> <dsn name="AZ.SEQ" type="datastore" dsname="SEQ" optio="+ooseq" userid="azusr" password="$$vault$$"/> <dsn name="AZ.CAS.ESDEMO" type="region.cas" region="ESDEMO" feature="all" userid="azusr" password="$$vault$$"/> <dsn name="AZ.CROSSREGION" type="crossregion.cas" userid="azusr" password="$$vault$$"/> </server> </datastores>