Oracle DBMS_STREAMS
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Database, schema, and object level synchronous and asynchronous replication.

Streams was deprecated 03-Jan-2018 but this package still exists in 21c,
AUTHID CURRENT_USER
Dependencies
ANYDATA DBMS_STREAMS_ADM_UTL GV$STREAMS_APPLY_COORDINATOR
DBMS_APPLY_ADM DBMS_STREAMS_ADM_UTL_INVOK GV$STREAMS_APPLY_READER
DBMS_LOGREP_LIB DBMS_STREAMS_LCR_INT GV$STREAMS_APPLY_SERVER
DBMS_LOGREP_UTIL DBMS_UTILITY GV$STREAMS_CAPTURE
DBMS_STANDARD LCR$_DDL_RECORD USER$
DBMS_STREAMS_ADM LCR$_ROW_RECORD XMLTYPE
Documented Yes
First Available 9.2
Security Model Owned by SYS with EXECUTE granted to PUBLIC

Direct access to some objects in this package is prevented by means of an Accessible By clause.
Source {ORACLE_HOME}/rdbms/admin/dbmsstr.sql
Subprograms
 
COMPATIBLE_10_1
Use with the GET_COMPATIBLE member function for logical change records (LCRs) to specify behavior based on compatibility dbms_streams.compatible_10_1 RETURN INTEGER;
SELECT dbms_streams.compatible_10_1
FROM dual;

COMPATIBLE_10_1
---------------
       10010000
 
COMPATIBLE_10_2
Use with the GET_COMPATIBLE member function for logical change records (LCRs) to specify behavior based on compatibility dbms_streams.compatible_10_2 RETURN INTEGER;
SELECT dbms_streams.compatible_10_2
FROM dual;

COMPATIBLE_10_2
---------------
       10020000
 
COMPATIBLE_11_1
Use with the GET_COMPATIBLE member function for logical change records (LCRs) to specify behavior based on compatibility dbms_streams.compatible_11_1 RETURN INTEGER;
SELECT dbms_streams.compatible_11_1
FROM dual;

COMPATIBLE_11_1
---------------
       11000000
 
COMPATIBLE_11_2
Use with the GET_COMPATIBLE member function for logical change records (LCRs) to specify behavior based on compatibility dbms_streams.compatible_11_2 RETURN INTEGER;
SELECT dbms_streams.compatible_11_2
FROM dual;

COMPATIBLE_11_2
---------------
       11020000
 
COMPATIBLE_12_1
Use with the GET_COMPATIBLE member function for logical change records (LCRs) to specify behavior based on compatibility dbms_streams.compatible_12_1 RETURN INTEGER;
SELECT dbms_streams.compatible_12_1
FROM dual;

COMPATIBLE_12_1
---------------
       12010000
 
COMPATIBLE_12_2
Use with the GET_COMPATIBLE member function for logical change records (LCRs) to specify behavior based on compatibility dbms_streams.compatible_12_2 RETURN INTEGER;
SELECT dbms_streams.compatible_12_2
FROM dual;

COMPATIBLE_12_2
---------------
       12020000
 
COMPATIBLE_9_2
Use with the GET_COMPATIBLE member function for logical change records (LCRs) to specify behavior based on compatibility dbms_streams.compatible_9_2 RETURN INTEGER;
SELECT dbms_streams.compatible_9_2
FROM dual;

COMPATIBLE_9_2
--------------
             0
 
CONVERT_ANYDATA_TO_LCR_DDL
Converts an ANYDATA object to a SYS.LCR$_DDL_RECORD dbms.streams.convert_anydata_to_lcr_ddl(source SYS.ANYDATA) RETURN SYS.LCR$_DDL_RECORD;
TBD
 
CONVERT_ANYDATA_TO_LCR_ROW
Converts an ANYDATA object to a SYS.LCR$_ROW_RECORD object dbms.streams.convert_anydata_to_lcr_row(source SYS.ANYDATA) RETURN SYS.LCR$_ROW_RECORD;
TBD
 
CONVERT_LCR_TO_XML
Convert a DML or DDL LCR encapsulated in an anydata into an XMLLCR object dbms_streams.convert_lcr_to_xml(anylcr sys.anydata) RETURN SYS.XMLTYPE;
TBD
 
CONVERT_USER_TO_ID
Relocated from dbms_repcat_utl. If user exists, return ID else NULL dbms_streams.convert_user_to_id(canon_uname IN VARCHAR2) RETURN NUMBER;
SELECT dbms_streams.convert_user_to_id('C##UWCLASS')
FROM dual;

DBMS_STREAMS.CONVERT_USER_TO_ID('C##UWCLASS')
---------------------------------------------
                                          111
 
