Skip Headers
Oracle® Streams Advanced Queuing User's Guide
11
g
Release 2 (11.2)
Part Number E11013-01
Home
Book List
Index
Master Index
Contact Us
Next
View PDF
Contents
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
What's New in Oracle® Database?
Notification Enhancements
Better Diagnosability and Manageability
Transition from Job Queue Processes to Database Scheduler
Messaging Gateway Enhancements
1
Introduction to Oracle® Database
What Is Queuing?
Oracle® Database Leverages Oracle Database
Oracle® Database in Integrated Application Environments
Oracle® Database Client/Server Communication
Multiconsumer Dequeuing of the Same Message
Oracle® Database Implementation of Workflows
Oracle® Database Implementation of Publish/Subscribe
Buffered Messaging
Asynchronous Notifications
Views on Registration
Event-Based Notification
Notification Grouping by Time
Enqueue Features
Dequeue Features
Propagation Features
Message Format Transformation
Other Oracle® Database Features
Interfaces to Oracle® Database
Oracle® Database Demonstrations
2
Basic Components
Object Name
Type Name
AQ Agent Type
AQ Recipient List Type
AQ Agent List Type
AQ Subscriber List Type
AQ Registration Information List Type
AQ Post Information List Type
AQ Registration Information Type
AQ Notification Descriptor Type
AQ Message Properties Type
AQ Post Information Type
AQ$_NTFN_MSGID_ARRAY Type
Enumerated Constants in the Oracle® Database Administrative Interface
Enumerated Constants in the Oracle® Database Operational Interface
AQ Background Processes
Queue Monitor Processes
Job Queue Processes
3
Oracle® Database: Programmatic Interfaces
Programmatic Interfaces for Accessing Oracle® Database
Using PL/SQL to Access Oracle® Database
Using OCI to Access Oracle® Database
Using OCCI to Access Oracle® Database
Using Visual Basic (OO4O) to Access Oracle® Database
Using Oracle Java Message Service (OJMS) to Access Oracle® Database
Accessing Standard and Oracle JMS Applications
Using Oracle® Database XML Servlet to Access Oracle® Database
Comparing Oracle® Database Programmatic Interfaces
Oracle® Database Administrative Interfaces
Oracle® Database Operational Interfaces
4
Managing Oracle® Database
Oracle® Database Compatibility Parameters
Queue Security and Access Control
Oracle® Database Security
Administrator Role
User Role
Access to Oracle® Database Object Types
Queue Security
Queue Privileges and Access Control
OCI Applications and Queue Access
Security Required for Propagation
Queue Table Export-Import
Exporting Queue Table Data
Importing Queue Table Data
Data Pump Export and Import
Oracle Enterprise Manager Support
Using Oracle® Database with XA
Restrictions on Queue Management
Subscribers
DML Not Supported on Queue Tables or Associated IOTs
Propagation from Object Queues with REF Payload Attributes
Collection Types in Message Payloads
Synonyms on Queue Tables and Queues
Synonyms on Object Types
Tablespace Point-in-Time Recovery
Virtual Private Database
Managing Propagation
EXECUTE Privileges Required for Propagation
Propagation from Object Queues
Optimizing Propagation
Handling Failures in Propagation
5
Oracle® Database Performance and Scalability
Persistent Messaging Performance Overview
Oracle® Database and Oracle Real Application Clusters
Oracle® Database in a Shared Server Environment
Persistent Messaging Basic Tuning Tips
Memory Requirements
Using Storage Parameters
I/O Configuration
Running Enqueue and Dequeue Processes Concurrently in a Single Queue Table
Running Enqueue and Dequeue Processes Serially in a Single Queue Table
Creating Indexes on a Queue Table
Other Tips
Propagation Tuning Tips
Buffered Messaging Tuning
Performance Views
6
Internet Access to Oracle® Database
Overview of Oracle® Database Operations over the Internet
Oracle® Database Internet Operations Architecture
Internet Message Payloads
Configuring the Web Server to Authenticate Users Sending POST Requests
Client Requests Using HTTP
User Sessions and Transactions
Oracle® Database Servlet Responses Using HTTP
Oracle® Database Propagation Using HTTP and HTTPS
Deploying the Oracle® Database XML Servlet
Internet Data Access Presentation (IDAP)
SOAP Message Structure
SOAP Envelope
SOAP Header
SOAP Body
SOAP Method Invocation
HTTP Headers
Method Invocation Body
Results from a Method Request
Request and Response IDAP Documents
IDAP Client Requests for Enqueue
IDAP Client Requests for Dequeue
IDAP Client Requests for Registration
IDAP Client Requests to Commit a Transaction
IDAP Client Requests to Roll Back a Transaction
IDAP Server Response to an Enqueue Request
IDAP Server Response to a Dequeue Request
IDAP Server Response to a Register Request
IDAP Commit Response
IDAP Rollback Response
IDAP Notification
IDAP Response in Case of Error
Notification of Messages by e-mail
7
Troubleshooting Oracle® Database
Debugging Oracle® Database Propagation Problems
Oracle® Database Error Messages
8
Oracle® Database Administrative Interface
Managing Queue Tables
Creating a Queue Table
Altering a Queue Table
Dropping a Queue Table
Purging a Queue Table
Migrating a Queue Table
Managing Queues
Creating a Queue
Altering a Queue
Starting a Queue
Stopping a Queue
Dropping a Queue
Managing Transformations
Creating a Transformation
Modifying a Transformation
Dropping a Transformation
Granting and Revoking Privileges
Granting Oracle® Database System Privileges
Revoking Oracle® Database System Privileges
Granting Queue Privileges
Revoking Queue Privileges
Managing Subscribers
Adding a Subscriber
Altering a Subscriber
Removing a Subscriber
Managing Propagations
Scheduling a Queue Propagation
Verifying Propagation Queue Type
Altering a Propagation Schedule
Enabling a Propagation Schedule
Disabling a Propagation Schedule
Unscheduling a Queue Propagation
Managing Oracle® Database Agents
Creating an Oracle® Database Agent
Altering an Oracle® Database Agent
Dropping an Oracle® Database Agent
Enabling Database Access
Disabling Database Access
Adding an Alias to the LDAP Server
Deleting an Alias from the LDAP Server
9
Oracle® Database & Messaging Gateway Views
DBA_QUEUE_TABLES: All Queue Tables in Database
USER_QUEUE_TABLES: Queue Tables in User Schema
ALL_QUEUE_TABLES: Queue Tables Queue Accessible to the Current User
DBA_QUEUES: All Queues in Database
USER_QUEUES: Queues In User Schema
ALL_QUEUES: Queues for Which User Has Any Privilege
DBA_QUEUE_SCHEDULES: All Propagation Schedules
USER_QUEUE_SCHEDULES: Propagation Schedules in User Schema
QUEUE_PRIVILEGES: Queues for Which User Has Queue Privilege
AQ$Queue_Table_Name: Messages in Queue Table
AQ$Queue_Table_Name_S: Queue Subscribers
AQ$Queue_Table_Name_R: Queue Subscribers and Their Rules
DBA_QUEUE_SUBSCRIBERS: All Queue Subscribers in Database
USER_QUEUE_SUBSCRIBERS: Queue Subscribers in User Schema
ALL_QUEUE_SUBSCRIBERS: Subscribers for Queues Where User Has Queue Privileges
DBA_TRANSFORMATIONS: All Transformations
DBA_ATTRIBUTE_TRANSFORMATIONS: All Transformation Functions
USER_TRANSFORMATIONS: User Transformations
USER_ATTRIBUTE_TRANSFORMATIONS: User Transformation Functions
DBA_SUBSCR_REGISTRATIONS: All Subscription Registrations
USER_SUBSCR_REGISTRATIONS: User Subscription Registrations
AQ$INTERNET_USERS: Oracle® Database Agents Registered for Internet Access
(G)V$AQ: Number of Messages in Different States in Database
(G)V$BUFFERED_QUEUES: All Buffered Queues in the Instance.
(G)V$BUFFERED_SUBSCRIBERS: Subscribers for All Buffered Queues in the Instance
(G)V$BUFFERED_PUBLISHERS: All Buffered Publishers in the Instance
(G)V$PERSISTENT_QUEUES: All Active Persistent Queues in the Instance
(G)V$PERSISTENT_QMN_CACHE: Performance Statistics on Background Tasks for Persistent Queues
(G)V$PERSISTENT_SUBSCRIBERS: All Active Subscribers of the Persistent Queues in the Instance
(G)V$PERSISTENT_PUBLISHERS: All Active Publishers of the Persistent Queues in the Instance
(G)V$PROPAGATION_SENDER: Buffer Queue Propagation Schedules on the Sending (Source) Side
(G)V$PROPAGATION_RECEIVER: Buffer Queue Propagation Schedules on the Receiving (Destination) Side
(G)V$SUBSCR_REGISTRATION_STATS: Diagnosability of Notifications
V$METRICGROUP: Information about the Metric Group
(G)V$STREAMSMETRIC: Streams Metrics for the Most Recent Interval
(G)V$STREAMSMETRIC_HISTORY: Streams Metrics Over Past Hour
(G)V$QUEUEMETRIC: Queue Metrics for the Most Recent Interval
(G)V$QUEUEMETRIC_HISTORY: Queue Metrics Over Past Hour
DBA_HIST_STREAMSMETRIC: Streams Metric History
DBA_HIST_QUEUEMETRIC: Queue Metric History
MGW_GATEWAY: Configuration and Status Information
MGW_AGENT_OPTIONS: Supplemental Options and Properties
MGW_LINKS: Names and Types of Messaging System Links
MGW_MQSERIES_LINKS: WebSphere MQ Messaging System Links
MGW_TIBRV_LINKS: TIB/Rendezvous Messaging System Links
MGW_FOREIGN_QUEUES: Foreign Queues
MGW_JOBS: Messaging Gateway Propagation Jobs
MGW_SUBSCRIBERS: Information for Subscribers
MGW_SCHEDULES: Information about Schedules
10
Oracle® Database Operations Using PL/SQL
Using Secure Queues
Enqueuing Messages
Enqueuing an Array of Messages
Listening to One or More Queues
Dequeuing Messages
Dequeuing an Array of Messages
Registering for Notification
Unregistering for Notification
Posting for Subscriber Notification
Adding an Agent to the LDAP Server
Removing an Agent from the LDAP Server
11
Introducing Oracle JMS
General Features of JMS and Oracle JMS
JMS Connection and Session
ConnectionFactory Objects
Using AQjmsFactory to Obtain ConnectionFactory Objects
Using JNDI to Look Up ConnectionFactory Objects
JMS Connection
JMS Session
JMS Destination
Using a JMS Session to Obtain Destination Objects
Using JNDI to Look Up Destination Objects
JMS Destination Methods
System-Level Access Control in JMS
Destination-Level Access Control in JMS
Retention and Message History in JMS
Supporting Oracle Real Application Clusters in JMS
Supporting Statistics Views in JMS
Structured Payload/Message Types in JMS
JMS Message Headers
JMS Message Properties
JMS Message Bodies
StreamMessage
BytesMessage
MapMessage
TextMessage
ObjectMessage
AdtMessage
Using Message Properties with Different Message Types
Buffered Messaging with Oracle JMS
JMS Point-to-Point Model Features
JMS Publish/Subscribe Model Features
JMS Publish/Subscribe Overview
DurableSubscriber
RemoteSubscriber
TopicPublisher
Recipient Lists
TopicReceiver
TopicBrowser
Setting Up JMS Publish/Subscribe Operations
JMS MessageProducer Features
Priority and Ordering of Messages
Specifying a Message Delay
Specifying a Message Expiration
Message Grouping
JMS Message Consumer Features
Receiving Messages
Message Navigation in Receive
Browsing Messages
Remove No Data
Retry with Delay Interval
Asynchronously Receiving Messages Using MessageListener
Exception Queues
JMS Propagation
RemoteSubscriber
Scheduling Propagation
Enhanced Propagation Scheduling Capabilities
Exception Handling During Propagation
Message Transformation with JMS AQ
J2EE Compliance
12
Oracle JMS Basic Operations
EXECUTE Privilege on DBMS_AQIN
Registering a ConnectionFactory
Registering Through the Database Using JDBC Connection Parameters
Registering Through the Database Using a JDBC URL
Registering Through LDAP Using JDBC Connection Parameters
Registering Through LDAP Using a JDBC URL
Unregistering a Queue/Topic ConnectionFactory
Unregistering Through the Database
Unregistering Through LDAP
Getting a QueueConnectionFactory or TopicConnectionFactory
Getting a QueueConnectionFactory with JDBC URL
Getting a QueueConnectionFactory with JDBC Connection Parameters
Getting a TopicConnectionFactory with JDBC URL
Getting a TopicConnectionFactory with JDBC Connection Parameters
Getting a QueueConnectionFactory or TopicConnectionFactory in LDAP
Getting a Queue or Topic in LDAP
Creating a Queue Table
Getting a Queue Table
Creating a Queue
Creating a Point-to-Point Queue
Creating a Publish/Subscribe Topic
Granting and Revoking Privileges
Granting Oracle® Database System Privileges
Revoking Oracle® Database System Privileges
Granting Publish/Subscribe Topic Privileges
Revoking Publish/Subscribe Topic Privileges
Granting Point-to-Point Queue Privileges
Revoking Point-to-Point Queue Privileges
Managing Destinations
Starting a Destination
Stopping a Destination
Altering a Destination
Dropping a Destination
Propagation Schedules
Scheduling a Propagation
Enabling a Propagation Schedule
Altering a Propagation Schedule
Disabling a Propagation Schedule
Unscheduling a Propagation
13
Oracle JMS Point-to-Point
Creating a Connection with Username/Password
Creating a Connection with Default ConnectionFactory Parameters
Creating a QueueConnection with Username/Password
Creating a QueueConnection with an Open JDBC Connection
Creating a QueueConnection with Default ConnectionFactory Parameters
Creating a QueueConnection with an Open OracleOCIConnectionPool
Creating a Session
Creating a QueueSession
Creating a QueueSender
Sending Messages Using a QueueSender with Default Send Options
Sending Messages Using a QueueSender by Specifying Send Options
Creating a QueueBrowser for Standard JMS Type Messages
Creating a QueueBrowser for Standard JMS Type Messages, Locking Messages
Creating a QueueBrowser for Oracle Object Type Messages
Creating a QueueBrowser for Oracle Object Type Messages, Locking Messages
Creating a QueueReceiver for Standard JMS Type Messages
Creating a QueueReceiver for Oracle Object Type Messages
14
Oracle JMS Publish/Subscribe
Creating a Connection with Username/Password
Creating a Connection with Default ConnectionFactory Parameters
Creating a TopicConnection with Username/Password
Creating a TopicConnection with Open JDBC Connection
Creating a TopicConnection with an Open OracleOCIConnectionPool
Creating a Session
Creating a TopicSession
Creating a TopicPublisher
Publishing Messages with Minimal Specification
Publishing Messages Specifying Topic
Publishing Messages Specifying Delivery Mode, Priority and TimeToLive
Publishing Messages Specifying a Recipient List
Creating a DurableSubscriber for a JMS Topic Without Selector
Creating a DurableSubscriber for a JMS Topic With Selector
Creating a DurableSubscriber for an Oracle Object Type Topic Without Selector
Creating a DurableSubscriber for an Oracle Object Type Topic With Selector
Specifying Transformations for Topic Subscribers
Creating a Remote Subscriber for JMS Messages
Creating a Remote Subscriber for Oracle Object Type Messages
Specifying Transformations for Remote Subscribers
Unsubscribing a Durable Subscription for a Local Subscriber
Unsubscribing a Durable Subscription for a Remote Subscriber
Creating a TopicReceiver for a Topic of Standard JMS Type Messages
Creating a TopicReceiver for a Topic of Oracle Object Type Messages
Creating a TopicBrowser for Standard JMS Messages
Creating a TopicBrowser for Standard JMS Messages, Locking Messages
Creating a TopicBrowser for Oracle Object Type Messages
Creating a TopicBrowser for Oracle Object Type Messages, Locking Messages
Browsing Messages Using a TopicBrowser
15
Oracle JMS Shared Interfaces
Oracle® Database JMS Operational Interface: Shared Interfaces
Starting a JMS Connection
Getting a JMS Connection
Committing All Operations in a Session
Rolling Back All Operations in a Session
Getting the JDBC Connection from a Session
Getting the OracleOCIConnectionPool from a JMS Connection
Creating a BytesMessage
Creating a MapMessage
Creating a StreamMessage
Creating an ObjectMessage
Creating a TextMessage
Creating a JMS Message
Creating an AdtMessage
Setting JMS Correlation Identifier
Specifying JMS Message Properties
Setting a Boolean Message Property
Setting a String Message Property
Setting an Integer Message Property
Setting a Double Message Property
Setting a Float Message Property
Setting a Byte Message Property
Setting a Long Message Property
Setting a Short Message Property
Setting an Object Message Property
Setting Default TimeToLive for All Messages Sent by a MessageProducer
Setting Default Priority for All Messages Sent by a MessageProducer
Creating an AQjms Agent
Receiving a Message Synchronously
Using a Message Consumer by Specifying Timeout
Using a Message Consumer Without Waiting
Receiving Messages from a Destination Using a Transformation
Specifying the Navigation Mode for Receiving Messages
Receiving a Message Asynchronously
Specifying a Message Listener at the Message Consumer
Specifying a Message Listener at the Session
Getting Message ID
Getting the Correlation Identifier
Getting the Message Identifier
Getting JMS Message Properties
Getting a Boolean Message Property
Getting a String Message Property
Getting an Integer Message Property
Getting a Double Message Property
Getting a Float Message Property
Getting a Byte Message Property
Getting a Long Message Property
Getting a Short Message Property
Getting an Object Message Property
Closing and Shutting Down
Closing a MessageProducer
Closing a Message Consumer
Stopping a JMS Connection
Closing a JMS Session
Closing a JMS Connection
Troubleshooting
Getting a JMS Error Code
Getting a JMS Error Number
Getting an Exception Linked to a JMS Exception
Printing the Stack Trace for a JMS Exception
Setting an Exception Listener
Getting an Exception Listener
16
Oracle JMS Types Examples
How to Run the Oracle® Database JMS Type Examples
Setting Up the Examples
JMS BytesMessage Examples
JMS StreamMessage Examples
JMS MapMessage Examples
More Oracle® Database JMS Examples
17
Introducing Oracle Messaging Gateway
Introducing Oracle Messaging Gateway
Oracle Messaging Gateway Features
Oracle Messaging Gateway Architecture
Administration Package DBMS_MGWADM
Oracle Messaging Gateway Agent
Oracle Database
Non-Oracle Messaging Systems
Propagation Processing Overview
Oracle Streams AQ Buffered Messages and Messaging Gateway
18
Getting Started with Oracle Messaging Gateway
Oracle Messaging Gateway Prerequisites
Loading and Setting Up Oracle Messaging Gateway
Loading Database Objects into the Database
Modifying listener.ora for the External Procedure
Modifying tnsnames.ora for the External Procedure
Setting Up a mgw.ora Initialization File
Creating an Oracle Messaging Gateway Administration User
Creating an Oracle Messaging Gateway Agent User
Configuring Oracle Messaging Gateway Connection Information
Configuring Oracle Messaging Gateway in a RAC Environment
Configuring Connection Information for the MGW Agent Connections
Setting the RAC Instance for the Messaging Gateway Agent
Setting Up Non-Oracle Messaging Systems
Setting Up for TIB/Rendezvous
Setting Up for WebSphere MQ Base Java or JMS
Verifying the Oracle Messaging Gateway Setup
Unloading Oracle Messaging Gateway
Understanding the mgw.ora Initialization File
mgw.ora Initialization Parameters
mgw.ora Environment Variables
mgw.ora Java Properties
mgw.ora Comment Lines
19
Working with Oracle Messaging Gateway
Configuring the Oracle Messaging Gateway Agent
Creating a Messaging Gateway Agent
Removing a Messaging Gateway Agent
Database Connection
Resource Limits
Starting and Shutting Down the Oracle Messaging Gateway Agent
Starting the Oracle Messaging Gateway Agent
Shutting Down the Oracle Messaging Gateway Agent
Oracle Messaging Gateway Agent Scheduler Job
Running the Oracle Messaging Gateway Agent on RAC
Configuring Messaging System Links
Creating a WebSphere MQ Base Java Link
Creating a WebSphere MQ JMS Link
Creating a WebSphere MQ Link to Use SSL
Creating a TIB/Rendezvous Link
Altering a Messaging System Link
Removing a Messaging System Link
Views for Messaging System Links
Configuring Non-Oracle Messaging System Queues
Registering a Non-Oracle Queue
Registering a WebSphere MQ Base Java Queue
Registering a WebSphere MQ JMS Queue or Topic
Registering a TIB/Rendezvous Subject
Unregistering a Non-Oracle Queue
View for Registered Non-Oracle Queues
Configuring Oracle Messaging Gateway Propagation Jobs
Propagation Job Overview
Creating an Oracle Messaging Gateway Propagation Job
Enabling and Disabling a Propagation Job
Resetting a Propagation Job
Altering a Propagation Job
Removing a Propagation Job
Propagation Jobs, Subscribers, and Schedules
Propagation Job, Subscriber, Schedule Interface Interoperability
Propagation Job, Subscriber, Schedule Views
Single Consumer Queue As Propagation Source
Configuration Properties
WebSphere MQ System Properties
TIB/Rendezvous System Properties
Optional Link Configuration Properties
Optional Foreign Queue Configuration Properties
Optional Job Configuration Properties
20
Oracle Messaging Gateway Message Conversion
Converting Oracle Messaging Gateway Non-JMS Messages
Overview of the Non-JMS Message Conversion Process
Oracle Messaging Gateway Canonical Types
Message Header Conversion
Handling Arbitrary Payload Types Using Message Transformations
Handling Logical Change Records
Message Conversion for WebSphere MQ
WebSphere MQ Message Header Mappings
WebSphere MQ Outbound Propagation
WebSphere MQ Inbound Propagation
Message Conversion for TIB/Rendezvous
AQ Message Property Mapping for TIB/Rendezvous
TIB/Rendezvous Outbound Propagation
TIB/Rendezvous Inbound Propagation
JMS Messages
JMS Outbound Propagation
JMS Inbound Propagation
21
Monitoring Oracle Messaging Gateway
Oracle Messaging Gateway Log Files
Sample Oracle Messaging Gateway Log File
Interpreting Exception Messages in an Oracle Messaging Gateway Log File
Monitoring the Oracle Messaging Gateway Agent Status
MGW_GATEWAY View
Oracle Messaging Gateway Irrecoverable Error Messages
Other Oracle Messaging Gateway Error Conditions
Monitoring Oracle Messaging Gateway Propagation
Oracle Messaging Gateway Agent Error Messages
22
Using ANYDATA Queues for User Messages
ANYDATA Queues and User Messages
ANYDATA Wrapper for User Messages Payloads
Programmatic Interfaces for Enqueue and Dequeue of User Messages
Enqueuing User Messages Using PL/SQL
Enqueuing User Messages Using OCI or JMS
Dequeuing User Messages Using PL/SQL
Dequeuing User Messages Using OCI or JMS
Message Propagation and ANYDATA Queues
Enqueuing User Messages in ANYDATA Queues
Dequeuing User Messages from ANYDATA Queues
Propagating User Messages from ANYDATA Queues to Typed Queues
Propagating User-Enqueued LCRs from ANYDATA Queues to Typed Queues
23
Oracle Streams Messaging Example
Overview of Messaging Example
Setting Up Users and Creating an ANYDATA Queue
Creating Enqueue Procedures
Configuring an Apply Process
Configuring Explicit Dequeue
Enqueuing Messages
Dequeuing Messages Explicitly and Querying for Applied Messages
Enqueuing and Dequeuing Messages Using JMS
A
Nonpersistent Queues
Creating Nonpersistent Queues
Managing Nonpersistent Queues
Compatibility of Nonpersistent Queues
Nonpersistent Queue Notification
Restrictions on Nonpersistent Queues
B
JMS and AQ XML Servlet Error Messages
JMS Error Messages
AQ XML Servlet Error Messages
Glossary
Index
Scripting on this page enhances content navigation, but does not change the content in any way.