Update the Configuration File for Azure Datastores

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.

Use these steps to create or update a configuration file that includes entries to one or more datastores.

  1. If you do not already have a database configuration file (MFDBFH.cfg), in a text editor, create a simple text file and name it MFDBFH.cfg. If you already have a configuration file, open it and then skip to step 3.
  2. Code the base element:
    <datastores>
    </datastores>
  3. Add a <server> element for each database server instance you intend to connect to. Each <server> element contains 3 attributes:
    Note: If you are editing a configuration file that already contains entries to the required server instance, skip to step 5.
    • name - the name of the instance. An entry of (local) or localhost defaults to your machine name when the file is processed.
      Note: You can use an environment variable as the name of the data source: set a variable in your environment, and then use the following syntax:
      <server name=$(env-name) type="azuresqldb" access="odbc"/>
    • type - the type of database; for Microsoft Azure SQL databases this should be azuresqldb
    • access - the type of protocol for the database connection. Currently only odbc is supported.

    For example, for a Microsoft Azure SQL database instance:

    <datastores>
       <server name="${VAR2AZDB}" type="azuresqldb" access="odbc">
       </server>
    </datastores>

    Next you need to specify the databases within the instance.

  4. Firstly, you need to create a reference to the master database:
    Note: If the <server> element for your database server instance already exists, this reference should already exist.
    <datastores>
       <server name="${VAR2AZDB}" type="azuresqldb" access="odbc">
          <dsn name="<data-source>" type="database" dbname="master"/>
       </server>
    </datastores>
  5. Next, you need to add further <dsn> elements for each datastore. Each <dsn> element contains the following attributes:
    • name - the name of the data source.
    • type - the type of database. For datastores, this is type="datastore".
    • dsname - the name to which Enterprise Server will refer to the datastore; this is the name specified as <datastore-name> when the ODBC data source was created for the database.
    • optio - the optimizations that are applied to database file handling operations at run-time. The available options are specified in the following table. If this attribute is not specified, no optimizations are applied.
      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.
    • userid and password - a set of valid credentials used to access the database.
    <datastores>
       <server name="${VAR2AZDB}" type="azuresqldb" access="odbc">
          <dsn name=<data-source> type="database" dbname="master" userid=<user> password=<pass>/>
          <dsn name=<data-source> type="datastore" dsname=<name> optio=<opt> userid=<user> password=<pass>/>
       </server>
    </datastores>
  6. Save the configuration file, ensuring it is named MFDBFH.cfg.

Example MFDBFH.cfg

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.

<datastores>
   <server name="${VAR2AZDB}" type="azuresqldb" access="odbc">
      <dsn name="AZ.MYMASTER" type="database" dbname="master" userid="azusr" password="azpwd123"/>
      <dsn name="AZ.VSAM" type="datastore" dsname="VSAM" userid="azusr" password="azpwd123"/>
      <dsn name="AZ.SEQ" type="datastore" dsname="SEQ" optio="+ooseq" userid="azusr" password="azpwd123"/>
      <dsn name="AZ.CAS.ESDEMO" type="region.cas" region="ESDEMO" feature="all" userid="azusr" password="azpwd123"/>
      <dsn name="AZ.CROSSREGION" type="crossregion.cas" userid="azusr" password="azpwd123"/>
   </server>
</datastores>