CONVERT_XML_TO_LCR
Convert an XMLLCR object into a DML or DDL LCR encapsulated in AnyData dbms_streams.convert_xml_to_lcr(xmldat sys.xmltype) RETURN SYS.ANYDATA;
TBD
 
GET_FINAL_LOB
Relocated from dbms_reputil2. If column_changed$_char is non NULL returns new if and only if column_changed$_char is 'Y'

Overload 1
dbms_streams.get_final_lob(
column_changed$_char IN CHAR,
current              IN CLOB CHARACTER SET ANY_CS,
new                  IN CLOB CHARACTER SET "CURRENT"%CHARSET)
RETURN CLOB CHARACTER SET "CURRENT"%CHARSET;
TBD
If old and new are identical, then returns current else return new. Uses column_changed$_varchar2 if non-null

Overload 2
dbms_streams.get_final_lob(
column_changed$_char IN CHAR,
current              IN BLOB,
new                  IN BLOB)
RETURN BLOB;
TBD
 
GET_INFORMATION
Returns information about various Streams attributes dbms.streams.get_information(name IN VARCHAR2) RETURN SYS.ANYDATA;
SELECT dbms_streams.get_information('SENDER')
FROM dual;

DBMS_STREAMS.GET_INFORMATION('SENDER')()
----------------------------------------
ANYDATA()
 
GET_STREAMS_NAME
Returns the name of the invoker dbms_streams.get_streams_name RETURN VARCHAR2;
SELECT dbms_streams.get_streams_name
FROM dual;

GET_STREAMS_NAME
------------------
 
 
GET_STREAMS_TYPE
Returns the type of the invoker dbms_streams.get_streams_type RETURN VARCHAR2;
SELECT dbms_streams.get_streams_type
FROM dual;

GET_STREAMS_TYPE
-----------------
 
 
GET_TAG
Gets the binary tag for all redo entries generated by the current session

This function and functionality are  protected by an ACCESSIBLE BY clause
dbms_streams.get_tag RETURN RAW;
set serveroutput on

DECLARE
 raw_tag RAW(2000);
BEGIN
  raw_tag := dbms_streams.get_tag;
  dbms_output.put_line('Tag Value = ' || RAWTOHEX(raw_tag));
END;
/
DECLARE
*
ERROR at line 1:
ORA-04060: insufficient privileges to execute DBMS_STREAMS.GET_TAG
ORA-06512: at "SYS.DBMS_STREAMS", line 29
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 581
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 625
ORA-06512: at "SYS.DBMS_STREAMS", line 25
ORA-06512: at line 4


or

SELECT dbms_streams.get_tag
FROM dual;
SELECT dbms_streams.get_tag
*
ERROR at line 1:
ORA-04060: insufficient privileges to execute DBMS_STREAMS.GET_TAG
ORA-06512: at "SYS.DBMS_STREAMS", line 29
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 581
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 625
ORA-06512: at "SYS.DBMS_STREAMS", line 25
 
MAX_COMPATIBLE
Internal compatible representation dbms_streams.max_compatible RETURN INTEGER;
set serveroutput on

DECLARE
 mc INTEGER;
BEGIN
  mc := dbms_streams.max_compatible;
  dbms_output.put_line(mc);
END;
/
2147483647

PL/SQL procedure successfully completed.
 
SET_TAG
Sets the binary tag for all redo entries subsequently generated by the current session

This procedure is protected with an ACCESSIBLE BY clause
dbms_streams.set_tag(tag IN RAW DEFAULT NULL);
exec dbms_streams.set_tag(HEXTORAW('17'));
BEGIN dbms_streams.set_tag(HEXTORAW('17')); END;
*
ERROR at line 1:
ORA-04060: insufficient privileges to execute DBMS_STREAMS.SET_TAG
ORA-06512: at "SYS.DBMS_STREAMS", line 16
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 581
ORA-06512: at "SYS.DBMS_LOGREP_UTIL", line 625
ORA-06512: at "SYS.DBMS_STREAMS", line 12
ORA-06512: at line 1

Related Topics
Advanced Queuing
Built-in Functions
Built-in Packages
DBMS_CAPTURE_ADM
DBMS_PROPAGATION_ADM
DBMS_RECOVERABLE_SCRIPT
DBMS_STREAMS_ADM
DBMS_STREAMS_ADM_UTIL_INT
DBMS_STREAMS_ADM_UTIL_INVOK
DBMS_STREAMS_AUTH
DBMS_STREAMS_CONTROL_ADM
DBMS_STREAMS_PUB_RPC
DBMS_STREAMS_RPC_INTERNAL
DBMS_STREAMS_SM
DBMS_STREAMS_TABLESPACE_ADM
DBMS_STREAMS_TBS_INT
DBMS_STREAMS_TBS_INT_INVOK
What's New In 19c
What's New In 20c-21c

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-2021 Daniel A. Morgan All Rights Reserved
  DBSecWorx