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

8 Addendum To DBMS_APPLY_ADM

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

All of the subprograms in this package can manage Oracle Streams apply processes. In an XStream configuration, an apply process can also function as an XStream outbound server or inbound server. A subset of the subprograms in this package can manage outbound servers and inbound servers.

The following sections describe how these subprograms work with outbound servers and inbound servers:

See Also:

DBMS_APPLY_ADM Subprograms and Outbound Servers

Table 8-1 shows whether a subprogram in this package can manage an outbound server. This table also provides notes about how the subprogram works with an outbound server. Also, when a subprogram can manage an outbound server, the parameters in the subprogram work the same way for an outbound server as they would for an apply process, unless the "Notes" column in the table describes different behavior for a parameter.

Table 8-1 DBMS_APPLY_ADM Subprograms and Outbound Servers

Subprogram Purpose Can Manage an Outbound Server? Notes

ADD_STMT_HANDLER Procedure

Adds a statement DML handler for a specified operation on a specified database object to a single Oracle Streams apply process or to all apply processes in the database

No

Outbound servers ignore all apply handlers.

ALTER_APPLY Procedure

Alters an Oracle Streams outbound server

Yes

Outbound servers only process LCRs. Therefore, outbound servers ignore message handlers specified in the message_handler parameter.

The apply_user parameter can change the connect user for an outbound server.

COMPARE_OLD_VALUES Procedure

Specifies whether to compare the old value of one or more columns in a row logical change record (row LCR) with the current value of the corresponding columns at the destination site during apply

No

This procedure cannot manage an outbound server.

CREATE_APPLY Procedure

Creates an apply process

No

This procedure cannot create an outbound server.

CREATE_OBJECT_DEPENDENCY Procedure

Creates an object dependency

No

This procedure cannot manage an outbound server.

DELETE_ALL_ERRORS Procedure

Deletes all the error transactions for the specified apply process

No

This procedure cannot manage an outbound server.

DELETE_ERROR Procedure

Deletes the specified error transaction

No

This procedure cannot manage an outbound server.

DROP_APPLY Procedure

Drops an outbound server

Yes

When the DROP_APPLY procedure is executed on an outbound server, it runs the DROP_OUTBOUND procedure in the DBMS_XSTREAM_ADM package. Therefore, it might also drop the outbound server's capture process and queue.

DROP_OBJECT_DEPENDENCY Procedure

Drops an object dependency

No

This procedure cannot manage an outbound server.

EXECUTE_ALL_ERRORS Procedure

Reexecutes the error transactions for the specified apply process.

No

Outbound servers do not enqueue error transactions into an error queue.

EXECUTE_ERROR Procedure

Reexecutes the specified error transaction

No

Outbound servers do not enqueue error transactions into an error queue.

GET_ERROR_MESSAGE Function

Returns the message payload from the error queue for the specified message number and transaction identifier

No

This procedure cannot manage an outbound server.

REMOVE_STMT_HANDLER Procedure

Removes a statement DML handler for a specified operation on a specified database object from a single apply process or from all apply processes in the database

No

This procedure cannot manage an outbound server.

SET_CHANGE_HANDLER Procedure

Sets or unsets a statement DML handler that tracks changes for a specified operation on a specified database object for a single apply process

No

Outbound servers ignore all apply handlers.

SET_DML_HANDLER Procedure

Sets a user procedure as a procedure DML handler for a specified operation on a specified database object for a single apply process or for all apply processes in the database

No

Outbound servers ignore all apply handlers.

SET_ENQUEUE_DESTINATION Procedure

Sets the queue where the apply process automatically enqueues a message that satisfies the specified rule

No

This procedure cannot manage an outbound server.

SET_EXECUTE Procedure

Specifies whether a message that satisfies the specified rule is executed by an apply process

No

This procedure cannot manage an outbound server.

SET_GLOBAL_INSTANTIATION_SCN Procedure

Records the specified instantiation SCN for the specified source database and, optionally, for the schemas at the source database and the tables owned by these schemas

Yes

