Housekeeping with active data integrity framework

If you have activated the data integrity framework and you want to perform housekeeping tasks by native database functions, you can do the steps in one of the following two sections:
  • Within your housekeeping tasks use the stored procedures DNI_DI_OPEN and DNI_DI_CLOSE that allow data manipulation using SQL with INSERT and DELETE statements in a controlled environment.
    A typical session for doing housekeeping on tables that are protected by the data integrity framework looks like this:
    CONNECT TO mydatabase
    CALL DNIvSN.DNI_DI_OPEN( 'DNIvSN', ? );
    ....
    DELETE FROM DNIvSN.DNIMWH_PT_OU1 WHERE ...
    ....
    CALL DNIvSN.DNI_DI_CLOSE( 'DNIvSN', ? );
    where DNIvSN represents the database schema of your FTM SWIFT environment.
    Note: DNI_DI_OPEN and DNI_DI_CLOSE are limited to one Db2® connection. So if you want to manipulate data using another Db2 connection, you have to invoke DNI_DI_OPEN and DNI_DI_CLOSE for the other connection, too.
    For more information, see API for housekeeping with active data integrity framework.
  • Perform housekeeping with a temporarily deactivated data integrity framework that is not limited to the use of SQL statements. Any program including Db2 utilities can be employed to perform housekeeping. An FTM SWIFT downtime is required, and you have to proceed as follows:
    1. Stop your FTM SWIFT business processes:
      1. Stop your FTM SWIFT business processes, stop all sessions, and stop all services you use.
      2. As an IBM® Integration Bus administrator (uwmba1) stop all FTM SWIFT related message flows.
    2. As a database administrator (udb2adm1) drop all triggers that were created with file dnirundb_dic.ddl.
    3. Perform your housekeeping tasks.
    4. Re-create the data integrity triggers as described in step 8 in Activating the data integrity framework
    5. Restart your FTM SWIFT business processes:
      1. As an IBM Integration Bus administrator (uwmba1) restart all FTM SWIFT related message flows.
      2. Restart all sessions and services.
    6. Run the DIC command check. If any issue is reported, run the DIC command build.