The Main Features of the Apply Process
Apply process rules for the LCR events can
be defined at various levels such as table level, schema level,
and database level. For the non-LCR events, the DBA can create
rules to control the consumption process.
Any typical Apply process can either handle
captured events or user enqueued events. When the need exists to
handle both of these types, two separate Apply processes must be
created.
Direct Apply
Direct apply means that an Apply process
applies an LCR without running a user procedure. This is likely
the main method of applying changes to the destination database.
It is also the simplest form of consuming the events at
destination side.
The Apply process applies the change in the
LCR to a database object unless a conflict or apply error is
encountered. In the case of a conflict or apply error, the
Apply process tries to resolve the error with a conflict handler
or a user-specified procedure called an error handler.
Custom Apply and Apply Handlers
When an Apply process passes the LCR, as a
parameter, to a user procedure for processing, it is known as
Custom Apply. The user procedure can then process the LCR in a
customized way by using a suitable stored procedure. These
user-developed procedures are known as apply handlers. Each
apply process can have multiple apply handlers.
Figure 2.3 illustrates the four types of
apply handlers that are based on the type of events it deals
with.