The apply_database_link parameter must be set to NULL or to the local database for this procedure to set an instantiation SCN for an outbound server.

See Also: "Apply Process Features That Are Applicable to Outbound Servers" for more information about outbound servers and instantiation SCNs

SET_KEY_COLUMNS Procedures

Records the set of columns to be used as the substitute primary key for local apply purposes and removes existing substitute primary key columns for the specified object if they exist

No

This procedure cannot manage an outbound server.

SET_PARAMETER Procedure

Sets an apply parameter to the specified value

Yes

Outbound servers ignore the settings for the following apply parameters:

  • allow_duplicate_rows

  • commit_serialization

  • disable_on_error

  • parallelism

  • preserve_encryption

  • rtrim_on_implicit_conversion

The commit_serialization parameter is always set to FULL for an outbound server, and the parallelism parameter is always set to 1 for an outbound server.

You can use the other apply parameters with outbound servers.

SET_SCHEMA_INSTANTIATION_SCN Procedure

Records the specified instantiation SCN for the specified schema in the specified source database and, optionally, for the tables owned by the schema at the source database

Yes

The apply_database_link parameter must be set to NULL or to the local database for this procedure to set an instantiation SCN for an outbound server.

See Also: "Apply Process Features That Are Applicable to Outbound Servers" for more information about outbound servers and instantiation SCNs

SET_TABLE_INSTANTIATION_SCN Procedure

Records the specified instantiation SCN for the specified table in the specified source database

Yes

The apply_database_link parameter must be set to NULL or to the local database for this procedure to set an instantiation SCN for an outbound server.

See Also: "Apply Process Features That Are Applicable to Outbound Servers" for more information about outbound servers and instantiation SCNs

SET_UPDATE_CONFLICT_HANDLER Procedure

Adds, updates, or drops an update conflict handler for the specified object

No

This procedure cannot manage an outbound server.

SET_VALUE_DEPENDENCY Procedure

Sets or removes a value dependency

No

This procedure cannot manage an outbound server.

START_APPLY Procedure

Directs the outbound server to start applying messages

Yes

This procedure functions the same way for apply processes and outbound servers.

STOP_APPLY Procedure

Stops the outbound server from applying any messages and rolls back any unfinished transactions being applied

Yes

This procedure functions the same way for apply processes and outbound servers.


DBMS_APPLY_ADM Subprograms and Inbound Servers

Table 8-2 shows whether a subprogram in this package can manage an inbound server. This table also provides notes about how the subprogram works with an inbound server. Also, when a subprogram can manage an inbound server, the parameters in the subprogram work the same way for an inbound server as they would for an apply process, unless the "Notes" column in the table describes different behavior for a parameter.

Table 8-2 DBMS_APPLY_ADM Subprograms and Inbound Servers

Subprogram Purpose Can Manage an Inbound Server? Notes

ADD_STMT_HANDLER Procedure

Adds a statement DML handler for a specified operation on a specified database object to a single inbound server or to all inbound servers in the database

Yes

Inbound servers can use statement DML handlers.

ALTER_APPLY Procedure

Alters an inbound server

Yes

The apply_user parameter can change the apply user for an inbound server.

COMPARE_OLD_VALUES Procedure

Specifies whether to compare the old value of one or more columns in a row logical change record (row LCR) with the current value of the corresponding columns at the destination site during apply

Yes

This procedure functions the same way for apply processes and inbound servers.

CREATE_APPLY Procedure

Creates an inbound server

Yes

The CREATE_APPLY procedure always creates an apply process. The apply process remains an apply process if it receives messages from a source other than an XStream client application, such as a capture process. The apply process can become an inbound server if an XStream client application attaches to it before it receives messages from any other source. 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.

When creating an inbound server using the CREATE_APPLY procedure, set the apply_captured parameter to TRUE.

Inbound server can use apply handlers. However, inbound servers only process LCRs. Therefore, inbound servers ignore message handlers specified in the message_handler parameter.

CREATE_OBJECT_DEPENDENCY Procedure

Creates an object dependency

Yes

This procedure functions the same way for apply processes and inbound servers.

