Prerequisites of Using Bulk Insert Error Handling

Before using the bulk insert error handling feature, you have to add a necessary parameter and then configure Subscription Service.

Adding a Parameter

To enable bulk insert error handling, add the adb.<sub-service-name>.bulkInsertErrorHandling <on/off> parameter to the adbagent.tra file in the TIB_ADADB_HOME\bin directory.

This parameter indicates whether the bulk insert error handling feature in Subscription Service is enabled or not. Its default value is off. You can refer to the adbagent.tra file for the parameter format.

To enable the bulk insert error handling feature, change the <sub-service-name> variable to the name of Subscription Service, and set the value to on. For example,

adb.ADBSubscriber.bulkInsertErrorHandling on

After the adb.<sub-service-name>.bulkInsertErrorHandling property is set to on, all correct data is inserted into the destination table, error data is inserted into the exceptions table or opaque exceptions table, and all the data is confirmed. However, if the adb.useExceptTable property is set to off in the adbagent.tra file and no opaque exceptions table is specified, error data cannot be inserted into the exceptions table or opaque exceptions table. As a result, the adapter does not confirm the error data. Instead, the adapter inserts all the correct data into the destination table and just confirms the correct data.

Configuring Subscription Service

After creating an adapter configuration and Subscription Service, you have to configure Subscription Service with bulk insert error handling.

If you want to use separate sessions, perform the following steps:

  1. In the Subscription Options tab, select the Use Separate Session check box.
  2. Set values in the Bulk Insert Size, Batch Commit Size, and Batch Commit Timeout(milliseconds) fields. Then click Save.

Note: You can also configure batch commit for Subscription Service by setting the adb.subBatchCommitTimeout and adb.subBatchCommitSize properties in the adbagent.tra file. For details about these two properties, see Adapter Properties.

If you do not want to use the default session, perform the following steps:

  1. In the Subscription Options tab, enter a value in the Bulk Insert Size field.
    Note: Ensure that the Use Separate Session check box is not selected.
  2. Set either of the following properties in the adbagent.tra file to configure batch commit:
    • adb.subBatchCommitTimeout and adb.subBatchCommitSize (with precedence)
    • adb.<default session name>.subBatchCommitTimeout and adb.<default session name>.subBatchCommitSize

    For details on how to configure batch commit without using separate sessions, see Configuring Batch Commit for Subscription Service.