Oracle DBMS_STREAMS_MESSAGING
Version 18.3.0.1

General Information
Library Note Morgan's Library Page Header
For how many years have you been working with physical servers that are starving your database of the memory necessary to deploy important new performance features such as the Result Cache, Memoptimize Pool, In-Memory Aggregation, In-Memory Column Store, and Full Database Caching? Too long? Contact me to learn how to improve all queries ... not just some queries.
Purpose API for Streams to perform messaging using AQ
AUTHID CURRENT_USER
Constants
Name Data Type Value
forever PLS_INTEGER -1
no_wait PLS_INTEGER 0
Dependencies
ANYDATA DBMS_LOGREP_UTIL DBMS_STREAMS_ADM
AQ$_AGENT DBMS_LOGREP_UTIL_INVOK DBMS_UTILITY
DBMS_AQ DBMS_STANDARD  
Documented No
Exceptions
Error Code Reason
ORA-25228 No more messages (nomoremsgs)
ORA-25235 End of current transaction (endofcurtrans)
First Available Not known
Security Model Owned by SYS with EXECUTE granted to the EXECUTE_CATALOG_ROLE role
Source {ORACLE_HOME}/rdbms/admin/dbmsstr.sql
Subprograms
 
DEQUEUE
Dequeue a Streams AQ message

dequeue_mode: one of 'REMOVE', 'LOCKED', 'BROWSE'.
navigation: one of 'FIRST MESSAGE', 'NEXT MESSAGE', 'NEXT TRANSACTION'
dbms_streams_messaging.dequeue(
queue_name   IN  VARCHAR2,
streams_name IN  VARCHAR2,
payload      OUT SYS.ANYDATA,
dequeue_mode IN  VARCHAR2       DEFAULT 'REMOVE',
navigation   IN  VARCHAR2       DEFAULT 'NEXT MESSAGE',
wait         IN  BINARY_INTEGER DEFAULT FOREVER);
DECLARE
 ad_msg sys.anyData;
BEGIN
  dbms_streams_messaging.dequeue('SCOTT_CAPTURE_Q', 'SCOTT_REP', ad_msg);
END;
/
Overload 2 dbms_streams_messaging.dequeue(
queue_name   IN  VARCHAR2,
streams_name IN  VARCHAR2,
payload      OUT SYS.ANYDATA,
dequeue_mode IN  VARCHAR2       DEFAULT 'REMOVE',
navigation   IN  VARCHAR2       DEFAULT 'NEXT MESSAGE',
wait         IN  BINARY_INTEGER DEFAULT FOREVER,
msgid        OUT RAW);
DECLARE
 ad_msg sys.anyData;
 mid    RAW;
BEGIN
  dbms_streams_messaging.dequeue('SCOTT_CAPTURE_Q', 'SCOTT_REP', ad_msg, 'BROWSE', 'FIRST_MESSAGE', 'FOREVER', mid);
END;
/
 
ENQUEUE
Enqueue a Streams AQ message dbms_streams_messaging.enqueue(
queue_name IN VARCHAR2,
payload    IN sys.anydata);
DECLARE
 msg sys.anydata := sys.anyData.convertVarchar2('hello world'))
BEGIN
  dbms_streams_messaging.enqueue('SCOTT_CAPTURE_Q', msg);
END;
/
Overload 2 dbms_streams_messaging.enqueue(
queue_name IN  VARCHAR2,
payload    IN  sys.anydata,
msgid      OUT RAW);
DECLARE
 msg sys.anydata := sys.anyData.convertVarchar2('hello world');
 mid RAW;
BEGIN
  dbms_streams_messaging.enqueue('SCOTT_CAPTURE_Q', msg);
  dbms_output.put_line(mid);
END;
/

Related Topics
ANYDATA
DBMS_STREAMS
DBMS_STREAMS_ADM
DBMS_STREAMS_ADM_UTL_INT
DBMS_STREAMS_AUTH
DBMS_STREAMS_CDC_ADM
DBMS_STREAMS_CONTROL_ADM
DBMS_STREAMS_HANDLER_ADM
DBMS_STREAMS_MC
DBMS_STREAMS_MC_INV
DBMS_STREAMS_PUB_RPC
DBMS_STREAMS_RPC_INTERNAL
DBMS_STREAMS_TABLESPACE_ADM
Packages
What's New In 12cR2
What's New In 18cR3

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