Custom Apply and Apply Handlers
Figure 2.3 - Apply Process and
A user procedure can be created that
processes row LCRs resulting from DML statements. Such a
procedure is called a DML Handler. For each table associated
with an apply process, a separate DML handler can be set up to
process each of the DML statements in row LCRs. DML statements
include: INSERT, UPDATE, DELETE, and LOB_UPDATE.
Another procedure that processes DDL LCRs
resulting from the DDL statements can be created. Such a
procedure is called a DDL Handler. An Apply process can have
many DML handlers but only one DDL handler. Since the DDL is a
special database activity that can be used to add or modify the
database table structures, it often warrants more planning,
coordination and control by administrators. The DDL handler can
be used to keep an audit on DDL activities or even to make
notifications in case a DDL command is executed.
A Message Handler defined at the apply
process will process the user-enqueued event that does not
contain an LCR. A message handler is a user-defined procedure
that can process non-LCR user messages in a customized way.
The message handler offers advantages in
any environment that has applications that need to update one or
more remote databases or perform some other remote action.