DELETE_ALL_ERRORS Procedure

Deletes all the error transactions for the specified inbound server

Yes

This procedure functions the same way for apply processes and inbound servers.

DELETE_ERROR Procedure

Deletes the specified error transaction

Yes

This procedure functions the same way for apply processes and inbound servers.

DROP_APPLY Procedure

Drops an inbound server

Yes

When the DROP_APPLY procedure is executed on an inbound server, it runs the DROP_INBOUND procedure in the DBMS_XSTREAM_ADM package. Therefore, it might also drop the inbound server's queue.

DROP_OBJECT_DEPENDENCY Procedure

Drops an object dependency

Yes

This procedure functions the same way for apply processes and inbound servers.

EXECUTE_ALL_ERRORS Procedure

Reexecutes the error transactions for the specified inbound server

Yes

Inbound servers enqueue error transactions into an error queue the same way that apply processes enqueue error transactions into an error queue.

EXECUTE_ERROR Procedure

Reexecutes the specified error transaction

Yes

Inbound servers enqueue error transactions into an error queue the same way that apply processes enqueue error transactions into an error queue.

GET_ERROR_MESSAGE Function

Returns the message payload from the error queue for the specified message number and transaction identifier

Yes

This procedure functions the same way for apply processes and inbound servers.

REMOVE_STMT_HANDLER Procedure

Removes a statement DML handler for a specified operation on a specified database object from a single inbound server or from all inbound servers in the database

Yes

This procedure functions the same way for apply processes and inbound servers.

SET_CHANGE_HANDLER Procedure

Sets or unsets a statement DML handler that tracks changes for a specified operation on a specified database object for a single inbound server

Yes

Inbound servers can use change handlers.

SET_DML_HANDLER Procedure

Sets a user procedure as a procedure DML handler for a specified operation on a specified database object for a single inbound server or for all inbound servers in the database

Yes

Inbound servers can use procedure DML handlers.

SET_ENQUEUE_DESTINATION Procedure

Sets the queue where the inbound server automatically enqueues a message that satisfies the specified rule

Yes

This procedure functions the same way for apply processes and inbound servers.

SET_EXECUTE Procedure

Specifies whether a message that satisfies the specified rule is executed by an inbound server

Yes

This procedure functions the same way for apply processes and inbound servers.

SET_GLOBAL_INSTANTIATION_SCN Procedure

Records the specified instantiation SCN for the specified source database and, optionally, for the schemas at the source database and the tables owned by these schemas

No

Inbound servers ignore instantiation SCNs.

SET_KEY_COLUMNS Procedures

Records the set of columns to be used as the substitute primary key for local apply purposes and removes existing substitute primary key columns for the specified object if they exist

Yes

This procedure functions the same way for apply processes and inbound servers.

SET_PARAMETER Procedure

Sets an apply parameter to the specified value

Yes

Inbound servers ignore the setting for the maximum_scn apply process parameter. You can use all of the other apply process parameters with inbound servers.

The default parallelism of an inbound server is 4.

SET_SCHEMA_INSTANTIATION_SCN Procedure

Records the specified instantiation SCN for the specified schema in the specified source database and, optionally, for the tables owned by the schema at the source database

No

Inbound servers ignore instantiation SCNs.

SET_TABLE_INSTANTIATION_SCN Procedure

Records the specified instantiation SCN for the specified table in the specified source database

No

Inbound servers ignore instantiation SCNs.

SET_UPDATE_CONFLICT_HANDLER Procedure

Adds, updates, or drops an update conflict handler for the specified object

Yes

This procedure functions the same way for apply processes and inbound servers.

SET_VALUE_DEPENDENCY Procedure

Sets or removes a value dependency

Yes

This procedure functions the same way for apply processes and inbound servers.

START_APPLY Procedure

Directs the inbound server to start applying messages

Yes

This procedure functions the same way for apply processes and inbound servers.

STOP_APPLY Procedure

Stops the inbound server from applying any messages and rolls back any unfinished transactions being applied

Yes

This procedure functions the same way for apply processes and inbound servers.