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

Part Number E15874-01
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

9 Addendum To DBMS_STREAMS_ADM

The DBMS_STREAMS_ADM package, one of a set of Oracle Streams packages, provides subprograms to configure and manage Oracle Streams apply processes, outbound servers, and inbound servers.

This chapter contains the following topic:

See Also:

Inbound Server Creation and Apply User

The following procedures in the DBMS_STREAMS_ADM package can create an XStream inbound server:

If the streams_name parameter in one of these procedures is set to NULL, if the streams_type parameter is set to apply, and if one relevant apply process, inbound server, or outbound server exists, then the procedure uses the relevant apply process, inbound server, or outbound server. The relevant apply process, inbound server, or outbound server is identified in one of the following ways:

If one of these procedures creates an inbound server, then it configures the current user as the apply user. The apply user is the user in whose security domain an XStream client application attaches to an Oracle database.

An apply user applies changes directly to database objects, runs custom rule-based transformations configured for inbound server rules, and runs apply handlers configured for the inbound server. This user must have the necessary privileges to apply changes. The procedure grants the apply user DEQUEUE privilege on the queue used by the inbound server and configures the user as a secure queue user of the queue.

Each inbound server must have a unique name. The name cannot be used by an apply process, outbound server, or messaging client in the same database, and the name cannot be used by another inbound server in the same database.

Note:

These procedures cannot create an outbound server.

XStream Inbound Server Rules for LCRs

The following procedures add rules to a rule set of an XStream inbound server when you specify apply for the streams_type parameter and an inbound server for the streams_name parameter:

If one of these procedures adds rules to the positive rule set for the inbound server, then the rules specify that the inbound server applies LCRs sent to it by the XStream client application. If one of these procedures adds rules to the negative rule set for the inbound server, then the rules specify that the discards LCRs sent to it by the XStream client application. For inbound server rules, you should execute these procedures at the database to which the XStream client application attaches. If an inbound server has no rule sets, then it applies all of the messages sent to it by the XStream client application.

Changes applied by an inbound server created by one of these procedures generate tags in the redo log at the destination database with a value of '00' (double zero). You can use the ALTER_APPLY procedure in the DBMS_APPLY_ADM package to alter the tag value after the inbound server is created, if necessary.

The rules in the XStream inbound server rule sets determine which messages are either applied or discarded after the messages are received from the XStream client application. An inbound server can only process LCRs sent from an XStream client application.

When one of these procedures creates rules for an inbound server, the procedure ignores the source_database parameter.

Note:

If the name specified in the streams_name parameter does not exist, then these procedures always create an apply process. The apply process remains an apply process if it receives captured LCRs from a capture process. The apply process can become an inbound server if an XStream client application attaches to it before it receives captured LCRs from a capture process. After the initial contact, an apply process cannot be changed into an inbound server, and an inbound server cannot be changed into an apply process.

XStream Outbound Server Rules for LCRs

The following procedures add rules to a rule set of an XStream outbound server when you specify apply for the streams_type parameter and an outbound server for the streams_name parameter:

If one of these procedures adds rules to the positive rule set for the outbound server, then the rules specify that the outbound server sends LCRs in its queue to the XStream client application. If one of these procedures adds rules to the negative rule set for the outbound server, then the rules specify that the outbound server discards LCRs in its queue. For outbound server rules, you should execute these procedures at the database to which the XStream client application attaches.

An outbound server can process captured LCRs from only one source database. The source database is the database where the changes originated. If one of these procedures creates an outbound server, then specify the source database for the outbound server using the source_database parameter. If the source_database parameter is NULL, and one of these procedures creates an outbound server, then the source database name of the first LCR received by the outbound server is used for the source database.

The rules in the outbound server's rule sets determine which messages are dequeued by the outbound server. When you create rules with one of these procedures, and you specify a value for the source_database parameter, then the rules include conditions for the specified source database. If the outbound server dequeues an LCR with a source database that is different than the source database for the outbound server, then an error is raised. In addition, when adding rules to an existing outbound server, the database specified in the source_database parameter cannot be different than the source database for the outbound server. You can determine the source database for an outbound server by querying the DBA_XSTREAM_OUTBOUND data dictionary view.

Note:

These procedures cannot create an XStream outbound server. You can use one of the procedures in the DBMS_STREAMS_ADM package to add rules to a rule set used by the outbound server after you create it.