Migrating Event Collector Data for DB2

If the database you are using is DB2, you must install and run the migration stored procedure for DB2 to migrate the Event Collector data.

Procedure

  1. Copy install-migration-tools.sql from TIBCO_HOME\bpm\n.n\scripts\migration\db2, where n.n is the version of ActiveMatrix BPM, to a temporary location on your server.
  2. Open the DB2 command window and login with the BPM user credentials.
    db2 CONNECT TO database_name USER user_name USING password
    where:
    • database_name is the database you wish to connect to (for example, amxbpm).
    • user_name is the user under which the ActiveMatrix BPM schema is installed (for example, bpmuser).
    • password is the password for the user.
    For example:
    db2 CONNECT TO amxbpm USER bpmuser USING mypassword
  3. Execute the following command to install the stored procedures and create the ec_migration table used to migrate the Event Collector data:
    db2 -td/ -f /home/amx-bpm/temp/install-migration-tools.sql
  4. You may have large amounts of event data to migrate, depending on the size of your system. Therefore, the amxbpm_migrate_events stored procedure enables you to specify the number of events to migrate, and the commit batch size. Execute the command multiple times to migrate the data. Call the amxbpm_migrate_events stored procedure directly. For example:
    CALL amxbpm_migrate_events(parameter1, parameter2)
    where:
    • parameter1 is the number of events to be migrated.
    • parameter2 is the batch size to commit.
    The default is 20,000 events in batches of 500. This results in the most recent 20,000 events being migrated. Repeat this command until all your data is migrated. For example:
    CALL amxbpm_migrate_events(20000, 500)
  5. Once your data has migrated, execute the following command to remove the migration tools used to migrate the Event Collector data.