发表人:wzy25 | 发表时间: 2008年三月31日, 10:30
A stream is a flow of information either within a database or from one database to another.
Oracle Streams is a set of processes and database structures that enable you to share data and messages in a data stream.
The unit of information that is put into a stream is called an event:
Data definition language (DDL) or data manipulation language (DML) changes, formatted as an LCR
User-created events
Events are staged in and propagated between queues
Three basic tasks of a stream:
Capture
Staging
Apply (consumption)
A stream can perform multiple tasks across multiple databases.
Capture
You can place events in Oracle Streams:
Implicitly: Local log-based capture of DML and DDL changes either local or remote
Explicitly: Direct enqueue of user messages
Event Staging
Oracle Streams uses a staging area that:
Is implemented as a queue in a queue table
Supports the self-describing SYS.AnyData data type
Stages captured events and user-created events in the same queue
Retains events until they are consumed by all applicable tasks, processes, or applications
Staging-Area Propagation
Other staging areas can receive events from:
A remote database
Within the database
An event does not need to be applied at the destination database but can be routed from there to a new destination.
Apply
Events in the staging area can be consumed:
Implicitly by an apply process
Explicitly by an application performing dequeue via open interfaces, such as JMS, C, OCI, or PL/SQL
The apply process can:
Apply data changes directly to database objects
Perform a series of operations based on the event by means of an apply handler
Enqueue an event into a specified queue
Oracle Streams Usage: Scenarios
You can deploy Oracle Streams to meet a variety of information-sharing requirements:
Data replication
Message queuing
Data warehouse loading
Event management and notification
Data provisioning in a grid environment
High availability during database upgrade, platform migration, and application upgrade
Using Oracle Streams for Upgrades and Migrations
You can use Oracle Streams to facilitate:
Database upgrades
Application upgrades
Database-platform migrations