Database Connections

To connect the Micro Focus Database File Handler to a database you can either use an ODBC data source, or use a direct connection string to the database.

All database types are capable of using either connection type, and for some databases (Db2), the preferred method is to use a direct connection string. Both types of connection are configured within the database configuration file.

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

 <dsn name="SS.SEQ" type="datastore" dsname="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.

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

The dsn name value does not map to a data source in this case - it is simply a unique name within the Db2 configuration in which to reference the datastore.

As the connection strings display sensitive information is 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.