Pages

Thursday, 10 May 2012

Oracle Streams: An Overview

Oracle Streams enables information sharing. Each unit of shared information is called a message. The stream can propagate information within a database or from one database to another. Oracle Streams can be set up in homogeneous (all Oracle databases) or heterogeneous (non-Oracle and Oracle databases) environments.

Oracle Streams Information Flow

The database changes (DDL and DML) are captured at the source; those are then staged and propagated to one or more destination databases to be applied there.

Capturing ---> Staging ----> Propagating ---> Consuming

Capturing a Message:

Oracle Streams provides two ways to capture database changes implicitly: capture processes and synchronous captures.

Capture Process (Implicit Capture)

A capture process can capture DML changes made to tables, schemas, or an entire database, as well as DDL changes. Database changes are recorded in the redo log for the database. A capture process captures changes from the redo log and formats each captured change into a message called a logical change record (LCR - A message with a specific format that describes a database change). The messages captured by a capture process are called captured LCRs. A capture process can capture changes locally at the source database, or it can capture changes remotely at a downstream database. Capture Processes always caputre change from REDO LOGS.

Synchronous Process (Implicit Capture)

A synchronous capture can capture DML changes made to tables. Rules determine which changes are captured by a capture process or synchronous capture. A synchronous capture uses an internal mechanism to capture changes and format each captured change into an LCR. The messages captured by a synchronous capture are called persistent LCRs. A synchronous capture can only capture changes locally at the source database.

Explicit Capture:

Users and applications can also enqueue messages manually. These messages can be LCRs, or they can be messages of a user-defined type called user messages. When users and applications enqueue messages manually, it is referred to as explicit capture.

Staging a Message

Messages are stored (or staged) in a queue. These messages can be logical change records (LCRs) or user messages. Capture processes and synchronous captures enqueue messages into an ANYDATA queue, which can stage messages of different types. Users and applications can enqueue messages into an ANYDATA queue or into a TYPED queue. A TYPED queue can stage messages of one specific type only.

Propagating a Message

Oracle Streams propagations can propagate messages from one queue to another. These queues can be in the same database or in different databases.

Oracle Streams enables you to configure an environment in which changes are shared through directed networks. In a directed network, propagated messages pass through one or more intermediate databases before arriving at a destination database where they are consumed. The messages might or might not be consumed at an intermediate database in addition to the destination database.

Consuming a Message

A message is consumed when it is dequeued from a queue. An apply process can dequeue messages implicitly. A user, application, or messaging client can dequeue messages explicitly. The database where messages are consumed is called the destination database. In some configurations, the source database and the destination database can be the same.

Message Types:

Raw Bytes
Oracle Objects
XML

No comments:

Post a Comment

About the Author

I have more than 10 years of experience in IT industry. Linkedin Profile

I am currently messing up with neural networks in deep learning. I am learning Python, TensorFlow and Keras.

Author: I am an author of a book on deep learning.

Quiz: I run an online quiz on machine learning and deep learning.