Oracle DBMS_XSTREAM_ADM
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Provides interfaces for streaming database changes between an Oracle database and heterogeneous, external, systems enabling applications to stream data changes both in or out.
AUTHID CURRENT_USER
Constants
Name Data Type Value
Miscellaneous
RESET_PARAMETERS BINARY_INTEGER 1
RESET_HANDLERS BINARY_INTEGER 2
RESET_PROGRESS BINARY_INTEGER 4
RESET_ALL BINARY_INTEGER 2147483647
Set Message Tracing
ACTION_TRACE BINARY_INTEGER 1
ACTION_MEMORY BINARY_INTEGER 2
Variable is_xstream BOOLEAN;
Dependencies
ANYDATA DBMS_LOGREP_UTIL DBMS_STREAMS_DECL
DBMS_APPLY_ADM DBMS_STANDARD DBMS_UTILITY
DBMS_APPLY_ADM_INTERNAL DBMS_STREAMS_ADM DBMS_XSTREAM_ADM_INTERNAL
DBMS_CAPTURE_ADM_INTERNAL DBMS_STREAMS_ADM_IVK DBMS_XSTREAM_ADM_UTL
DBMS_CAPTURE_ADM_IVK DBMS_STREAMS_ADM_UTL DBMS_XSTREAM_GG_ADM
DBMS_LOGREP_LIB DBMS_STREAMS_ADM_UTL_INVOK DBMS_XSTREAM_UTL_IVK
Documented Yes
First Available 11.2.0.1
Security Model Owned by SYS with EXECUTE granted to the EXECUTE_CATALOG_ROLE role
Source {ORACLE_HOME}/rdbms/admin/dbmsxstr.sql
Subprograms
ADD_COLUMN CREATE_INBOUND REMOVE_QUEUE
ADD_GLOBAL_PROPAGATION_RULES CREATE_OUTBOUND REMOVE_RULE
ADD_GLOBAL_RULES DELETE_COLUMN REMOVE_SUBSET_OUTBOUND_RULES
ADD_OUTBOUND DELETE_REPLICATION_EVENTS REMOVE_XSTREAM_CONFIGURATION
ADD_SCHEMA_PROPAGATION_RULES DROP_INBOUND RENAME_COLUMN
ADD_SCHEMA_RULES DROP_OUTBOUND RENAME_SCHEMA
ADD_SUBSET_OUTBOUND_RULES ENABLE_GG_XSTREAM_FOR_STREAMS RENAME_TABLE
ADD_SUBSET_PROPAGATION_RULES GET_MESSAGE_TRACKING SET_MESSAGE_TRACKING
ADD_SUBSET_RULES GET_TAG SET_PARAMETER
ADD_TABLE_PROPAGATION_RULES IS_GG_XSTREAM_FOR_STREAMS SET_TAG
ADD_TABLE_RULES KEEP_COLUMNS SET_UP_QUEUE
ALTER_INBOUND MERGE_STREAMS SPLIT_STREAMS
ALTER_OUTBOUND MERGE_STREAMS_JOB START_OUTBOUND
COMPARE_POSITION PURGE_SOURCE_CATALOG STOP_OUTBOUND
CONVERT_POSITION RECOVER_OPERATION  
 
ADD_OUTBOUND
Creates an Oracle XStream outbound server that dequeues logical change records (LCRs) from the specified queue

Overload 1
dbms_xstream_adm.add_outbound(
server_name           IN VARCHAR2,
queue_name            IN VARCHAR2  DEFAULT NULL,
source_database       IN VARCHAR2  DEFAULT NULL,
table_names           IN dbms_utility.uncl_array,
schema_names          IN dbms_utility.uncl_array,
connect_user          IN VARCHAR2  DEFAULT NULL,
comment               IN VARCHAR2  DEFAULT NULL,
capture_name          IN VARCHAR2  DEFAULT NULL,
start_scn             IN NUMBER    DEFAULT NULL,
start_time            IN TIMESTAMP DEFAULT NULL,
include_dml           IN BOOLEAN   DEFAULT TRUE,
include_ddl           IN BOOLEAN   DEFAULT TRUE,
source_root_name      IN VARCHAR2  DEFAULT NULL,
source_container_name IN VARCHAR2  DEFAULT NULL);
TBD
Overload 2 dbms_xstream_adm.add_outbound(
server_name           IN VARCHAR2,
queue_name            IN VARCHAR2,
source_database       IN VARCHAR2  DEFAULT NULL,
table_names           IN VARCHAR2  DEFAULT NULL,
schema_names          IN VARCHAR2  DEFAULT NULL,
connect_user          IN VARCHAR2  DEFAULT NULL,
comment               IN VARCHAR2  DEFAULT NULL,
capture_name          IN VARCHAR2  DEFAULT NULL,
start_scn             IN NUMBER    DEFAULT NULL,
start_time            IN TIMESTAMP DEFAULT NULL,
include_dml           IN BOOLEAN   DEFAULT TRUE,
include_ddl           IN BOOLEAN   DEFAULT TRUE,
source_root_name      IN VARCHAR2  DEFAULT NULL,
source_container_name IN VARCHAR2  DEFAULT NULL);
TBD
 
