5. Uses of Streams Oracle Streams are used for the following Message Queuing Oracle Streams Advanced Queuing (AQ) enables user applications to enqueue messages into queue, propagate messages to subscribing queues, notify user applications that messages are ready for consumption, and dequeue messages at the destination. Data Replication Streams can capture DML and DDL changes made to database objects and replicate those changes to one or more other databases. Data Warehouse Loading Data warehouse loading is a special case of data replication. Some of the most critical tasks in creating and maintaining a data warehouse include refreshing existing data, and adding new data from the operational databases. Streams components can capture changes made to a production system and send those changes to a staging database or directly to a data warehouse or operational data store
6.
7. Capture Process Changes made to database objects in an Oracle database are logged in the redo log to guarantee recoverability in the event of user error or media failure. A capture process is an Oracle background process that scans the database redo log to capture DML and DDL changes made to database objects. A capture process formats these changes into messages called Logical change record (LCR) and enqueues them into a queue Locally: A local capture process runs at the source database and captures changes from the local source database redo log. Remotely at a downstream database A real-time downstream capture configuration means that the log writer process (LGWR) at the source database sends redo data from the online redo log to the downstream database. At the downstream database, the redo data is stored in the standby redo log, and the capture process captures changes from the standby redo log. An archived-log downstream capture configuration means that archived redo log files from the source database are copied to the downstream database, and the capture process captures changes in these archived redo log files.
8. Message Staging and Propagation Streams uses queues to stage messages for propagation or consumption. Propagations send messages from one queue to another, and these queues can be in the same database or in different databases. The queue from which the messages are propagated is called the source queue, and the queue that receives the messages is called the destination queue. There can be a one-to-many, many-to-one, or many-to-many relationship between source and destination queues. Propagation from a Source Queue to a Destiniaton Queue Explicit Enqueue and Dequeue of Messages in a Single Queue Explicit Enqueue, Propagation, and Dequeue of Message
9. Overview of the Apply Process An apply process is an Oracle background process that dequeues messages from a queue and either applies each message directly to a database object or passes the message as a parameter to a user-defined procedure called an apply handler. Apply handlers include message handlers, DML handlers, DDL handler, precommit handlers, and error handlers.
10.
11. Oracle to Non-Oracle Data Sharing If an Oracle database is the source and a non-Oracle database is the destination, then the non-Oracle database destination lacks the following Streams mechanisms: A queue to receive messages An apply process to dequeue and apply messages To share DML changes, the Oracle database functions as a proxy and carries out some of the steps that would normally be done at the destination database. That is, the messages intended for the non-Oracle destination database are dequeued in the Oracle database itself, and an apply process at the Oracle database uses Heterogeneous Services to apply the messages to the non-Oracle database across a network connection through a gateway.
12. Non-Oracle to Oracle Data Sharing To capture and propagate changes from a non-Oracle database to an Oracle database, a custom application is required. It gets the changes made to the non-Oracle database by reading from transaction logs, using triggers, or some other method. The application must assemble and order the transactions and must convert each change into an LCR. Next, the application must enqueue the LCRs into a queue in an Oracle database by using the PL/SQL interface, where they can be processed by an apply process.
13. Examples Of Streams Configurations Streams Configuration in a Single Database