Loading data to accelerators with HALOAD and ACCEL_SET_REPLICATION

When loading data into one or more accelerators with HALOAD, you can specify the new keyword ACCEL_SET_REPLICATION to enable or disable replication for incremental updates for all tables specified in the syntax. ACCEL_SET_REPLICATION can be used only with HALOAD. For information on incremental updates to an accelerator, see the Incremental updates section in the IBM DB2 Analytics Accelerator for z/OS documentation.

The ACCEL_SET_REPLICATION parameter enables or disables replication on all tables included in the job step. As a result, for multi table loads, you must re-organize your existing jobs by grouping together the tables you want to replicate, and excluding the tables you don’t want to replicate.

The ACCEL_SET_REPLICATION keyword is mutually exclusive with ACCEL_REMOVE_AND_ADD_TABLES.

Prerequisites

The following prerequisites must be met before you set a value for the ACCEL_SET_REPLICATION parameter:
  • Incremental updates must be enabled on the Db2 subsystem.
  • Replication must be started on the target accelerator. You can start replication only if incremental updates are enabled.
  • ACCEL_SET_REPLICATION is implemented only for IDAA v7.5.* accelerators and not for IDAA v5 accelerators.

Syntax definitions

Set the value of ACCEL_SET_REPLICATION to one of the following:

ON

Accelerator Loader enables replication for all tables in the job step. It runs the SYSPROC.ACCEL_SET_TABLES_REPLICATION stored procedure to turn on replication for the table which places the shadow table in INITIAL_LOAD_PENDING status and then loader loads the tables.

If replication is already in enabled status on the table, then loader displays a message that the replication status is already enabled and the table will not be reloaded.

If replication is in the error status on the table, then loader enables replication on the table and then reloads the table.

On a HALOAD job loading more than one accelerator, if a table has replication enabled on one accelerator and not on the others, then the loader will enable replication on all accelerators and reload data to all accelerators.

OFF

Accelerator Loader disables replication for all tables in the job step. Accelerator Loader runs the SYSPROC.ACCEL_SET_TABLES_REPLICATION stored procedure to disable replication for all the tables in the job step and then continues processing the load.

If replication is already in an enabled status on the table, then loader disables the replication and displays a message that the replication status is already enabled and the table will not be reloaded.

If the replication is in error status, then the loader disables the replication on the table and reloads the table.

On a HALOAD job loading more than one accelerator, if a table has replication enabled on one accelerator and not on the others, then the loader disables the replication on all accelerators and reloads the data to all accelerators.

Some Scenarios and Expected Result

Table 1.
DETECT_DATA_CHANGES (Coded or Not Coded on job) ACCEL_SET_REPLICATION (Keyword value ON or OFF coded on job) Replication status of Accelerator Expected Result
Coded or Not Coded ON or OFF DISABLED Replication status DISABLED is incompatible with ACCEL_SET_REPLICATION. Load fails with HLOU4130E message.
Table 2. Table in Db2 not in IDAA
DETECT_DATA_CHANGES ACCEL_SET_REPLICATION Current Replication status of the table on Accelerator Expected Result
Coded or Not Coded ON UNKNOWN ENABLE replication. LOAD Table.
Coded or Not Coded OFF UNKNOWN Load Table.
Table 3. Table in Db2 and IDAA
DETECT_DATA_CHANGES (Coded or Not Coded on job)

ACCEL_SET_REPLICATION

(Keyword value ON or OFF coded on job)

Current Replication status of the table on Accelerator Expected Result
Coded or Not Coded ON OFF ENABLE replication. LOAD table.
Not Coded OFF OFF LOAD table.
Coded OFF OFF

Load Table or Partitions that has changes detected.

If no changes detected, report message and do not load tables.

Coded or Not Coded ON ENABLED No Load. Msg HLOU4078I(replication already enabled).
Coded or Not Coded OFF ENABLED No Load. Replication set to 'DISABLED'.