ADD_SUBSET_OUTBOUND_RULES
Adds subset rules to an outbound server configuration

Overload 1
dbms_xstream_adm.add_subset_outbound_rules(
server_name     IN VARCHAR2,
table_name      IN VARCHAR2,
condition       IN VARCHAR2 DEFAULT NULL,
column_list     IN dbms_utility.lname_array,
keep            IN BOOLEAN  DEFAULT TRUE,
source_database IN VARCHAR2 DEFAULT NULL);
SELECT rule_owner, subsetting_operation, rule_name
FROM dba_xstream_rules
WHERE subsetting_operation IS NOT NULL;
Overload 2 dbms_xstream_adm.add_subset_outbound_rules(
server_name     IN VARCHAR2,
table_name      IN VARCHAR2,
condition       IN VARCHAR2 DEFAULT NULL,
column_list     IN VARCHAR2 DEFAULT NULL,
keep            IN BOOLEAN  DEFAULT TRUE,
source_database IN VARCHAR2 DEFAULT NULL);
SELECT rule_owner, subsetting_operation, rule_name
FROM dba_xstream_rules
WHERE subsetting_operation IS NOT NULL;
 
ALTER_INBOUND
Modifies an Oracle XStream inbound server dbms_xstream_adm.alter_inbound(
server_name IN VARCHAR2,
apply_user  IN VARCHAR2 DEFAULT NULL,
comment     IN VARCHAR2 DEFAULT NULL);
TBD
 
ALTER_OUTBOUND
Modifies an Oracle XStream outbound server

Overload 1
dbms_xstream_adm.alter_outbound(
server_name           IN VARCHAR2,
table_names           IN dbms_utility.uncl_array,
schema_names          IN dbms_utility.uncl_array,
add                   IN BOOLEAN   DEFAULT TRUE,
capture_user          IN VARCHAR2  DEFAULT NULL,
connect_user          IN VARCHAR2  DEFAULT NULL,
comment               IN VARCHAR2  DEFAULT NULL,
inclusion_rule        IN BOOLEAN   DEFAULT TRUE,
start_scn             IN NUMBER    DEFAULT NULL,
start_time            IN TIMESTAMP DEFAULT NULL,
include_dml           IN BOOLEAN   DEFAULT TRUE,
include_ddl           IN BOOLEAN   DEFAULT TRUE,
source_database       IN VARCHAR2  DEFAULT NULL,
source_container_name IN VARCHAR2  DEFAULT NULL);
TBD
Overload 2 dbms_xstream_adm.alter_outbound(
server_name           IN VARCHAR2,
table_names           IN VARCHAR2  DEFAULT NULL,
schema_names          IN VARCHAR2  DEFAULT NULL,
add                   IN BOOLEAN   DEFAULT TRUE,
capture_user          IN VARCHAR2  DEFAULT NULL,
connect_user          IN VARCHAR2  DEFAULT NULL,
comment               IN VARCHAR2  DEFAULT NULL,
inclusion_rule        IN BOOLEAN   DEFAULT TRUE,
start_scn             IN NUMBER    DEFAULT NULL,
start_time            IN TIMESTAMP DEFAULT NULL,
include_dml           IN BOOLEAN   DEFAULT TRUE,
include_ddl           IN BOOLEAN   DEFAULT TRUE,
source_database       IN VARCHAR2  DEFAULT NULL,
source_container_name IN VARCHAR2  DEFAULT NULL);
TBD
 
COMPARE_POSITION (new 12.2)
Compares two LCRID values dbms_xstream_adm.compare_position(
position1 IN RAW,
position2 IN RAW)
RETURN BINARY_INTEGER;
TBD
 
CONVERT_POSITION (new 12.2)
Converts an LCRID value to the specified version (1 or 2) dbms_xstream_adm.convert_position(
position IN RAW,
version  IN BINARY_INTEGER)
RETURN RAW;
TBD
 
