The Database Configuration File - MFDBFH.cfg

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.

The database configuration file (MFDBFH.cfg) is used by the native database file handler (MFDBFH), and for enterprise server region management.

It contains a list of database server instances and the databases available within them. The types of database server currently supported are Microsoft SQL Server and PostgreSQL. You may have one or more instances of each type configured within the same configuration file.

Within each server instance element, you configure a <dsn> element for each database available. Databases are either of type database, datastore, region.cas, or crossregion.cas; see Types of Database for more information. Each database element must have a corresponding ODBC data source configured on your machine in order for MFDBFH or Enterprise Server to interact with it.

Additional configuration, such as database instance user credentials, and feature enablement for region/cross-region databases is also available within the configuration file; see Create a Configuration File for Microsoft SQL Server and Create a Configuration File for PostgreSQL for full details.

The following example shows two server instances: one of type sqlserver (called svr-mysqldb) and one of type postgresql (stored locally on port 5432), both of which use an ODBC data source (as denoted by the access="odbc" attribute).

<datastores>
  <server name="svr-mysqldb" type="sqlserver" access="odbc">
    <dsn name="SS.MYMASTER" type="database" dbname="master"/>
    <dsn name="SS.VSAM" type="datastore" dsname="VSAM"/>
    <dsn name="SS.CAS.ESDEMO" type="region.cas" region="ESDEMO" feature="all"/>
    <dsn name="SS.CROSSREGION" type="crossregion.cas"/>
  </server>
  <server name="localhost:5432" type="postgresql" access="odbc">
    <dsn name="PG.POSTGRES" type="database" dbname="postgres"/>
    <dsn name="PG.VSAM" type="datastore" dsname="PGVSAM" userid="clerk" password="clerk321"/>
    <dsn name="PG.CAS.PGDEMO" type="region.cas" region="PGDEMO" feature="all" userid="clerk" password="clerk321"/>
    <dsn name="PG.CROSSREGION" type="crossregion.cas" userid="clerk" password="clerk321"/>
  </server>
</datastores>

Each instance has a number of datastore, region, and cross-region databases. Each server instance also has an entry for type=database; this is mandatory in order for MFDBFH or Enterprise Server to be able to interact with the instance.

Use the MFDBFH_CONFIG environment variable to locate this configuration file, both when running applications through Enterprise Server and when using the dbfhdeploy command line utility. If the variable is not set, the configuration file is assumed to be located in the current directory, or in the enterprise server region's system directory.