Update DML handler
The transaction is then propagated and
applied to the destination table by the procedure specified as
the DML handler. The procedure, besides inserting into the
hist_upd table, executes the LCR event ( lcr.EXECUTE(true)
).
The statement below shows the entry added
to the hist_upd table at DNYOIP20 by way of the DML
handler procedure NY4.WRITE_UPD_LCRS:
select TIMESTAMP, COMMAND_TYPE, OBJECT_NAME,
TRANSACTION_ID, COMMIT_SCN, TX_NAME from ny4.hist_upd
/
TIMESTAMP COMMAND_TYPE Table Name
TRANSACTIO COMMIT_SCN TX_NAME
--------- ------------ ------------
---------- ---------- --------
30-OCT-04 UPDATE ALLINSURED1
3.44.16636 14324527 MY_TXN10
The hist_upd table, which is written
by the DML Handler procedure, provides a record of all the
updates to the base table.
The next step is to examine the handlers
for delete DML operations.
Delete DML Operation
There are some situations where deleting
records may need to be controlled. Accidental deletes need to be
avoided. If a deletion takes place, the DBA may not want to
reflect the deletion at the destination and may want to record
the details. This is where the Delete DML Handler would be very
handy.