UNIX Create Region and Cross-Region Data Sources for PostgreSQL

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 data sources on a UNIX/Linux platform.

There are a number of different driver managers that you can use to configure an ODBC data source. These instructions are carried out using unixODBC. If you are using a different driver manager, consult the vendor instructions for creating data sources.

  1. Run the command odbcinst -j command, and note down the location of the drivers configuration file (odbcinst.ini) and the user data sources configuration file (.odbc.ini).
  2. Open the odbcinst.ini configuration file and ensure that you have something similar to the following:

    (This may differ depending on the version of PostgreSQL you are running.)

    [PostgreSQL]
    Description=ODBC for PostgreSQL
    Driver64=/usr/pgsql-10/lib/psqlodbcw.so
    Setup64=/usr/lib64/libodbcpsqlS.so
    FileUsage=1
  3. Open the .odbc.ini configuration file and add an entry for the mandatory data source:
    [<datasource-name>]
    Driver = <driver-name>
    Server = <server-name>
    Port = <port-no>
    Database = postgres
    where:
    • <datasource-name> - a name for the data source.
    • <driver-name> - the name of the driver as configured in the .odbc.ini file; in the example above, that would be PostgreSQL.
    • <server-name> - the name of the server on which the database instance resides.
    • <port-no> - the port on which the database is listening.
  4. Add a new data source for a region database:
    [<datasource-name>]
    Driver = <driver-name>
    Server = <server-name>
    Port = <port-no>
    Database = MicroFocus$CAS$Region$<region-name>
    where:
    • <region-name> - the name of the enterprise server region whose files are to be stored in the database.
  5. Add a new data source for a cross-region database:
    [<datasource-name>]
    Driver = <driver-name>
    Server = <server-name>
    Port = <port-no>
    Database = MicroFocus$CAS$CrossRegion
  6. Save the .odbc.ini configuration file.

Example .odbc.ini file

The following is an example of an .odbc.ini configuration file that contains data sources for a local PostgreSQL database instance that stores files from the ESDEMO enterprise server region in a region and cross-region database.

[PG.POSTGRES]
Driver = PostgreSQL
Server = localhost
Port = 5432
Database = postgres

[PG.CAS.ESDEMO]
Driver = PostgreSQL
Server = localhost
Port = 5432
Database = MicroFocus$CAS$Region$ESDEMO

[PG.CAS.CROSSREGION]
Driver = PostgreSQL
Server = localhost
Port = 5432
Database = MicroFocus$CAS$CrossRegion

Next, you must create or edit the MFDBFH configuration file, so that it contains entries to your region and cross-region data sources, and the data source for the mandatory database.