Oracle9i Application Developer's Guide - Advanced Queuing
Release 1 (9.0.1)

Part Number A88890-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

Administrative Interface, 19 of 36


Granting Queue Privilege

Figure 9-18 Use Case Diagram: Grant Queue Privilege


Text description of adq09qad20.gif follows
Text description of the illustration adq09qad20.gif


To refer to the table of all basic operations having to do with the Administrative Interface see:

 

Purpose

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.

Usage Notes

Not applicable.

Syntax

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:

Examples

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:

PL/SQL (DBMS_AQADM): Granting Queue Privilege

/* 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);   
   

Java (JDBC): Granting Queue Privilege

/* 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);
}


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