Creating the Region Database

Because database creation can be slow for some RDBMS, Micro Focus recommends that you create the region database before you start the PAC:

  1. At the Enterprise Developer command prompt, type the following:
    dbfhadmin -script -type:region -provider:pg -name:MYPAC -file:create_region_db.sql

    This creates a file containing the PostgreSQL statements to create the region database.

  2. At the Enterprise Developer command prompt, type the following to create the region database:
    dbfhadmin -createdb -provider:pg -type:region -name:MYPAC -file:create_region_db.sql -user:postgres
Note: Ensure that the PostgreSQL server is running and that the folder containing the psql PostgreSQL utility has been added to your PATH environment variable. Typically, you can find this located at C:\Program Files\PostgreSQL\10\bin.

When using the dbfhadmin -createdb -provider:pg -user:postgres ... command, it is assumed that an entry for the postgress user has been created in a password file, located at %APPDATA%\postgresql\pgpass.conf. See Configure Region and Cross-Region Databases in PostgreSQL for more information.

If the PostgreSQL server is running on a remote machine, the first field in the PostgreSQL password file must the hostname, and the dbfhadmin -host option must also be included.

The password file takes the form:

#hostname:port:database:username:password
localhost:5432:postgres:postgres:xxxxxxxxxx