The DBMS_AQADM
package provides procedures to manage Oracle Database Advanced Queuing (AQ) configuration and administration information.
See Also:
Chapter 271, "Oracle Database Advanced Queuing (AQ) Types" for information about the TYPE
s to use with DBMS_AQADM
This chapter contains the following topics:
Security model
Constants
Queue Table Subprograms
Privilege Subprograms
Queue Subprograms
Subscriber Subprograms
Notification Subprograms
Propagation Subprograms
Oracle Streams AQ Agent Subprograms
Alias Subprograms
This section contains the following topics.
Initially, only SYS
and SYSTEM
have execution privilege for the procedures in DBMS_AQADM
and DBMS_AQ
. Users who have been granted EXECUTE
rights to DBMS_AQ
and DBMS_AQADM
are able to create, manage, and use queues in their own schemas. The MANAGE_ANY
AQ system privilege is used to create and manage queues in other schemas and can be granted and revoked through DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE
and DBMS_AQADM.REVOKE_SYSTEM_PRIVILEGE
respectively.
The database administrator has the option of granting the system privileges ENQUEUE_ANY
and DEQUEUE_ANY
, exercising DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE
and DBMS_AQADM.REVOKE_SYSTEM_PRIVILEGE
directly to a database user, if you want the user to have this level of control.
The application developer gives rights to a queue by granting and revoking privileges at the object level by exercising DBMS_AQADM.GRANT_QUEUE_PRIVILEGE
and DBMS_AQADM.REVOKE_QUEUE_PRIVILEGE
.
See Also:
Oracle Database Advanced Queuing User's Guide for more information on queue privileges and access control.
Security Required for Propagation
Propagation jobs are owned by SYS
, but the propagation occurs in the security context of the queue table owner. Previously propagation jobs were owned by the user scheduling propagation, and propagation occurred in the security context of the user setting up the propagation schedule. The queue table owner must be granted EXECUTE
privileges on the DBMS_AQADM
package. Otherwise, the Oracle Database snapshot processes do not propagate and generate trace files with the error identifier SYS.DBMS_AQADM
not defined. Private database links owned by the queue table owner can be used for propagation. The username specified in the connection string must have EXECUTE
access on the DBMS_AQ
and DBMS_AQADM
packages on the remote database.
See Also:
Oracle Database Advanced Queuing User's Guide for more information on security required for propagation.The MIGRATE_QUEUE_TABLE
procedure requires that the EXECUTE
privilege on DBMS_AQADM
be granted to the queue table owner, who is probably an ordinary queue user. If you do not want ordinary queue users to be able to create and drop queues and queue tables, add and delete subscribers, and so forth, then you must revoke the EXECUTE
privilege as soon as the migration is done.
See Also:
Oracle Database Advanced Queuing User's Guide for more information on granting Oracle Database Advanced Queuing system privileges.
When using enumerated constants, such as INFINITE
, TRANSACTIONAL
, or NORMAL_QUEUE
, the symbol must be specified with the scope of the packages defining it. All types associated with the administrative interfaces must be prepended with DBMS_AQADM
. For example: DBMS_AQADM.NORMAL_QUEUE
.
Table 25-1 Enumerated Types in the Administrative Interface
Parameter | Options |
---|---|
|
|
|
|
|
|
See Also:
For more information on the Java classes and data structures used in bothDBMS_AQ
and DBMS_AQADM
, see the DBMS_AQ package.This DBMS_AQADM package is made up of the following subprogram groups:
Table 25-2 Queue Table Subprograms
Subprograms | Description |
---|---|
Alters the existing properties of a queue table |
|
Creates a queue table for messages of a predefined type |
|
Drops an existing queue table |
|
A precondition for the enqueue of JMS types and XML types |
|
Upgrades an 8.0-compatible queue table to an 8.1-compatible or higher queue table, or downgrades an 8.1-compatible or higher queue table to an 8.0-compatible queue table |
|
Purges messages from queue tables |
Table 25-3 Privilege Subprograms
Subprograms | Description |
---|---|
Grants privileges on a queue to users and roles |
|
Grants Oracle Database Advanced Queuing system privileges to users and roles |
|
Revokes privileges on a queue from users and roles |
|
Revokes Oracle Database Advanced Queuing system privileges from users and roles |
Subprograms | Description |
---|---|
Alters existing properties of a queue |
|
Creates a nonpersistent |
|
Creates a queue in the specified queue table |
|
Creates a queue and its queue table for a sharded queue all together. |
|
Drops an existing sharded queue from the database queuing system |
|
Drops an existing queue |
|
Returns the subscribers to an 8.0-compatible multiconsumer queue in the PL/SQL index by table collection type |
|
Enables the specified queue for enqueuing or dequeuing |
|
Disables enqueuing or dequeuing on the specified queue |
Table 25-6 Notification Subprograms
Subprograms | Description |
---|---|
Retrieves the value of watermark set by the |
|
Retrieves the value of Oracle Database Advanced Queuing maximum streams pool memory limit |
|
Retrieves the value of Oracle Database Advanced Queuing minimum streams pool memory limit |
|
Used for Oracle Database Advanced Queuing notification to specify and limit memory use |
|
Used for Oracle Database Advanced Queuing to specify and limit maximum streams pool memory use |
|
used for Oracle Database Advanced Queuing to specify and limit minimum streams pool memory use |
Table 25-7 Propagation Subprograms
Subprograms | Description |
---|---|
Alters parameters for a propagation schedule |
|
Disables a propagation schedule |
|
Enables a previously disabled propagation schedule |
|
Schedules propagation of messages from a queue to a destination identified by a specific database link |
|
Unschedules previously scheduled propagation of messages from a queue to a destination identified by a specific database link |
|
Verifies that the source and destination queues have identical types |
Table 25-8 Oracle Streams AQ Agent Subprograms
Subprograms | Description |
---|---|
Alters an agent registered for Oracle Database Advanced Queuing Internet access, and an Oracle Database Advanced Queuing agent that accesses secure queues |
|
Registers an agent for Oracle Database Advanced Queuing Internet access using HTTP/SMTP protocols, and creates an Oracle Database Advanced Queuing agent to access secure queues |
|
Revokes the privileges of a specific database user from an Oracle Database Advanced Queuing Internet agent |
|
Drops an agent that was previously registered for Oracle Database Advanced Queuing Internet access |
|
Grants an Oracle Database Advanced Queuing Internet agent the privileges of a specific database user |
Table 25-10 DBMS_AQADM Package Subprograms
Subprograms | Description |
---|---|
Creates an alias for a queue, agent, or a JMS ConnectionFactory in LDAP |
|
Adds a default subscriber to a queue |
|
Alters an agent registered for Oracle Database Advanced Queuing Internet access, and an Oracle Database Advanced Queuing agent that accesses secure queues |
|
Alters parameters for a propagation schedule |
|
Alters existing properties of a queue |
|
Alters the existing properties of a queue table |
|
Alters existing properties of a subscriber to a specified queue |
|
Registers an agent for Oracle Database Advanced Queuing Internet access using HTTP/SMTP protocols, and creates an Oracle Database Advanced Queuing agent to access secure queues |
|
Creates a nonpersistent |
|
Creates a queue in the specified queue table |
|
Creates a queue and its queue table for a sharded queue all together. |
|
Creates a queue table for messages of a predefined type |
|
Drops an existing sharded queue from the database queuing system |
|
Drops an alias for a queue, agent, or JMS ConnectionFactory in LDAP |
|
Revokes the privileges of a specific database user from an Oracle Database Advanced Queuing Internet agent |
|
Disables a propagation schedule |
|
Drops an agent that was previously registered for Oracle Database Advanced Queuing Internet access |
|
Drops an existing queue |
|
Drops an existing queue table |
|
Grants an Oracle Database Advanced Queuing Internet agent the privileges of a specific database user |
|
A precondition for the enqueue of JMS types and XML types |
|
Enables a previously disabled propagation schedule |
|
Retrieves the value of watermark set by the |
|
Retrieves the value of Oracle Database Advanced Queuing maximum streams pool memory limit |
|
Retrieves the value of Oracle Database Advanced Queuing minimum streams pool memory limit |
|
Grants privileges on a queue to users and roles |
|
Grants Oracle Database Advanced Queuing system privileges to users and roles |
|
Upgrades an 8.0-compatible queue table to an 8.1-compatible or higher queue table, or downgrades an 8.1-compatible or higher queue table to an 8.0-compatible queue table |
|
Purges messages from queue tables |
|
Returns the subscribers to an 8.0-compatible multiconsumer queue in the PL/SQL index by table collection type |
|
Removes a default subscriber from a queue |
|
Revokes privileges on a queue from users and roles |
|
Revokes Oracle Database Advanced Queuing system privileges from users and roles |
|
Schedules propagation of messages from a queue to a destination identified by a specific database link |
|
Used for Oracle Database Advanced Queuing notification to specify and limit memory use |
|
Used for Oracle Database Advanced Queuing to specify and limit maximum streams pool memory use |
|
used for Oracle Database Advanced Queuing to specify and limit minimum streams pool memory use |
|
Enables the specified queue for enqueuing or dequeuing |
|
Disables enqueuing or dequeuing on the specified queue |
|
Unschedules previously scheduled propagation of messages from a queue to a destination identified by a specific database link |
|
Verifies that the source and destination queues have identical types |
This procedure creates an alias for a queue, agent, or a JMS ConnectionFactory in LDAP. The alias will be placed directly under the database server's distinguished name in LDAP hierarchy.
This procedure adds a default subscriber to a queue.
DBMS_AQADM.ADD_SUBSCRIBER ( queue_name IN VARCHAR2, subscriber IN sys.aq$_agent, rule IN VARCHAR2 DEFAULT NULL, transformation IN VARCHAR2 DEFAULT NULL queue_to_queue IN BOOLEAN DEFAULT FALSE, delivery_mode IN PLS_INTEGER DEFAULT DBMS_AQADM.PERSISTENT);
Table 25-12 ADD_SUBSCRIBER Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue. |
|
Agent on whose behalf the subscription is being defined. |
|
A conditional expression based on the message properties, the message data properties and PL/SQL functions. A rule is specified as a Boolean expression using syntax similar to the To specify rules on a message payload (object payload), use attributes of the object type in clauses. You must prefix each attribute with |
|
Specifies a transformation that will be applied when this subscriber dequeues the message. The source type of the transformation must match the type of the queue. If the subscriber is remote, then the transformation is applied before propagation to the remote queue. |
|
If |
|
The administrator may specify one of |
A program can enqueue messages to a specific list of recipients or to the default list of subscribers. This operation only succeeds on queues that allow multiple consumers. This operation takes effect immediately, and the containing transaction is committed. Enqueue requests that are executed after the completion of this call will reflect the new behavior.
Any string within the rule must be quoted:
rule => 'PRIORITY <= 3 AND CORRID = ''FROM JAPAN'''
Note that these are all single quotation marks.
This procedure alters an agent registered for Oracle Database Advanced Queuing Internet access. It is also used to alter an Oracle Database Advanced Queuing agent that accesses secure queues.
See Also:
Oracle Streams Concepts and Administration for information about secure queuesDBMS_AQADM.ALTER_AQ_AGENT ( agent_name IN VARCHAR2, certificate_location IN VARCHAR2 DEFAULT NULL, enable_http IN BOOLEAN DEFAULT FALSE, enable_smtp IN BOOLEAN DEFAULT FALSE, enable_anyp IN BOOLEAN DEFAULT FALSE )
Table 25-13 ALTER_AQ_AGENT Procedure Parameters
Parameter | Description |
---|---|
|
Specifies the username of the Oracle Database Advanced Queuing Internet agent. |
|
Agent's certificate location in LDAP (default is |
|
|
|
|
|
|
This procedure alters parameters for a propagation schedule.
DBMS_AQADM.ALTER_PROPAGATION_SCHEDULE ( queue_name IN VARCHAR2, destination IN VARCHAR2 DEFAULT NULL, duration IN NUMBER DEFAULT NULL, next_time IN VARCHAR2 DEFAULT NULL, latency IN NUMBER DEFAULT 60, destination_queue IN VARCHAR2 DEFAULT NULL);
Table 25-14 ALTER_PROPAGATION_SCHEDULE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the source queue whose messages are to be propagated, including the schema name. If the schema name is not specified, then it defaults to the schema name of the user. |
|
Destination database link. Messages in the source queue for recipients at this destination are propagated. If it is |
|
Duration of the propagation window in seconds. A |
|
Date function to compute the start of the next propagation window from the end of the current window. If this value is |
|
Maximum wait, in seconds, in the propagation window for a message to be propagated after it is enqueued. The default value is 60. Caution: if latency is not specified for this call, then latency will over-write any existing value with the default value. For example, if the latency is 60 seconds and there are no messages to be propagated during the propagation window, then messages from that queue for the destination are not propagated for at least 60 more seconds. It will be at least 60 seconds before the queue will be checked again for messages to be propagated for the specified destination. If the latency is 600, then the queue will not be checked for 10 minutes and if the latency is 0, then a job queue process will be waiting for messages to be enqueued for the destination and as soon as a message is enqueued it will be propagated. |
|
Name of the target queue to which messages are to be propagated in the form of a |
This procedure alters existing properties of a queue. The parameters max_retries
, retention_time
, and retry_delay
are not supported for nonpersistent queues.
DBMS_AQADM.ALTER_QUEUE ( queue_name IN VARCHAR2, max_retries IN NUMBER DEFAULT NULL, retry_delay IN NUMBER DEFAULT NULL, retention_time IN NUMBER DEFAULT NULL, auto_commit IN BOOLEAN DEFAULT TRUE, comment IN VARCHAR2 DEFAULT NULL);
Table 25-15 ALTER_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue that is to be altered |
|
Limits the number of times a dequeue with A message is moved to an exception queue if Note that |
|
Delay time in seconds before this message is scheduled for processing again after an application rollback. The default is Note that |
|
Retention time in seconds for which a message is retained in the queue table after being dequeued. The default is |
|
Caution: This parameter has been deprecated. |
|
User-specified description of the queue. This user comment is added to the queue catalog. The default value is |
This procedure alters the existing properties of a queue table.
DBMS_AQADM.ALTER_QUEUE_TABLE ( queue_table IN VARCHAR2, comment IN VARCHAR2 DEFAULT NULL, primary_instance IN BINARY_INTEGER DEFAULT NULL, secondary_instance IN BINARY_INTEGER DEFAULT NULL);
Table 25-16 ALTER_QUEUE_TABLE Procedure Parameters
Parameter | Description |
---|---|
|
Name of a queue table to be created. |
|
Modifies the user-specified description of the queue table. This user comment is added to the queue catalog. The default value is |
|
This is the primary owner of the queue table. Queue monitor scheduling and propagation for the queues in the queue table will be done in this instance. The default value is |
|
The queue table fails over to the secondary instance if the primary instance is not available. The default value is |
This procedure alters existing properties of a subscriber to a specified queue. Only the rule can be altered.
DBMS_AQADM.ALTER_SUBSCRIBER ( queue_name IN VARCHAR2, subscriber IN sys.aq$_agent, rule IN VARCHAR2 transformation IN VARCHAR2);
Table 25-17 ALTER_SUBSCRIBER Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue. |
|
Agent on whose behalf the subscription is being altered. See "AQ$_AGENT Type". |
|
A conditional expression based on the message properties, the message data properties and PL/SQL functions. The rule parameter cannot exceed 4000 characters. To eliminate the rule, set the rule parameter to |
|
Specifies a transformation that will be applied when this subscriber dequeues the message. The source type of the transformation must match the type of the queue. If the subscriber is remote, then the transformation is applied before propagation to the remote queue. |
This procedure alters both the rule and the transformation for the subscriber. If you want to retain the existing value for either of them, you must specify its old value. The current values for rule and transformation for a subscriber can be obtained from the schema
.AQ$
queue_table
_R
and schema
.AQ$
queue_table
_S
views.
This procedure registers an agent for Oracle Database Advanced Queuing Internet access using HTTP/SMTP protocols. It is also used to create an Oracle Database Advanced Queuing agent to access secure queues.
See Also:
Oracle Streams Concepts and Administration for information about secure queuesDBMS_AQADM.CREATE_AQ_AGENT ( agent_name IN VARCHAR2, certificate_location IN VARCHAR2 DEFAULT NULL, enable_http IN BOOLEAN DEFAULT FALSE, enable_smtp IN BOOLEAN DEFAULT FALSE, enable_anyp IN BOOLEAN DEFAULT FALSE )
Table 25-18 CREATE_AQ_AGENT Procedure Parameters
Parameter | Description |
---|---|
|
Specifies the username of the Oracle Database Advanced Queuing Internet agent. |
|
Agent's certificate location in LDAP (default is |
|
|
|
|
|
|
Note:
nonpersistent queues are deprecated as of Release 10gR2. Oracle recommends using buffered messaging.This procedure creates a nonpersistent RAW
queue.
DBMS_AQADM.CREATE_NP_QUEUE ( queue_name IN VARCHAR2, multiple_consumers IN BOOLEAN DEFAULT FALSE, comment IN VARCHAR2 DEFAULT NULL);
Table 25-19 CREATE_NP_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the nonpersistent queue that is to be created. The name must be unique within a schema and must follow object name guidelines in Oracle Database SQL Language Reference. |
|
Note that this parameter is distinguished at the queue level, because a nonpersistent queue does not inherit this characteristic from any user-created queue table. |
|
User-specified description of the queue. This user comment is added to the queue catalog. |
The queue may be either single-consumer or multiconsumer queue. All queue names must be unique within a schema. The queues are created in a 8.1-compatible or higher system-created queue table (AQ$_MEM_SC
or AQ$_MEM_MC
) in the same schema as that specified by the queue name.
If the queue name does not specify a schema name, the queue is created in the login user's schema. After a queue is created with CREATE_NP_QUEUE
, it can be enabled by calling START_QUEUE
. By default, the queue is created with both enqueue and dequeue disabled.
You cannot dequeue from a nonpersistent queue. The only way to retrieve a message from a nonpersistent queue is by using the OCI notification mechanism. You cannot invoke the LISTEN
call on a nonpersistent queue.
This procedure creates a queue in the specified queue table.
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);
Table 25-20 CREATE_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue that is to be created. The name must be unique within a schema and must follow object name guidelines in Oracle Database SQL Language Reference with regard to reserved characters. |
|
Name of the queue table that will contain the queue. |
|
Specifies whether the queue being created is an exception queue or a normal queue. |
|
Limits the number of times a dequeue with the A message is moved to an exception queue if Note that |
|
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 |
|
Number of seconds for which a message is retained in the queue table after being dequeued from the queue. |
|
Reserved for future use. |
|
User-specified description of the queue. This user comment is added to the queue catalog. |
|
Caution: This parameter has been deprecated. |
CREATE_SHARDED_QUEUE
is a new API in 12c Release 1 (12.1) to create a queue and its queue table as appropriate for a JMS sharded queue. This API cannot be used to create unsharded queues. JMS sharded queues must be created using this single integrated API that will automatically set AQ properties as needed for JMS.
JMS Sharded queues may be either a single consumer or a multi-consumer queue.
PROCEDURE CREATE_SHARDED_QUEUE ( queue_name IN VARCHAR2, storage_clause IN VARCHAR2 DEFAULT NULL, multiple_consumers IN BOOLEAN DEFAULT FALSE, max_retries IN NUMBER DEFAULT NULL, comment IN VARCHAR2 DEFAULT NULL);
Table 25-21 CREATE_SHARDED_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
This required parameter specifies the name of the new queue. |
|
The storage parameter is included in the If a tablespace is not specified here, then the queue table and all its related objects are created in the default user tablespace. If a tablespace is specified here, then the queue table and all its related objects are created in the tablespace specified in the storage clause. See Oracle Database SQL Language Reference for the usage of these parameters. |
|
|
|
This optional parameter limits the number of times that a dequeue can reattempted on a message after a failure. The maximum value of |
|
This optional parameter is a user-specified description of the queue table. This user comment is added to the queue catalog. |
This procedure drops an existing sharded queue from the database queuing system. You must stop the queue before calling DROP_SHARDED_QUEUE
. User must stop the queue explicitly if force is set to FALSE
before calling DROP_SHARDED_QUEUE
. If force is set to TRUE
then queue will be stopped internally and then dropped.
This procedure creates a queue table for messages of a predefined type.
DBMS_AQADM.CREATE_QUEUE_TABLE ( queue_table IN VARCHAR2, queue_payload_type IN VARCHAR2, storage_clause IN VARCHAR2 DEFAULT NULL, sort_list IN VARCHAR2 DEFAULT NULL, multiple_consumers IN BOOLEAN DEFAULT FALSE, message_grouping IN BINARY_INTEGER DEFAULT NONE, comment IN VARCHAR2 DEFAULT NULL, auto_commit IN BOOLEAN DEFAULT TRUE, primary_instance IN BINARY_INTEGER DEFAULT 0, secondary_instance IN BINARY_INTEGER DEFAULT 0, compatible IN VARCHAR2 DEFAULT NULL, secure IN BOOLEAN DEFAULT FALSE);
Table 25-23 CREATE_QUEUE_TABLE Procedure Parameters
Parameter | Description |
---|---|
|
Name of a queue table to be created |
|
Type of the user data stored. See Type Name for valid values for this parameter. |
|
Storage parameter. The storage parameter is included in the If a tablespace is not specified here, then the queue table and all its related objects are created in the default user tablespace. If a tablespace is specified here, then the queue table and all its related objects are created in the tablespace specified in the storage clause. See Oracle Database SQL Language Reference for the usage of these parameters. |
|
The columns to be used as the sort key in ascending order. This parameter has the following format: ' The allowed column names are After a queue table is created with a specific ordering mechanism, all queues in the queue table inherit the same defaults. The order of a queue table cannot be altered after the queue table has been created. If no sort list is specified, then all the queues in this queue table are sorted by the enqueue time in ascending order. This order is equivalent to FIFO order. Even with the default ordering defined, a dequeuer is allowed to choose a message to dequeue by specifying its When See also "Priority and Ordering of Messages" in Oracle Database Advanced Queuing User's Guide for information about message ordering in Oracle Database Advanced Queuing. |
|
|
|
Message grouping behavior for queues created in the table. |
|
User-specified description of the queue table. This user comment is added to the queue catalog. |
|
Note: This parameter has been deprecated. |
|
The primary owner of the queue table. Queue monitor scheduling and propagation for the queues in the queue table are done in this instance. The default value for primary instance is 0, which means queue monitor scheduling and propagation will be done in any available instance. |
|
The queue table fails over to the secondary instance if the primary instance is not available. The default value is 0, which means that the queue table will fail over to any available instance. |
|
The lowest database version with which the queue is compatible. Currently the possible values are either |
|
This parameter must be set to |
The sort keys for dequeue ordering, if any, must be defined at table creation time. The following objects are created at this time:
aq$_
queue_table_name
_e
, a default exception queue associated with the queue table
aq$
queue_table_name
, a read-only view, which is used by Oracle Database Advanced Queuing applications for querying queue data
aq$_
queue_table_name
_t
, an index (or an index organized table (IOT) in the case of multiple consumer queues) for the queue monitor operations
aq$_
queue_table_name
_i
, an index (or an index organized table in the case of multiple consumer queues) for dequeue operations
For 8.1-compatible or higher queue tables, the following index-organized tables are created:
aq$_
queue_table_name
_s
, a table for storing information about the subscribers
aq$_
queue_table_name
_r
, a table for storing information about rules on subscriptions
aq$_
queue_table_name
_h
, an index-organized table for storing the dequeue history data
CLOB
, BLOB
, and BFILE
are valid attributes for Oracle Database Advanced Queuing object type payloads. However, only CLOB
and BLOB
can be propagated using Oracle Database Advanced Queuing propagation in Oracle8i release 8.1.5 or later. See the Oracle Database Advanced Queuing User's Guide for more information.
The default value of the compatible parameter depends on the database compatibility mode in the init.ora
. If the database is in 10.1-compatible mode, the default value is 10.0. If the database is in 8.1-compatible or 9.2-compatible mode, the default value is 8.1. If the database is in 8.0 compatible mode, the default value is 8.0
You can specify and modify the primary_instance
and secondary_instance
only in 8.1-compatible or higher mode. You cannot specify a secondary instance unless there is a primary instance.
This procedure drops an alias for a queue, agent, or JMS ConnectionFactory in LDAP.
This procedure revokes the privileges of a specific database user from an Oracle Database Advanced Queuing Internet agent.
The Oracle Database Advanced Queuing Internet agent should have been previously granted those privileges using the ENABLE_DB_ACCESS Procedure.
This procedure disables a propagation schedule.
DBMS_AQADM.DISABLE_PROPAGATION_SCHEDULE ( queue_name IN VARCHAR2, destination IN VARCHAR2 DEFAULT NULL, destination_queue IN VARCHAR2 DEFAULT NULL);
Table 25-26 DISABLE_PROPAGATION_SCHEDULE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the source queue whose messages are to be propagated, including the schema name. If the schema name is not specified, then it defaults to the schema name of the user. |
|
Destination database link. Messages in the source queue for recipients at this destination are propagated. If it is |
|
Name of the target queue to which messages are to be propagated in the form of a |
This procedure drops an agent that was previously registered for Oracle Database Advanced Queuing Internet access.
This procedure drops an existing queue.
Table 25-28 DROP_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue that is to be dropped. |
|
Caution: This parameter has been deprecated. |
This procedure drops an existing queue table.
DBMS_AQADM.DROP_QUEUE_TABLE ( queue_table IN VARCHAR2, force IN BOOLEAN DEFAULT FALSE, auto_commit IN BOOLEAN DEFAULT TRUE);
Table 25-29 DROP_QUEUE_TABLE Procedure Parameters
Parameter | Description |
---|---|
|
Name of a queue table to be dropped. |
|
|
|
Caution: This parameter has been deprecated. |
This procedure grants an Oracle Database Advanced Queuing Internet agent the privileges of a specific database user.
The Oracle Database Advanced Queuing Internet agent should have been previously created using the CREATE_AQ_AGENT Procedure.
For secure queues, the sender and receiver agent of the message must be mapped to the database user performing the enqueue or dequeue operation.
See Also:
Oracle Streams Concepts and Administration for information about secure queuesThe SYS.AQ$INTERNET_USERS
view has a list of all Oracle Database Advanced Queuing Internet agents and the names of the database users whose privileges are granted to them.
Enqueue of JMS types and XML types does not work with Oracle Streams Sys.Anydata
queues unless you call this procedure after DBMS_STREAMS_ADM.SET_UP_QUEUE
. Enabling an Oracle Streams queue for these types may affect import/export of the queue table.
This procedure enables a previously disabled propagation schedule.
DBMS_AQADM.ENABLE_PROPAGATION_SCHEDULE ( queue_name IN VARCHAR2, destination IN VARCHAR2 DEFAULT NULL, destination_queue IN VARCHAR2 DEFAULT NULL);
Table 25-32 ENABLE_PROPAGATION_SCHEDULE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the source queue whose messages are to be propagated, including the schema name. If the schema name is not specified, then it defaults to the schema name of the user. |
|
Destination database link. Messages in the source queue for recipients at this destination are propagated. If it is |
|
Name of the target queue to which messages are to be propagated in the form of a |
This procedure retrieves the value of Oracle Database Advanced Queuing maximum streams pool memory limit.
This procedure retrieves the value of Oracle Database Advanced Queuing minimum streams pool memory limit.
This procedure grants privileges on a queue to users and roles. The privileges are ENQUEUE
or DEQUEUE
. Initially, only the queue table owner can use this procedure to grant privileges on the queues.
DBMS_AQADM.GRANT_QUEUE_PRIVILEGE ( privilege IN VARCHAR2, queue_name IN VARCHAR2, grantee IN VARCHAR2, grant_option IN BOOLEAN := FALSE);
Table 25-36 GRANT_QUEUE_PRIVILEGE Procedure Parameters
Parameter | Description |
---|---|
|
The Oracle Database Advanced Queuing queue privilege to grant. The options are |
|
Name of the queue. |
|
Grantee(s). The grantee(s) can be a user, a role, or the |
|
Specifies if the access privilege is granted with the |
This procedure grants Oracle Database Advanced Queuing system privileges to users and roles. The privileges are ENQUEUE_ANY
, DEQUEUE_ANY
, and MANAGE_ANY
. Initially, only SYS
and SYSTEM
can use this procedure successfully.
DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE ( privilege IN VARCHAR2, grantee IN VARCHAR2, admin_option IN BOOLEAN := FALSE);
Table 25-37 GRANT_SYSTEM_PRIVILEGE Procedure Parameters
Parameter | Description |
---|---|
|
The Oracle Database Advanced Queuing system privilege to grant. The options are |
|
Grantee(s). The grantee(s) can be a user, a role, or the |
|
Specifies if the system privilege is granted with the If the privilege is granted with the |
This procedure upgrades an 8.0-compatible queue table to an 8.1-compatible or higher queue table, or downgrades an 8.1-compatible or higher queue table to an 8.0-compatible queue table.
This procedure purges messages from queue tables. You can perform various purge operations on both single-consumer and multiconsumer queue tables for persistent and buffered messages.
DBMS_AQADM.PURGE_QUEUE_TABLE( queue_table IN VARCHAR2, purge_condition IN VARCHAR2, purge_options IN aq$_purge_options_t);
where type aq$_purge_options_t
is described in Chapter 271, "Oracle Database Advanced Queuing (AQ) Types".
Table 25-39 PURGE_QUEUE_TABLE Procedure Parameters
Parameter | Description |
---|---|
|
Specifies the name of the queue table to be purged. |
|
Specifies the purge condition to use when purging the queue table. The purge condition must be in the format of a SQL When specifying the To purge all queues in a queue table, set |
|
Type
|
You an purge selected messages from the queue table by specifying a purge_condition. Table 25-39 describes these parameters. Messages can be enqueued to and dequeued from the queue table while the queue table is being purged.
A trace file is generated in the udump
destination when you run this procedure. It details what the procedure is doing.
This procedure commits batches of messages in autonomous transactions. Several such autonomous transactions may get executed as a part of one purge_queue_table
call depending on the number of messages in the queue table.
This function returns the subscribers to an 8.0-compatible multiconsumer queue in the PL/SQL index by table collection type DBMS_AQADM.AQ$_subscriber_list_t
. Each element of the collection is of type sys.aq$_agent
. This functionality is provided for 8.1-compatible queues by the AQ$
queue_table_name
_S
view.
This procedure removes a default subscriber from a queue. This operation takes effect immediately, and the containing transaction is committed. All references to the subscriber in existing messages are removed as part of the operation.
Table 25-41 REMOVE_SUBSCRIBER Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue. |
|
Agent who is being removed. See AQ$_AGENT Type. |
This procedure revokes privileges on a queue from users and roles. The privileges are ENQUEUE
or DEQUEUE
.
DBMS_AQADM.REVOKE_QUEUE_PRIVILEGE ( privilege IN VARCHAR2, queue_name IN VARCHAR2, grantee IN VARCHAR2);
Table 25-42 REVOKE_QUEUE_PRIVILEGE Procedure Parameters
Parameter | Description |
---|---|
|
The Oracle Database Advanced Queuing queue privilege to revoke. The options are |
|
Name of the queue. |
|
Grantee(s). The grantee(s) can be a user, a role, or the |
This procedure revokes Oracle Database Advanced Queuing system privileges from users and roles. The privileges are ENQUEUE_ANY
, DEQUEUE_ANY
and MANAGE_ANY
. The ADMIN
option for a system privilege cannot be selectively revoked.
Table 25-43 REVOKE_SYSTEM_PRIVILEGE Procedure Parameters
Parameter | Description |
---|---|
|
The Oracle Database Advanced Queuing system privilege to revoke. The options are |
|
Grantee(s). The grantee(s) can be a user, a role, or the |
This procedure schedules propagation of messages from a queue to a destination identified by a specific database link.
DBMS_AQADM.SCHEDULE_PROPAGATION ( queue_name IN VARCHAR2, destination IN VARCHAR2 DEFAULT NULL, start_time IN DATE DEFAULT SYSDATE, duration IN NUMBER DEFAULT NULL, next_time IN VARCHAR2 DEFAULT NULL, latency IN NUMBER DEFAULT 60, destination_queue IN VARCHAR2 DEFAULT NULL);
Table 25-44 SCHEDULE_PROPAGATION Procedure Parameters
Parameter | Description |
---|---|
|
Name of the source queue whose messages are to be propagated, including the schema name. If the schema name is not specified, then it defaults to the schema name of the administrative user. |
|
Destination database link. Messages in the source queue for recipients at this destination are propagated. If it is |
|
Initial start time for the propagation window for messages from the source queue to the destination. |
|
Duration of the propagation window in seconds. A |
|
Date function to compute the start of the next propagation window from the end of the current window. If this value is |
|
Maximum wait, in seconds, in the propagation window for a message to be propagated after it is enqueued. For example, if the latency is 60 seconds and there are no messages to be propagated during the propagation window, then messages from that queue for the destination are not propagated for at least 60 more seconds. It is at least 60 seconds before the queue is checked again for messages to be propagated for the specified destination. If the latency is 600, then the queue is not checked for 10 minutes, and if the latency is 0, then a job queue process will be waiting for messages to be enqueued for the destination. As soon as a message is enqueued, it is propagated. |
|
Name of the target queue to which messages are to be propagated in the form of a |
This procedure is used for Oracle Database Advanced Queuing notification to specify and limit memory use.
This procedure is used for Oracle Database Advanced Queuing to specify and limit maximum streams pool memory use.
This procedure is used for Oracle Database AQ to specify and limit minimum streams pool memory use.
This procedure enables the specified queue for enqueuing or dequeuing.
DBMS_AQADM.START_QUEUE ( queue_name IN VARCHAR2, enqueue IN BOOLEAN DEFAULT TRUE, dequeue IN BOOLEAN DEFAULT TRUE);
Table 25-48 START_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue to be enabled |
|
Specifies whether |
|
Specifies whether |
After creating a queue, the administrator must use START_QUEUE
to enable the queue. The default is to enable it for both ENQUEUE
and DEQUEUE
. Only dequeue operations are allowed on an exception queue. This operation takes effect when the call completes and does not have any transactional characteristics.
This procedure disables enqueuing or dequeuing on the specified queue.
DBMS_AQADM.STOP_QUEUE ( queue_name IN VARCHAR2, enqueue IN BOOLEAN DEFAULT TRUE, dequeue IN BOOLEAN DEFAULT TRUE, wait IN BOOLEAN DEFAULT TRUE);
Table 25-49 STOP_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
Name of the queue to be disabled |
|
Specifies whether |
|
Specifies whether |
|
Specifies whether to wait for the completion of outstanding transactions. |
This procedure unschedules previously scheduled propagation of messages from a queue to a destination identified by a specific database link.
DBMS_AQADM.UNSCHEDULE_PROPAGATION ( queue_name IN VARCHAR2, destination IN VARCHAR2 DEFAULT NULL destination_queue IN VARCHAR2 DEFAULT NULL);
Table 25-50 UNSCHEDULE_PROPAGATION Procedure Parameters
Parameter | Description |
---|---|
|
Name of the source queue whose messages are to be propagated, including the schema name. If the schema name is not specified, then it defaults to the schema name of the administrative user. |
|
Destination database link. Messages in the source queue for recipients at this destination are propagated. If it is |
|
Name of the target queue to which messages are to be propagated in the form of a |
This procedure verifies that the source and destination queues have identical types. The result of the verification is stored in the table sys
.aq$_message_types
, overwriting all previous output of this command.
DBMS_AQADM.VERIFY_QUEUE_TYPES ( src_queue_name IN VARCHAR2, dest_queue_name IN VARCHAR2, destination IN VARCHAR2 DEFAULT NULL, rc OUT BINARY_INTEGER);
Table 25-51 VERIFY_QUEUE_TYPES Procedure Parameters
Parameter | Description |
---|---|
|
Name of the source queue whose messages are to be propagated, including the schema name. If the schema name is not specified, then it defaults to the schema name of the user. |
|
Name of the destination queue where messages are to be propagated, including the schema name. If the schema name is not specified, then it defaults to the schema name of the user. |
|
Destination database link. Messages in the source queue for recipients at this destination are propagated. If it is |
|
Return code for the result of the procedure. If there is no error, and if the source and destination queue types match, then the result is 1. If they do not match, then the result is 0. If an Oracle error is encountered, then it is returned in |