Built-in DB2 LUW driver support plugin
For instructions on how to enable/disable Drop Constraints, Drop Indexes, and Drop Triggers on DB2 LUW jobs, see API Calls for Managing Masking Job Driver Support Tasks.
Unlike other database platforms, DB2 does not support disabling constraints, indexes, or triggers. Therefore, this plugin does not have Drop Constraints, Drop Indexes, and Drop Triggers tasks.
Tasks
For in-place jobs:
Drop Constraints drop and re-create constraints on masked columns only.
Drop Indexes drop and re-create indexes on masked columns only (except for indexes automatically generated by DB2 LUW to support a primary key or unique constraint, those are dropped by Drop Constraints).
The Drop Indexes task can fail on tables in a REORG required state. Refer to Known Limitations.
Drop Triggers drop and re-create triggers on tables with masked columns only.
For on-the-fly jobs, the tasks will execute on all columns and tables in the ruleset.
Task Execution Order
The order of task execution for built-in driver support plugins is fixed/unmodifiable.
The order of the tasks is as follows:
Pre-job:
Drop Constraints
Drop Indexes
Drop Triggers
Post-job (mirrored order):
Create Triggers
Create Indexes
Create Constraints
Important Considerations
If masking primary key fields, use the same deterministic algorithms on primary key fields that reference each other so that referential integrity is maintained when the masking transformation completes and all constraints are re-created.
If dropping indexes on masked fields with constraints is desired, enable both Drop Constraints and Drop Indexes. DB2 LUW automatically creates indexes to support primary key and unique constraints. Those indexes cannot be dropped by the Drop Indexes task, but enabling Drop Constraints will allow it to drop those indexes when the constraints they support are dropped.
Known Limitations
If both a foreign key column and the primary key or unique column it references are not masked with the same deterministic algorithm (guaranteeing referential integrity), the job will fail due to an integrity constraint violation.
If masking a field that is a primary key or has a unique constraint, and Drop Indexes is the only task enabled, the job will fail. Drop Constraints must also be enabled so that it can drop the indexes DB2 LUW automatically creates to support constraints.
Changes to table definition like index modifications can lead to a table in a ‘REORG REQUIRED’ or ‘REORG PENDING' state. If this occurs the reorg must be administered by a DBA or other user with elevated permissions to use admin commands. Tables in this state prevent some actions and will fail to recreate indexes, rejected by DB2 with a
SQLSTATE=57007
. Refer to the documentation on a specific DB2 version for information on how it calculates when to put a table in the 'REORG PENDING' state. Logging for the job will indicate when automatic index recreation has failed and should be done manually.