Reusing custom staging triggers

If you created custom tables with staging triggers in a previous version of HCL Commerce, you can continue to use your custom triggers. Run the provided scripts to allow the unchanged custom triggers to continue to use the KEYS table to maintain the primary key values of the STAGLOG table.

Note: Alternatively, you can update your existing staging triggers for better performance and scalability. For an example of how to update your trigger, see Staging trigger example.


  1. Retrieve the files from the Utility server Docker container by performing one of the following actions.
    1. Retrieve the files from the development environment.
      • DB2WCDE_installdir/schema/
      • OracleWCDE_installdir/schema/
    2. Retrieve the files from the Utility server Docker container.
      1. Run docker ps to verify that your containers are running.
      2. Locate your utility container name in the NAMES column. For example, myproject_utils_1.
      3. Run docker cp to copy the appropriate files from the Utility server Docker container to your local system.
        docker cp utility_container_name:container_file_path local_directory
        The container_file_path for the drop triggers script is
        • DB2utilities_root/schema/
        • Oracleutilities_root/schema/
  2. Connect to the staging database.
    • DB2db2 connect to stagingdbuser db_user using db_password
    • Oraclesqlplus db_user/db_password@stagingdb
  3. Run the following script:
    db2 -td# -vf wcs.stage.heteroTriggerSupport.sql