Database Connections

Within your database instance, separate databases can be created for each datastore, region database and cross-region database. Alternatively, you can create one single database to house multiple datastores, region databases, and a cross-region database. Using a single database is the preferred method, as this gives additional performance benefits, allowing you to use a single database connection to access the multiple MFDBFH resources.

Regardless of how you configure your databases, you need to choose how to connect to them: either using ODBC data sources (except for Oracle databases), or using a direct connection string. Both of these methods are configured within the database configuration file; see the respective Configure Datastores\Region Cross-regions Databases... sections for each database provider for more details.

The following example is an entry from a configuration file that uses an ODBC data source connection to an MSSQL datastore, where the name value references a data source on your machine:

 <dsn name="SS.SEQ" type="datastore" dsname="SEQ" dbname="SEQ" optio="all -ooseq"/>

The following example is an entry from a configuration file that uses direct connection syntax in order to establish a connection to a Db2 datastore. See Database Connection Strings for the syntax required for each database provider.

<dsn name="DB2.VSAM" type="datastore" dsname="VSAM" optio="none +ooseq" dbname="MYMFFILS" connect="db=MFDATS;uid=db2admin;pwd=adminpw"/>

The name value in this method does not map to a data source - it is simply a unique name within the Db2 configuration that is used by MFDBFH to reference the datastore.

Tip: As the connection strings display sensitive information in plain text format, it is advisable that you encrypt it using a secrets vault; see Configure a Secrets Vault for the Micro Focus Database File Handler for details.