0

We have a scenario where we would like to see if we could get hold of a list of tables affected by a given transaction. We use attunity to listen on the transaction log, but what I get from attunity is the transaction ID associated to a given event (a row change for a single table), not how many other tables that transaction has affected.

Consider the below update events -

UPDATE DEPARTMENTS SET (DEPT_NAME) = ('ChangedName3') WHERE DEPT_NO = 'd010';

UPDATE EMPLOYEES SET (FIRST_NME) = ('Georgi2') WHERE EMP_NO = '10001';

UPDATE DEPT_EMP SET (FROM_DTE) = ('1986-06-26') WHERE EMP_NO = '10001' AND DEPT_NO = 'd005';

UPDATE SALARIES SET (SALARY) = ('60111') WHERE EMP_NO = '10001' AND FROM_DTE = '1986-06-26';

UPDATE TITLES SET (TITLE) = ('Sr. Engineer') WHERE EMP_NO = '10001' AND FROM_DTE = '1986-06-26';

COMMIT;

This generates 5 events each having the transaction id - 00000000C420BC4E86DD010000000100 (I used a sample from attunity output).

Can I get something like -

00000000C420BC4E86DD010000000100, {EMPLOYEES, DEPARTMENTS, DEPT_EMP, SALARIES, TITLES} on each of the 5 events? Or query DB2 to find this information?

2
  • If you are on Db2 for LUW, an event monitor for activities could do that.
    – mustaccio
    Mar 10, 2020 at 19:16
  • @mustaccio - thanks for the reply, We are on z/os. I would still be interested in knowing how you would this on LUW. If you can provide some code example. I am not much of a DBA myself, trying to learn how the event monitor works. Mar 10, 2020 at 20:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.