| Oracle9i Application Developer's Guide - Advanced Queuing Release 2 (9.2) Part Number A96587-01 |
|
This chapter describes the administrative interface to Oracle Advanced Queuing. We discuss each operation (such as "Creating a Queue Table") in terms of a use case by that name. Each use case is laid out as follows:
Table 9-1, "Use Case Model: Administrative Interface -- Basic Operations" indicates with a + where examples are provided for specific use cases and in which programmatic environment.
The table refers to programmatic environments with the following abbreviations:


See Also:
|
Create a queue table for messages of a predefined type.
aq$_<queue_table_name>_e.aq$<queue_table_name>.aq$_<queue_table_name>_t.aq$_<queue_table_name>_i.aq$_<queue_table_name>_s. This table stores information about the subscribers.aq$_<queue_table_name>_r. This table stores information about rules on subscriptions.aq$_<queue_table_name>_h.This table stores the dequeue history data.CLOB, BLOB, or BFILE objects are valid in an AQ message. You can propagate these object types using AQ propagation with Oracle since release 8.1.x. To enqueue an object type that has an LOB, you must first set the LOB_attribute to EMPTY_BLOB() and perform the enqueue. You can then select the LOB locator that was generated from the queue table's view and use the standard LOB operations. See the Oracle9i Application Developer's Guide - Large Objects (LOBs) for more information.See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment.:
CREATE type aq.Message_typ as object ( Subject VARCHAR2(30), Text VARCHAR2(80)); /* Note: if you do not stipulate a schema, you default to the user's schema. */ EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.ObjMsgs_qtab', Queue_payload_type => 'aq.Message_typ');
EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.RawMsgs_qtab', Queue_payload_type => 'RAW');
execute dbms_aqadm.create_queue_table( queue_table => 'OS_orders_pr_mqtab', comment => 'Overseas Shipping MultiConsumer Orders queue table', multiple_consumers => TRUE, queue_payload_type => 'SYS.XMLType', compatible => '8.1');
EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.PriorityMsgs_qtab', Sort_list => 'PRIORITY,ENQ_TIME', Queue_payload_type => 'aq.Message_typ');
EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.MultiConsumerMsgs_qtab', Multiple_consumers => TRUE, Queue_payload_type => 'aq.Message_typ');
EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.Multiconsumermsgs8_1qtab', Multiple_consumers => TRUE, Compatible => '8.1', Queue_payload_type => 'aq.Message_typ');
EXECUTE dbms_aqadm.create_queue_table( queue_table => 'aq.aq_tbsMsg_qtab', queue_payload_type => 'aq.Message_typ', storage_clause => 'tablespace aq_tbs');
BEGIN dbms_aqadm.create_queue_table ( queue_table=> 'AQ_ADMIN.TEST', queue_payload_type=> 'RAW', storage_clause=> 'STORAGE (FREELISTS 4 FREELIST GROUPS 2)', compatible => '8.1'); COMMIT; END;
OOO4O uses database functionality for this operation.
Examples depicting how to create a queue table using Java follow.
public static void example(AQSession aq_sess) throws AQException { AQQueueTableProperty qtable_prop; AQQueueProperty queue_prop; AQQueueTable q_table; AQQueue queue; /* Create a AQQueueTableProperty object (payload type Message_typ): */ qtable_prop = new AQQueueTableProperty("AQ.MESSAGE_TYP"); /* Create a queue table in aq schema */ q_table = aq_sess.createQueueTable ("aq", "ObjMsgs_qtab", qtable_prop); System.out.println("Successfully created ObjMsgs_qtab in aq schema"); }
public static void example(AQSession aq_sess) throws AQException { AQQueueTableProperty qtable_prop; AQQueueProperty queue_prop; AQQueueTable q_table; AQQueue queue; /* Create a AQQueueTableProperty object (payload type RAW): */ qtable_prop = new AQQueueTableProperty("RAW"); /* Create a queue table in aq schema */ q_table = aq_sess.createQueueTable ("aq", "RawMsgs_qtab", qtable_prop); System.out.println("Successfully created RawMsgs_qtab in aq schema"); } 3. Create a queue table for multiple consumers and prioritized messages public static void example(AQSession aq_sess) throws AQException { AQQueueTableProperty qtable_prop; AQQueueProperty queue_prop; AQQueueTable q_table; AQQueue queue; qtable_prop = new AQQueueTableProperty("RAW"); /* Enable multiple consumers */ qtable_prop.setMultiConsumer(true); qtable_prop.setCompatible("8.1"); /* Specify sort order as priority,enqueue_time */ qtable_prop.setSortOrder("PRIORITY,ENQ_TIME"); /* Create a queue table in aq schema */ q_table = aq_sess.createQueueTable ("aq", "PriorityMsgs_qtab", qtable_prop); System.out.println("Successfully created PriorityMsgs_qtab in aq schema"); }
public static void example(AQSession aq_sess) throws AQException { AQQueueTableProperty qtable_prop; AQQueueProperty queue_prop; AQQueueTable q_table; AQQueue queue; /* Create a AQQueueTableProperty object (payload type Message_typ): */ qtable_prop = new AQQueueTableProperty("AQ.MESSAGE_TYP"); /* Specify tablespace for queue table */ qtable_prop.setStorageClause("tablespace aq_tbs"); /* Create a queue table in aq schema */ q_table = aq_sess.createQueueTable ("aq", "aq_tbsMsg_qtab", qtable_prop); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Alter the existing properties of a queue table.
When a queue, queue table, or subscriber is created, modified, or dropped, and if GLOBAL_TOPIC_ENABLED = TRUE, a corresponding LDAP entry is also created.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments.
/* Altering the table to change the primary, secondary instances for queue owner (only applies to Real Application Clusters environments). The primary instance is the instance number of the primary owner of the queue table. The secondary instance is the instance number of the secondary owner of the queue table. */ EXECUTE dbms_aqadm.alter_queue_table ( Queue_table => 'aq.ObjMsgs_qtab', Primary_instance => 3, Secondary_instance => 2); /* Altering the table to change the comment for a queue table: */ EXECUTE dbms_aqadm.alter_queue_table ( Queue_table => 'aq.ObjMsgs_qtab', Comment => 'revised usage for queue table'); /* Altering the table to change the comment for a queue table and use nonrepudiation: */ EXECUTE dbms_aqadm.alter_queue_table ( Queue_table => 'aq.ObjMsgs_qtab', Comment => 'revised usage for queue table',
/* Alter a queue table */ public static void example(AQSession aq_sess) throws AQException { AQQueueTableProperty qtable_prop; AQQueueTable q_table; q_table = aq_sess.getQueueTable ("aq", "ObjMsgs_qtab"); /* Get queue table properties: */ qtable_prop = q_table.getProperty(); /* Alter the queue table comment and instance affinity */ q_table.alter("altered queue table", 3, 2); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Drop an existing queue table. Note that you must stop and drop all the queues in a queue tables before the queue table can be dropped. You must do this explicitly unless the force option is used in which case this done automatically.
When a queue, queue table, or subscriber is created, modified, or dropped, and if GLOBAL_TOPIC_ENABLED = TRUE, a corresponding LDAP entry is also created or dropped.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments.
/* Drop the queue table (for which all queues have been previously dropped by the user) */ EXECUTE dbms_aqadm.drop_queue_table ( queue_table => 'aq.Objmsgs_qtab');
/* Drop the queue table and force all queues to be stopped and dropped by the system */ EXECUTE dbms_aqadm.drop_queue_table ( queue_table => 'aq.Objmsgs_qtab', force => TRUE);
/* Drop a queue table - for which all queues have already been dropped by the user */ public static void example(AQSession aq_sess) throws AQException { AQQueueTable q_table; q_table = aq_sess.getQueueTable ("aq", "ObjMsgs_qtab"); /* Drop the queue table*/ q_table.drop(false); System.out.println("Successful drop"); } /* Drop the queue table (and force all queues to be stopped and dropped by the user */ public static void example(AQSession aq_sess) throws AQException { AQQueueTable q_table; q_table = aq_sess.getQueueTable ("aq", "ObjMsgs_qtab"); /* Drop the queue table (and automatically drop all queues inside it */ q_table.drop(true); System.out.println("Successful drop"); }


| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Create a queue in the specified queue table.
CREATE_QUEUE, it can be enabled by calling START_QUEUE. By default, the queue is created with both enqueue and dequeue disabled.See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments.
/* Create a message type: */ CREATE type aq.Message_typ as object ( Subject VARCHAR2(30), Text VARCHAR2(80)); /* Create a object type queue table and queue: */ EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.ObjMsgs_qtab', Queue_payload_type => 'aq.Message_typ'); EXECUTE dbms_aqadm.create_queue ( Queue_name => 'msg_queue', Queue_table => 'aq.ObjMsgs_qtab');
/* Create a RAW type queue table and queue: */ EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.RawMsgs_qtab', Queue_payload_type => 'RAW'); /* Create queue: */ EXECUTE dbms_aqadm.create_queue ( Queue_name => 'raw_msg_queue', Queue_table => 'aq.RawMsgs_qtab'); Create a prioritized message queue table and queue /* Create a queue table for priortized messages: */ EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.PriorityMsgs_qtab', Sort_list => 'PRIORITY,ENQ_TIME', Queue_payload_type => 'aq.Message_typ'); /* Create queue: */ EXECUTE dbms_aqadm.create_queue ( Queue_name => 'priority_msg_queue', Queue_table => 'aq.PriorityMsgs_qtab');
/* Create a queue table for multi-consumers: */ EXECUTE dbms_aqadm.create_queue_table ( queue_table => 'aq.MultiConsumerMsgs_qtab', Multiple_consumers => TRUE, Queue_payload_type => 'aq.Message_typ'); /* Create queue: */ EXECUTE dbms_aqadm.create_queue ( Queue_name => 'MultiConsumerMsg_queue', Queue_table => 'aq.MultiConsumerMsgs_qtab');
/* Create queue: */ EXECUTE dbms_aqadm.create_queue ( Queue_name => 'AnotherMsg_queue', queue_table => 'aq.MultiConsumerMsgs_qtab');
/* Create a queue table for multi-consumers compatible with Release 8.1: */ EXECUTE dbms_aqadm.create_queue_table ( Queue_table => 'aq.MultiConsumerMsgs81_qtab', Multiple_consumers => TRUE, Compatible => '8.1', Queue_payload_type => 'aq.Message_typ'); EXECUTE dbms_aqadm.create_queue ( Queue_name => 'MultiConsumerMsg81_queue', Queue_table => 'aq.MultiConsumerMsgs81_qtab');
public static void example(AQSession aq_sess) throws AQException { AQQueueProperty queue_prop; AQQueueTable q_table; AQQueue queue; q_table = aq_sess.getQueueTable ("aq", "ObjMsgs_qtab"); /* Create a new AQQueueProperty object: */ queue_prop = new AQQueueProperty(); queue = aq_sess.createQueue (q_table, "msg_queue", queue_prop); System.out.println("Successful createQueue"); }
public static void example(AQSession aq_sess) throws AQException { AQQueueProperty queue_prop; AQQueueTable q_table; AQQueue queue; q_table = aq_sess.getQueueTable ("aq", "RawMsgs_qtab"); /* Create a new AQQueueProperty object: */ queue_prop = new AQQueueProperty(); queue = aq_sess.createQueue (q_table, "msg_queue", queue_prop); System.out.println("Successful createQueue"); }
public static void example(AQSession aq_sess) throws AQException { AQQueueTableProperty qtable_prop; AQQueueProperty queue_prop; AQQueueTable q_table; AQQueue queue; AQAgent agent; qtable_prop = new AQQueueTableProperty("RAW"); qtable_prop.setMultiConsumer(true); qtable_prop.setSortOrder("priority,enq_time"); q_table = aq_sess.createQueueTable ("aq", "PriorityMsgs_qtab", qtable_prop); queue_prop = new AQQueueProperty(); queue = aq_sess.createQueue (q_table, "priority_msg_queue", queue_prop); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Create a nonpersistent queue.
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 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. Once 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 can enqueue RAW and Object Type (ADT) messages into a nonpersistent queue. 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 (see Registering for Notification).
You cannot invoke the listen call on a nonpersistent queue (see "Listening to One or More Single-Consumer Queues").
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments.
/* Create a nonpersistent single-consumer queue (Note: this is not preceded by creation of a queue table) */ EXECUTE dbms_aqadm.create_np_queue( Queue_name => 'Singleconsumersmsg_npque', Multiple_consumers => FALSE); /* Create a nonpersistent multi-consumer queue (Note: this is not preceded by creation of a queue table) */ EXECUTE dbms_aqadm.create_np_queue( Queue_name => 'Multiconsumersmsg_npque', Multiple_consumers => TRUE);
Feature not available through Java API.

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Alter existing properties of a queue. Only max_retries, comment, retry_delay, and retention_time can be altered.
To view retained messages, you can either dequeue by message ID or use SQL.
When a queue, queue table, or subscriber is created, modified, or dropped, and if GLOBAL_TOPIC_ENABLED = TRUE, a corresponding LDAP entry is also created.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* Alter queue to change retention time, saving messages for 1 day after dequeueing: */ EXECUTE dbms_aqadm.alter_queue ( queue_name => 'aq.Anothermsg_queue', retention_time => 86400);
/* Alter a queue to change retention time, saving messages for 1 day after dequeuing */ public static void example(AQSession aq_sess) throws AQException { AQQueueProperty queue_prop; AQQueue queue; /* Get the queue object */ queue = aq_sess.getQueue("AQ", "Anothermsg_queue"); /* Create a new AQQueueProperty object: */ queue_prop = new AQQueueProperty(); /* Change retention time to 1 day */ queue_prop.setRetentionTime(new Double(86400)); /* Alter the queue */ queue.alterQueue(queue_prop); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Drops an existing queue. DROP_QUEUE is not allowed unless STOP_QUEUE has been called to disable the queue for both enqueuing and dequeuing. All the queue data is deleted as part of the drop operation.
When a queue, queue table, or subscriber is created, modified, or dropped, and if GLOBAL_TOPIC_ENABLED = TRUE, a corresponding LDAP entry is also created.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* Stop the queue preparatory to dropping it (a queue may be dropped only after it has been succesfully stopped for enqueing and dequeing): */ EXECUTE dbms_aqadm.stop_queue ( Queue_name => 'aq.Msg_queue'); /* Drop queue: */ EXECUTE dbms_aqadm.drop_queue ( Queue_name => 'aq.Msg_queue');
EXECUTE DBMS_AQADM.DROP_QUEUE( queue_name => 'Nonpersistent_singleconsumerq1'); EXECUTE DBMS_AQADM.DROP_QUEUE( queue_name => 'Nonpersistent_multiconsumerq1');
/* Drop a queue */ public static void example(AQSession aq_sess) throws AQException { AQQueue queue; /* Get the queue object */ queue = aq_sess.getQueue("AQ", "Msg_queue"); /* Stop the queue first */ queue.stop(true); /* Drop the queue */ queue.drop(); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Creates a message format transformation. The transformation must be a SQL function with input type from_type, returning an object of type to_type. It can also be a SQL expression of type to_type, referring to from_type. All references to from_type must be of the form source.user_data.
To use this feature, you must be granted execute privileges on dbms_transform. You must also have execute privileges on the user-defined types that are the source and destination types of the transformation, and have execute privileges on any PL/SQL function being used in the transformation function. The transformation cannot write the database state (that is, perform DML) or commit or rollback the current transaction.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
dbms_transform.create_transformation(schema => 'scott', name => 'test_transf', from_schema => 'scott', from_type => 'type1', to_schema => 'scott', to_type => 'type2', transformation => 'scott.trans_func(source.user_data)');
Or you can do the following:
dbms_transform.create_transformation(schema => 'scott', name => 'test_transf', from_schema => 'scott', from_type => 'type1, to_schema => 'scott', to_type => 'type2', transformation => 'scott.type2(source.user_data.attr2, source.user_data.attr1)');
No example is provided with this release.

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
This feature is used to change the transformation function and to specify transformations for each attribute of the target type. If the attribute number 0 is specified, then the transformation expression singularly defines the transformation from the source to target types. All references to from_type must be of the form source.user_data. All references to the attributes of the source type must be prefixed by source.user_data.
To use this feature, you must be granted execute privileges on dbms_transform. You must also have execute privileges on the user-defined types that are the source and destination types of the transformation, and have execute privileges on any PL/SQL function being used in the transformation function.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
To drop a transformation.
To use this feature, you must be granted execute privileges on dbms_transform. You must also have execute privileges on the user-defined types that are the source and destination types of the transformation, and have execute privileges on any PL/SQL function being used in the transformation function.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Enables the specified queue for enqueuing or dequeueing.
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.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* Start a queue and enable both enqueue and dequeue: */ EXECUTE dbms_aqadm.start_queue ( queue_name => 'Msg_queue');
/* Start a previously stopped queue for dequeue only */ EXECUTE dbms_aqadm.start_queue ( queue_name => 'aq.msg_queue', dequeue => TRUE, enqueue => FALSE);
/* Start a queue - enable both enqueue and dequeue */ public static void example(AQSession aq_sess) throws AQException { AQQueue queue; /* Get the queue object */ queue = aq_sess.getQueue("AQ", "Msg_queue"); /* Enable enqueue and dequeue */ queue.start(); } /* Start a previously stopped queue for dequeue only */ public static void example(AQSession aq_sess) throws AQException { AQQueue queue; /* Get the queue object */ queue = aq_sess.getQueue("AQ", "Msg_queue"); /* Enable enqueue and dequeue */ queue.start(false, true); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Disables enqueuing or dequeuing on the specified queue.
By default, this call disables both ENQUEUEs or DEQUEUEs. A queue cannot be stopped if there are outstanding transactions against the queue. This operation takes effect when the call completes and does not have any transactional characteristics.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* Stop the queue: */ EXECUTE dbms_aqadm.stop_queue ( queue_name => 'aq.Msg_queue');
/* Stop a queue - wait for oustanding transactions */ public static void example(AQSession aq_sess) throws AQException { AQQueue queue; /* Get the queue object */ queue = aq_sess.getQueue("AQ", "Msg_queue"); /* Enable enqueue and dequeue */ queue.stop(true); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
To grant AQ system privileges to users and roles. The privileges are ENQUEUE_ANY, DEQUEUE_ANY, MANAGE_ANY. Initially, only SYS and SYSTEM can use this procedure successfully.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
Not applicable.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* User AQADM grants the rights to enqueue and dequeue to ANY queues: */
CONNECT aqadm/aqadm; EXECUTE DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE( privilege => 'ENQUEUE_ANY', grantee => 'Jones', admin_option => FALSE); EXECUTE DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE( privilege => 'DEQUEUE_ANY', grantee => 'Jones', admin_option => FALSE);
Feature not available through Java API

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
To revoke AQ 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.
Not applicable.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* To revoke the DEQUEUE_ANY system privilege from Jones. */ CONNECT system/manager; execute DBMS_AQADM.REVOKE_SYSTEM_PRIVILEGE(privilege=>'DEQUEUE_ANY', grantee=>'Jones');

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
To grant 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.
Not applicable.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* User grants the access right for both enqueue and dequeue rights using DBMS_AQADM.GRANT. */ EXECUTE DBMS_AQADM.GRANT_QUEUE_PRIVILEGE ( privilege => 'ALL', queue_name => 'aq.multiconsumermsg81_queue', grantee => 'Jones', grant_option => TRUE);
/* Grant enqueue and dequeue privileges on queue to user 'Jones' */ public static void example(AQSession aq_sess) throws AQException { AQQueue queue; /* Get the queue object */ queue = aq_sess.getQueue("AQ", "multiconsumermsg81_queue"); /* Enable enqueue and dequeue */ queue.grantQueuePrivilege("ALL", "Jones", true); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
To revoke privileges on a queue from users and roles. The privileges are ENQUEUE or DEQUEUE.
To revoke a privilege, the revoker must be the original grantor of the privilege. The privileges propagated through the GRANT option are revoked if the grantor's privileges are revoked.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* User can revoke the dequeue right of a grantee on a specific queue leaving the grantee with only the enqueue right: */ CONNECT scott/tiger; EXECUTE DBMS_AQADM.REVOKE_QUEUE_PRIVILEGE( privilege => 'DEQUEUE', queue_name => 'scott.ScottMsgs_queue', grantee => 'Jones');
/* User can revoke the dequeue right of a grantee on a specific queue, leaving only the enqueue right */ public static void example(AQSession aq_sess) throws AQException { AQQueue queue; /* Get the queue object */ queue = aq_sess.getQueue("SCOTT", "ScottMsgs_queue"); /* Enable enqueue and dequeue */ queue.revokeQueuePrivilege("DEQUEUE", "Jones"); }

| See Also:
Table 9-1 for a list of adminstrative interface basic operations |
Adds a default subscriber to a queue.
rule => 'PRIORITY <= 3 AND CORRID = ''FROM JAPAN'''
Note that these are all single quotation marks.