The APPLY Process

1. Apply Status

2. Start Apply

3. Stop Apply

 

The Apply Process dequeues a Logical Change Record (LCR) from the Apply Queue and either applies the change to the database or passes the LCR to a custom handler. If the Apply Process encounters and error, it places the LCR and the error in the Error Queue, and normally aborts. Changes must be applies in order since the Apply Process has no knowledge if one change is dependent on another. The Apply Process applies changes based on its defined Rules. Rules are discussed in another section.

A server can have one or more Apply Processes and each Apply Process can have multiple parallel Apply Servers.

Most of the current status information about all Apply Process on a server is contained in the view DBA_APPLY.

SQL> desc dba_apply

The Apply Process is controlled by the oracle supplied package DBMS_APPLY_ADM.

SQL> desc dbms_apply_adm

Determine the name and state of all Capture Processes on a server.

sqlplus strmadmin/password

SQL> select apply_name, status from dba_apply;

APPLY_NAME                     STATUS
------------------------------ --------
APPLY_TCI                      ENABLED

 

To get some more useful information you need to add some columns. As with the Capture Process, when the Apply Process has encountered an error, the error message and error number columns will contain that information, otherwise they are null. The status_change_time column records the last time the status changed, either by you starting/stopping the Apply Process or the Apply Process aborting on an error.

select
  apply_name,
  status,
  status_change_time,
  error_number,
 error_message
from dba_apply;

 

Stop an Apply Process

SQL> exec dbms_apply_adm.stop_apply ('APPLY_XYZ');

Start an Apply Process

SQL> exec dbms_apply_adm.start_apply ('APPLY_XYZ');


Contents