Since Oracle Database 11g Release 2, APIs, known as XStream Out and XStream In, are available.
This technology enables high performance, near real-time information-sharing infrastructure between Oracle databases and non-Oracle databases, non-RDBMS Oracle products, file systems, third party software applications, and so on. XStream is built on the infrastructure used by Oracle Streams.
OCI XStream functions in OCI XStream Functions
34.1.1 XStream Out
XStream Out allows a remote client to attach to an outbound server and extract row changes in the form of logical change records (LCRs).
To use XStream Out, a capture process and an outbound server must be created. All data types supported by Oracle Streams, including LOB,
XMLType, are supported by XStream. The capture process and the outbound server need not be on the same database instance. After the capture process and the outbound server have started, row changes are captured and sent to the outbound server. An external client application can connect to this outbound server using OCI. After the connection is established, the client application can loop while waiting for LCRs from the outbound server. The client application can register a client-side callback to be invoked each time an LCR is received. At any time, the client application can detach from the outbound server as needed. Upon restart, the outbound server knows where in the redo stream to start streaming LCRs to the client application.
Oracle Database XStream Guide for an introduction to XStream Out
34.1.2 XStream In
To replicate non-Oracle data into Oracle databases, use XStream In.
This technology allows a remote client application to attach to an inbound server and send row and DDL changes in the form of LCRs.
An external client application connects to the inbound server using OCI. After the connection is established, the client application acts as the capture agent for the inbound server by streaming LCRs to it. A client application can attach to only one inbound server for each database connection, and each inbound server only allows one client application to attach to it.
XStream In concepts in Oracle Database XStream Guide
34.1.3 Position Order and LCR Streams
Each LCR has a position attribute.
The position of an LCR identifies its placement in the stream of LCRs in a transaction.
Position order in an LCR in Oracle Database XStream Guide
34.1.4 XStream and Character Sets
For XStream Out, in general, setting the client application character set to the outbound server database character set is the best practice.
XStream Out implicitly converts character data in LCRs from the outbound server database character set to the client application character set. XStream In implicitly converts character data in LCRs from the client application character set to the inbound server database character set.
To improve performance, complete the following tasks:
Analyze the LCR data flow from the source to the destination.
Set the client character set of the OCI client application to the one that minimizes character conversion, incurs no data loss, and takes advantage of the implicit conversion done by XStream or the destination.