Apply Process
Creation
Once the events and messages are propagated
to the destination queue, they are ready to be dequeue by the
Apply process. The active Apply process applies the changes to
the destination objects.
As shown in Figure 5.2, When an Apply
process is created using add_subset_rules,
add_table_rules, add_schema_rules, or
add_global_rules procedures of the dbms_streams_adm
package, the Apply process applies only the captured events.
When an Apply process is created using the add_message_rule
procedure of the dbms_streams_adm package, the Apply
process applies only user-enqueued events.
However, when an Apply process is created
using the create_apply procedure in the dbms_apply_adm
package, the apply_captured parameter can be used to
specify whether the Apply process applies captured or
user-enqueued events. By default, the apply_captured
parameter is set to FALSE for an Apply process created with this
procedure. Therefore, by default, an Apply process created with
the create_apply procedure in the dbms_apply_adm
package applies user-enqueued events.
Figure 5.2 Apply Process Creation
Procedures
The next section will provide details on
how to create an Apply process and the associated rules using
the various methods available.
Using
add_table_rules
This is the simplest of all methods and it
provides a way to define Apply rules table-by-table at the
destination database and helps in the creation of the Apply
process. In a single procedural call, all the necessary rules
are defined for the Apply process.