Skip Headers

Oracle9i Supplied PL/SQL Packages and Types Reference
Release 2 (9.2)

Part Number A96612-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_STREAMS, 2 of 2


Summary of DBMS_STREAMS Subprograms

Table 72-1 DBMS_STREAMS Subprograms
Subprogram Description

"CONVERT_ANYDATA_TO_LCR_DDL Function"

Converts a SYS.AnyData object to a SYS.LCR$_DDL_RECORD object

"CONVERT_ANYDATA_TO_LCR_ROW Function"

Converts a SYS.AnyData object to a SYS.LCR$_ROW_RECORD object

"GET_INFORMATION Function"

Returns information about various Streams attributes

"GET_TAG Function"

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

"SET_TAG Procedure"

Sets the binary tag for all redo entries subsequently generated by the current session

CONVERT_ANYDATA_TO_LCR_DDL Function

Converts a SYS.AnyData object into a SYS.LCR$_DDL_RECORD object. You can specify this function in a rule-based transformation when propagating data definition language (DDL) LCRs from a SYS.AnyData queue to a SYS.LCR$_DDL_RECORD typed queue.

Alternatively, you can use this function in a transformation created by the CREATE_TRANSFORMATION procedure in the DBMS_TRANSFORM package. Then, use the transformation you create when you add a subscriber for propagation of DDL LCRs from a SYS.AnyData queue to a SYS.LCR$_DDL_RECORD typed queue.

See Also:

Oracle9i Streams for more information about this function

Syntax

DBMS_STREAMS.CONVERT_ANYDATA_TO_LCR_DDL(
   source     IN  SYS.AnyData) 
RETURN SYS.LCR$_DDL_RECORD;

Parameter

Table 72-2 CONVERT_ANYDATA_TO_LCR_DDL Function Parameter
Parameter Description

source

The SYS.AnyData object to be converted. If this object is not a DDL LCR, then an exception is raised.


CONVERT_ANYDATA_TO_LCR_ROW Function

Converts a SYS.AnyData object into a SYS.LCR$_ROW_RECORD object. You can use this function in a rule-based transformation when propagating row LCRs from a SYS.AnyData queue to a SYS.LCR$_ROW_RECORD typed queue.

Alternatively, you can use this function in a transformation created by the CREATE_TRANSFORMATION procedure in the DBMS_TRANSFORM package. Then, use the transformation you create when you add a subscriber for propagation of row LCRs from a SYS.AnyData queue to a SYS.LCR$_ROW_RECORD typed queue.

See Also:

Oracle9i Streams for more information about this function

Syntax

DBMS_STREAMS.CONVERT_ANYDATA_TO_LCR_ROW(
   source      IN  SYS.AnyData) 
RETURN SYS.LCR$_ROW_RECORD;

Parameter

Table 72-3 CONVERT_ANYDATA_TO_LCR_ROW Function Parameter
Parameter Description

source

The SYS.AnyData object to be converted. If this object is not a row LCR, then an exception is raised.

GET_INFORMATION Function

Returns information about various Streams attributes.

Syntax

DBMS_STREAMS.GET_INFORMATION(
   name      IN  VARCHAR2) 
RETURN SYS.AnyData;

Parameter

Table 72-4 GET_INFORMATION Function Parameter
Parameter Description

name

The type of information you want to retrieve. Currently, the following names are available:

  • SENDER: Returns the name of the sender for the current LCR (from its AQ message properties). This function is called inside an apply handler. An apply handler is a DML handler, a DDL handler, an error handler, or a message handler. Returns NULL if called outside of an apply handler. The return value is to be interpreted as a VARCHAR2.
  • CONSTRAINT_NAME: Returns the name of the constraint that was violated for an LCR that raised an error. This function is called inside a DML handler or error handler for an apply process. Returns NULL if called outside of a DML handler or error handler. The return value is to be interpreted as a VARCHAR2.

GET_TAG Function

Gets the binary tag for all redo entries generated by the current session.

See Also:

Oracle9i Streams for more information about tags

Syntax

DBMS_STREAMS.GET_TAG()
RETURN RAW;

Usage Notes

The following example illustrates how to display the current LCR tag as output:

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;
/

You can also display the value by querying the DUAL view:

SELECT DBMS_STREAMS.GET_TAG FROM DUAL; 

SET_TAG Procedure

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. This procedure affects only the current session.


Note:

This procedure is not transactional. That is, the effects of SET_TAG cannot be rolled back.


See Also:

Oracle9i Streams for more information about tags

Syntax

DBMS_STREAMS.SET_TAG(
   tag   IN RAW   DEFAULT NULL);

Parameter

Table 72-5 SET_TAG Procedure Parameter
Parameter Description

tag

The binary tag for all subsequent redo entries generated by the current session. A raw value is a sequence of bytes, and a byte is a sequence of bits.

By default, the tag for a session is NULL.

The size limit for a tag value is 2000 bytes.

Usage Notes

To set the tag to the hexadecimal value of '17' in the current session, run the following procedure:

EXEC DBMS_STREAMS.SET_TAG(tag => HEXTORAW('17'));


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback