Combined Capture and Apply - Oracle 11g

Oracle Database 11g Streams launches a new feature called the combined capture and apply,which provides the capability for a capture process to send logical change records (LCRs) directly to an apply process without using a propagation.

This feature cannot be used with synchronous capture.This feature can be used when the capture and apply processes are on the same database or on different databases.When combined capture and apply is in place, the LCRs are transferred using database links without staging the LCR in a queue.

When the database is started, the capture process automatically detects that the requirements for combined capture and apply are satisfied.The capture process will initiate a connection with the apply process and send the LCRs directly to the apply process.

The capture process does not stage the LCR in the queue; likewise, the propagation and queues are not used to send and store LCRs.

Requirements for Combined Capture and Apply

Let’s review the restrictions imposed when the capture and apply processes reside on the same database.First,capture and apply must use the same queue, and the compatible initialization para meter must be set to 11.1.

This combined queue must have a single publisher and single consumer for the capture and apply processes.This queue must also have a single consumer for the buffered queue for the apply process.

There are different rules of governance when the capture and apply processes are on different databases. Obviously, both databases must have compatible set to 11.1.0 or higher. Also, the following rules apply:

  • The propagation must be set up between the capture process queue and the apply process queue without an intermediate queue.
  • The capture process queue must have a single consumer:the propagation between the capture process and the apply process queue.
  • The apply process queue must have a single publisher: the propagation between the capture process and the apply process queue.

In the world of RAC,combined capture and apply can be architected to reside on the same instance,on different instances in the RAC cluster,or on different databases.Similar restrictions apply when the capture process and apply process are on different instances of the RAC database or on different databases.

If the requirements for combined capture and apply are met,Oracle Streams automatically detects and implements the optimized configuration, bypassing the propagation and queues to send and store LCRs.

Combined Capture and Apply Validation

You can view V$STREAMS_CAPTURE and V$STREAMS_APPLY_READER to obtain connect details and statistics relative to combined capture and apply. TheV$STREAMS_ APPLY_READER view has additional columns:

SQL> desc V$STREAMS_APPLY_READER
Name Null? Type
----------------------------- ------ ------------
SID NUMBER
SERIAL# NUMBER
APPLY# NUMBER
APPLY_NAME VARCHAR2(30)
..
..
PROXY_SID NUMBER
PROXY_SERIAL NUMBER
PROXY_SPID VARCHAR2(12)
CAPTURE_BYTES_RECEIVED NUMBER

The PROXY_SID and PROXY_SERIAL columns are populated when communication for direct combined capture and apply is established. The PROXY_SID and PROXY_SERIAL columns are the SID and SERIAL of the apply process network receiver.

The PROXY_SPID column provides the OS PID of the apply network receiver.

The CAPTURE_BYTES_RECEIVED column provides the number of bytesreceived from the capture process.There are also three new columns introducedto the V$STREAMS_CAPTURE view:

SQL> desc V$STREAMS_CAPTURE
Name Null? Type
------------------------------- ------ -----------------
SID NUMBER
SERIAL# NUMBER
CAPTURE# NUMBER
CAPTURE_NAME VARCHAR2(30)
LOGMINER_ID NUMBER
STARTUP_TIME DATE
STATE VARCHAR2(551)
..
..
APPLY_NAME VARCHAR2(30)
APPLY_DBLINK VARCHAR2(128)
APPLY_MESSAGES_SENT NUMBER
APPLY_BYTES_SENT NUMBER

The STATE column can have several different values depending on the condition of the capture process such as WAITING FOR APPLY TO START,WAITING FOR PROPAGATION TOSTART,or CONNECTING TO APPLY DATABASE.

The APPLY_NAME and APPLY_DBLINK columns are populated when combined capture and apply processes are established.If the combined capture and apply condi tions are satisfied,APPLY_DBLINK is populated with the remote database name.

The APPLY_MESSAGE_SENT and APPLY_BYTES_SENT columns show the number of messages and bytes sent to the apply process.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 11g Topics