Oracle Essentials [Electronic resources] : Oracle Database 10g, 3rd Edition

Jonathan Stern

نسخه متنی -صفحه : 167/ 113
نمايش فراداده

12.5 Oracle Streams

Oracle9i Release 2 introduced Oracle Streams, a method of sharing data and events within a database or between databases. Streams enables the propagation of changes via a capture-and-apply process. Changes can be propagated between Oracle instances, from Oracle instances to non-Oracle instances (via Transparent Gateways), and from non-Oracle databases to Oracle (via messaging gateways). Streams leverages log-based procedures during change capture and queuing procedures as part of the staging. User-supplied "apply" rules define consumption.

Changes are captured from the source database redo log via a background database process into a logical change record (LCR). LCR and user message events are enqueued (staged) in a Streams queue. Events are propagated from source to target queues and then, via a background process, dequeued in the target database and applied. Oracle Database 10g adds new capabilities for the downstream capture of changes and for the enqueue /dequeue of messages in batch.

Oracle Streams is typically managed through the Java version of Oracle Enterprise Manager. In Oracle Database 10g, Streams can be configured to provide new message notification via email, HTTP, and PL/SQL. For migration from Advanced Replication to Streams, Oracle Database 10g provides a migration tool.

12.5.1 Oracle Streams and Grid Computing

Oracle Streams provides key functionality in Oracle Database 10g grid computing implementations. By its nature, grid computing can consist of widely distributed data, users, and platforms. Streams enables the movement of data when and where it is needed, as well as message sharing, notification or invocation of user procedures on events, message and database change subscriptions, and interoperation with other platforms. Oracle Database 10g streamed databases can offload processing to replica databases by creating operational data stores, or can create replicas and apply changes from replicas or data transformations to the production database. (Grid computing is described in more detail in Chapter 14.)

The use of Streams also plays a role in database migrations to grid computing and Oracle Database 10g. A single command begins the migration process. During this process, Streams captures changes on the source database that are then applied to the target as migration nears completion.