Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
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_AQADM , 5 of 31


CREATE_QUEUE Procedure

This procedure creates a queue in the specified queue table.

Syntax

DBMS_AQADM.CREATE_QUEUE (
   queue_name          IN       VARCHAR2,
   queue_table         IN       VARCHAR2,
   queue_type          IN       BINARY_INTEGER DEFAULT NORMAL_QUEUE,
   max_retries         IN       NUMBER         DEFAULT NULL,
   retry_delay         IN       NUMBER         DEFAULT 0,
   retention_time      IN       NUMBER         DEFAULT 0,
   dependency_tracking IN       BOOLEAN        DEFAULT FALSE,
   comment             IN       VARCHAR2       DEFAULT NULL,
   auto_commit         IN       BOOLEAN        DEFAULT TRUE);

Parameters

Table 5-6 CREATE_QUEUE Procedure Parameters
Parameter  Description 
queue_name
 

Name of the queue that is to be created. The name must be unique within a schema and must follow object name guidelines in the Oracle9i SQL Reference with regard to reserved characters. 

queue_table
 

Name of the queue table that will contain the queue. 

queue_type
 

Specifies whether the queue being created is an exception queue or a normal queue.

NORMAL_QUEUE: The queue is a normal queue. This is the default.

EXCEPTION_QUEUE: It is an exception queue. Only the dequeue operation is allowed on the exception queue. 

max_retries
 

Limits the number of times a dequeue with the REMOVE mode can be attempted on a message. The maximum value of max_retries is 2**31 -1.

The count is incremented when the application issues a rollback after executing the dequeue. The message is moved to the exception queue when it is reaches its max_retries.

Note that max_retries is supported for all single consumer queues and 8.1-compatible multiconsumer queues but not for 8.0-compatible multiconsumer queues. 

retry_delay
 

Delay time, in seconds, before this message is scheduled for processing again after an application rollback.

The default is 0, which means the message can be retried as soon as possible. This parameter has no effect if max_retries is set to 0. Note that rety_delay is supported for single consumer queues and 8.1-compatible multiconsumer queues but not for 8.0-compatible multiconsumer queues. 

retention_time
 

Number of seconds for which a message is retained in the queue table after being dequeued from the queue.

INFINITE: Message is retained forever.

NUMBER: Number of seconds for which to retain the messages. The default is 0, no retention. 

dependency_ tracking
 

Reserved for future use.

FALSE: This is the default.

TRUE: Not permitted in this release. 

comment
 

User-specified description of the queue. This user comment is added to the queue catalog. 

auto_commit
 

TRUE: Causes the current transaction, if any, to commit before the CREATE_QUEUE operation is carried out. The CREATE_QUEUE operation becomes persistent when the call returns. This is the default.

FALSE: The operation is part of the current transaction and becomes persistent only when the caller enters a commit.

Caution: This parameter has been deprecated. 

Usage Notes

All queue names must be unique within a schema. After a queue is created with CREATE_QUEUE, it can be enabled by calling START_QUEUE. By default, the queue is created with both enqueue and dequeue disabled.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, 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