Update the Configuration File for Oracle Datastores

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

  1. Open an Enterprise Developer 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 Enterprise Developer command prompt.
  3. Add a database server instance that you intend to connect to:
    dbfhconfig -add -server:<server-name> -provider:ora

    where <server-name> is the name of the database server instance. An entry of localhost:<port> is also valid, which defaults to your machine name. If you have already updated the configuration file with the Oracle 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 datastores within the instance.

  4. Repeat the following step for each required datastore:
    dbfhconfig -add -server:<server-name> -dsn:<name> -type:datastore -optio:<opts> [-bitism:<bit>] 
    -name:<dsname> -db:<existing-db> {-user:<user-name> -password:<password> | -connect:<connection-string>}

    where <name> is the unique name within the MFDBFH configuration file in which to reference the datastore; <opts> are the optimizations to be applied to I/O operations; <bit> is the bitism of the database connection; <dsname> is the actual name of the datastore. For the connection details, you must specify -db (where <existing-db> is the name of an existing database instance in which to store the datastore - for simplicity, we recommend specifying the identifying entry in the tnsnames.ora configuration file), and then either -user and -password (where <user-name> and <password> are valid credentials for the instance), or -connect (where <connection-string> is the database connection string - see Database Connection Strings for the database-specific syntax); .

    <opts> can be one of:
    option description
    all All optimizations applied, as if +<opt> had been specified for each available option. You can then selectively disable certain options using -<opt>.
    none No optimizations applied.
    {+|-}oiseq Enables (+) or disables (-) optimizations for line-sequential files opened for input.
    {+|-}ooseq Enables (+) or disables (-) optimizations for line-sequential files opened for output.
    {+|-}oi Enables (+) or disables (-) optimizations for ESDS, KSDS, and RRDS files opened for input.
    {+|-}oo Enables (+) or disables (-) optimizations for ESDS, KSDS, and RRDS files opened for output.

Example configuration file

The following is an example of a configuration file that contains two datastores, a region database, and a cross-region database, using direct connection syntax. As the database login credentials are required in the connection, the secrets vault has been enabled to mask the password: see Configure a Secrets Vault for the Micro Focus Database File Handler for more information.

<datastores usevault="true">
 <server name="${TESTMFDBFH_DBINST_ORA}" type="oracle" access="oci">
    <dsn name="ORA.VSAM" type="datastore" dsname="VSAM" optio="none" dbname="DBFHTEST" connect="$$vault$$"/>
    <dsn name="ORA.JES" type="datastore" dsname="JES" optio="none" dbname="DBFHTEST" connect="$$vault$$"/>
    <dsn name="ORA.CAS.CROSSREGION" type="crossregion.cas" dbname="DBFHTEST" connect="$$vault$$"/>
    <dsn name="ORA.CAS.TESTDB" type="region.cas" region="TESTDB" dbname="DBFHTEST" connect="$$vault$$"/>
  </server>
</datastores>

Next, you can use the dbfhdeploy command line utility to add files to the datastores.