Handling truncated tables

Note: For Oracle only.

If an Oracle table is truncated or dropped while having unprocessed row-based table entries, there may be map execution problems. To avoid these problems, you may have to perform some maintenance on the Trigger_Events table as shown in the following procedure.

Make sure you only delete those rows in the Trigger_Events table associated with the truncated table. Also, you can perform this procedure after dropping and recreating a table.

To delete table-specific truncated rows:

  1. Enter the following SQL statement:
    DELETE from Trigger_Events WHERE ID IN (
       SELECT ID FROM Trigger_Registry WHERE TriggerName IN (
          SELECT TriggerName FROM Trigger_Catalog
             WHERE      UPPER(SourceSchema) = UPPER('schema_name') AND
                   UPPER(SourceTable) = UPPER('table_name')))

    where schema_name is the name of your schema and table_name is the name of the truncated table.

  2. Commit the transaction (for example, COMMIT;).