Skip Headers
Oracle® Database XStream Guide
11g Release 2 (11.2)

Part Number E16545-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

2 XStream Use Cases

XStream provides a flexible infrastructure for sharing information between Oracle data sources and non-Oracle data sources. Therefore, you can use XStream in many different ways to meet the needs of various organizations. This chapter describes the most common use cases for XStream.

This chapter contains these topics:

See Also:

Introduction to XStream Use Cases

Each XStream use case in this chapter contains three main elements:

In some cases, a section includes a reference to sample code in the Oracle Database installation that illustrates a scenario.

XStream Out Use Cases

In each XStream Out use case, the following components and actions send Oracle Database changes to a client application:

  • Oracle Streams captures data changes made to an Oracle database.

  • Oracle Streams sends these changes, in the form of logical change records (LCRs), to an outbound server.

  • The outbound server sends the LCRs to a client application.

How the client application processes the LCRs is different for each use case.

See Also:

"XStream Out"

XStream In Use Cases

In each XStream In use case, the following components and actions send Oracle Database changes to an inbound server:

  • A client application gathers data changes from an external data source and sends them to an inbound server in the form of LCRs.

  • The inbound server receives the LCRs from a client application.

  • The inbound server can apply the data changes to database objects in an Oracle database. The inbound server can also process the LCRs in a customized way.

How the client application gathers the data changes is different for each use case.

See Also:

"XStream In"

Replicating Data Changes with Non-Oracle Databases

You can configure a heterogeneous replication environment with XStream. Replication is generally used to improve availability and to improve performance by spreading the network load over multiple regions and servers. In a heterogeneous replication environment, data is replicated between databases from different vendors. See Oracle Streams Replication Administrator's Guide for common reasons to use replication.

XStream Out can send data changes made to an Oracle database to a non-Oracle database. Specifically, the client application connects to the outbound server and receives changes made to tables within the Oracle database. The client application then applies the data changes in the LCRs to the non-Oracle database. The client application can process the LCRs in any customized way before applying them.

XStream In can receive data changes made to a non-Oracle database. Specifically, the client application gathers the data changes made to the non-Oracle database, formats these changes into LCRs, and sends these LCRs to an inbound server. The inbound server applies the changes in the LCRs to the Oracle database.

Using Files to Store Data Changes

Some environments use files to store data changes. Typically, files store data changes for the following reasons:

XStream Out can send Oracle Database changes to a file in a file system. Specifically, the client application writes the data changes in LCRs to the file. The client application can process the LCRs in any customized way before writing them to the file, and the file can reside on the computer system running the client application or on a different computer system. Using SQL generation, the client application can also write the SQL statement required to perform the change encapsulated in a row LCR to a file.

XStream In can send data changes from a file to an Oracle database. Specifically, the client application reads the data changes from the file and sends the changes, in the form of LCRs, to an inbound server.

XStream Demo That Replicates Database Changes Using Files

A demo is available that creates sample client applications that perform file-based replication using the XStream APIs. Specifically, at one database, the demo creates an XStream Out configuration that captures database changes and sends the LCRs to an outbound server. A client application attaches to the outbound server and writes the database changes to a file.

At a different database, the demo creates an XStream In client application that attaches to an inbound server, reads the changes in the file, and sends them in the form of LCRs to the inbound server. The inbound server applies the changes to the database objects at the destination database.

This demo is available in the following location:

$ORACLE_HOME/rdbms/demo/xstream/fbr

Sharing Data Changes with a Client-Side Memory Cache

Some environments cache data in memory to improve performance. Cached data can provide low response times and high throughput for systems that require the best possible performance. XStream can share data changes incrementally with a client side memory cache.

XStream Out can incrementally refresh a client-side memory cache by sending Oracle database changes to a memory cache. Specifically, the client application applies the data changes in the LCRs to the memory cache. The client application can process the LCRs in any customized way before applying them, and the memory cache can reside on the computer system running the client application or on a different computer system.

XStream In can incrementally retrieve data changes from a memory cache. Specifically, the client application retrieves the data changes and sends the changes, in the form of LCRs, to an inbound server. The memory cache can reside on the computer system running the client application or on a different computer system.