INCLUDE RI example
- Job B deletes rows in RESOURCE_TB that cascade to PROJECT_TB.
- Job C updates PROJECT_TB directly.
The following table shows the log records selected by different filters and different INCLUDE RI settings, based on this example.
Filter | INCLUDE RI setting | SQL statements that LBMC AMI Log Masterog Master generates | Notes |
---|---|---|---|
TABLE NAME = EMPL_TB | NO | All direct changes to EMPL_TB (Job A) | None |
YES | All direct changes to EMPL_TB (Job A) | Only Job A updates EMPL_TB. If any cascading deletes in EMPL_TB that resulted from RI relationships with other tables existed, those deletes would be selected because INCLUDE RI is YES. | |
TABLE NAME IN (EMPL_TB, PROJECT_TB) | NO |
| Because INCLUDE RI is NO, the product selects only direct (nonRI-related) changes to both tables. |
YES |
| When INCLUDE RI is YES, the product selects all direct and all RI-related changes to both tables. BMC AMI Log Master cannot distinguish between the cascading deletes from Job A and Job B without further criteria in the filter (see next entries). | |
TABLE NAME IN (EMPL_TB, PROJECT_TB) AND CORRID = JOBA | NO | All direct changes to EMPL_TB (Job A) | Job A updates only EMPL_TB. Had Job A updated PROJECT_TB directly, those deletes would be selected because PROJECT_TB is included in the filter. |
YES |
| When INCLUDE RI is YES, the product selects all direct and all RI-related changes in both tables, and then selects only the changes made by Job A. |