CREATE_INBOUND
Creates an Oracle XStream inbound server and its queue dbms_xstream_adm.create_inbound(
server_name IN VARCHAR2,
queue_name  IN VARCHAR2,
apply_user  IN VARCHAR2 DEFAULT NULL,
comment     IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_OUTBOUND
Creates an Oracle XStream outbound server, queue, and capture process to enable client applications to stream out Oracle database changes encapsulated in logical change records (LCRs)

Overload 1
dbms_xstream_adm.create_outbound(
server_name          IN VARCHAR2,
source_database      IN VARCHAR2 DEFAULT NULL,
table_names          IN VARCHAR2 DEFAULT NULL,
schema_names         IN VARCHAR2 DEFAULT NULL,
capture_user         IN VARCHAR2 DEFAULT NULL,
connect_user         IN VARCHAR2 DEFAULT NULL,
comment              IN VARCHAR2 DEFAULT NULL,
capture_name         IN VARCHAR2 DEFAULT NULL,
include_dml          IN BOOLEAN  DEFAULT TRUE,
include_ddl          IN BOOLEAN  DEFAULT TRUE,
source_root_name     IN VARCHAR2 DEFAULT NULL,
source_contaier_name IN VARCHAR2);
TBD
Overload 2 dbms_xstream_adm.create_outbound(
server_name          IN VARCHAR2,
source_database      IN VARCHAR2 DEFAULT NULL,
table_names          IN dbms_utility.uncl_array,
schema_names         IN dbms_utility.uncl_array,
capture_user         IN VARCHAR2 DEFAULT NULL,
connect_user         IN VARCHAR2 DEFAULT NULL,
comment              IN VARCHAR2 DEFAULT NULL,
capture_name         IN VARCHAR2 DEFAULT NULL,
include_dml          IN BOOLEAN  DEFAULT TRUE,
include_ddl          IN BOOLEAN  DEFAULT TRUE,
source_root_name     IN VARCHAR2 DEFAULT NULL,
source_contaier_name IN VARCHAR2);
TBD
 
DELETE_REPLICATION_EVENTS (new 12.2)
Undocumented dbms_xstream_adm.delete_replication_events(
streams_name  IN VARCHAR2  DEFAULT NULL,
streams_type  IN VARCHAR2  DEFAULT NULL,
process_type  IN VARCHAR2  DEFAULT NULL,
event_name    IN VARCHAR2  DEFAULT NULL,
include_error IN BOOLEAN   DEFAULT TRUE,
event_time    IN TIMESTAMP DEFAULT NULL);
TBD
 
DROP_INBOUND
Removes an inbound server configuration dbms_xstream_adm.drop_inbound(server_name IN VARCHAR2);
TBD
 
DROP_OUTBOUND
Removes an outbound server configuration dbms_xstream_adm.drop_outbound(server_name IN VARCHAR2);
TBD
 
ENABLE_GG_XSTREAM_FOR_STREAMS
Enables XStream performance optimizations for Oracle Streams components dbms_xstream_adm.enable_gg_xstream_for_streams(enable IN BOOLEAN DEFAULT TRUE);
exec dbms_xstream_adm.enable_gg_xstream_for_streams(FALSE);
 
GET_MESSAGE_TRACKING
Returns the tracking label for the current session dbms_xstream_adm.get_message_tracking RETURN VARCHAR2;
SELECT dbms_xstream_adm.get_message_tracking
FROM dual;
 
GET_TAG
Gets the binary tag for all redo entries generated by the current session dbms_xstream_adm.get_tag RETURN RAW;
See SET_TAG Demo Below
 
IS_GG_XSTREAM_FOR_STREAMS
Returns TRUE if the transaction is Golden Gate dbms_xstream_adm.is_gg_xstream_for_streams RETURN BOOLEAN;
set serveroutput on

BEGIN
  IF dbms_xstream_adm.is_gg_xstream_for_streams THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/
 
REMOVE_SUBSET_OUTBOUND_RULES
Removes subset rules from an outbound server configuration dbms_xstream_adm.remove_subset_outbound_rules(
server_name      IN VARCHAR2,
insert_rule_name IN VARCHAR2,
update_rule_name IN VARCHAR2,
delete_rule_name IN VARCHAR2);
SELECT rule_owner, subsetting_operation, rule_name
FROM dba_xstream_rules
WHERE subsetting_operation IS NOT NULL;
 
SET_MESSAGE_TRACKING
Sets the current tracking label for logical change records (LCRs) produced by the current session dbms_xstream_adm.set_message_tracking(
tracking_label IN VARCHAR2,
actions        IN NUMBER DEFAULT dbms_xstream_adm.action_memory);
exec dbms_xstream_adm.set_message_tracking(NULL, dbms_xstream_adm.action_memory);
 
SET_TAG
sets the binary tag for all redo entries subsequently generated by the current session. Each redo entry generated by DML or DDL statements in the current session will have this tag. dbms_xstream_adm.set_tag(tag IN RAW DEFAULT NULL);
DECLARE
 tagVal RAW(2000) := utl_raw.cast_to_raw('UWXSTag');
BEGIN
  dbms_xstream_adm.set_tag(tagVal);
  dbms_output.put_line(dbms_xstream_adm.get_tag);
END;
/
 
START_OUTBOUND
Starts an XStream outbound server streaming out the LCRs to an XStream client application dbms_xstream_adm.start_outbound(server_name IN VARCHAR2);
TBD
 
STOP_OUTBOUND
Stoops an XStream outbound server streaming out the LCRs to an XStream client application. dbms_xstream_adm.stop_outbound(server_name IN VARCHAR2);
TBD

Related Topics
Built-in Functions
Built-in Packages
DBMS_XSTREAM_ADM_UTL
DBMS_XSTREAM_AUTH_IVK
DBMS_XSTREAM_UTL_IVK
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved