Tutorial: Create and Load the HCO_Test Database

Provides instructions that walk you through the process of creating the HCO_Test Amazon Aurora or Amazon RDS for PostgreSQL database.

Both HCOPG Application Migration tutorials require that you have access to the HCO_Test PostgreSQL database that contains data migrated from an IBMSYS schema in a DB2 database. To make this easy for you, we have provided two scripts that create and load the database for you.

  1. Using UNIX terminal, navigate to the $COBDIR/demo/sql/hcopg directory.

    This directory contains the CreateHCO_Test.sql and LoadHCO_Test.sql SQL scripts used to create and load the test database.

  2. Execute the following commands to create and load the database:
    >psql -h DBInstanceEndpoint -p=port -u UserId -a -f CreateHCO_Test.sql
    >psql -h DBInstanceEndpoint -p=port -u UserId -d HCO_Test -a -f LoadHCO_Test.sql
  3. Execute the following three SQL scripts against the newly created HCO_Test database:
    • InstallSYSIBM.sql
    • InstallBindProcs.sql
    • InstallDigitsFunction.sql
    Note: For more information about these scripts, see Before Using HCO for PostgreSQL.