Delete DML Operation
In this example, a Delete DML handler that
manipulates the incoming LCR event will be created at the
destination. Whenever a delete transaction arrives to the
destination queue, the LCR is modified to write to an alternate
table with an additional column. The Apply process that dequeues
the transaction is set up with a Delete DML handler.
Figure 6.4 Setting up of Delete DML
Handler
Figure 6.4 shows all of the components
involved in setting up a typical Delete DML handler.
Next, information will be presented on the
DML delete handler setup methodology. The following are the
assumptions:
Source Table :
ny4.allinsured1 at DNYTST10 database
Source DB Capture Proc :
NY4_CAPTURE
Destination Table : ny4.allinsured1 at
DNYOIP20 database
Alternate Table :
ny4.hist_deletes at DNYOIP20 database
Destination Apply Proc :
LN4_APPLY
In order to show the use of Delete DML
handler, a stored procedure named NY4.WRITE_DEL_LCRS has been
created, and the Delete DML handler has been set up. A new table
named NY4.HIST_DELETES has been created at DNYOIP20. This table
is where the DML handler writes the details about the delete
operation.
The following SQL statements show the
creation and setting up of the Update DML handler: