09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Revoking Queue Privilege<br />

Usage Notes<br />

To revoke a privilege, the revoker must be the original grantor of the privilege. The<br />

privileges propagated through the GRANT option are revoked if the grantor’s<br />

privileges are revoked.<br />

Syntax<br />

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in<br />

each programmatic environment. Use the following syntax references for each<br />

programmatic environment:<br />

PL/SQL (DBMS_AQADM Package): <strong>Oracle</strong>9i Supplied PL/SQL Packages and<br />

<br />

Types Reference, DBMS_AQADM.REVOKE_QUEUE_PRIVILEGE procedure<br />

Visual Basic (OO4O): There is no applicable syntax reference for this use case<br />

Java (JDBC): <strong>Oracle</strong>9i Supplied Java Packages Reference oracle.AQ,<br />

<br />

revokeQueuePrivledge<br />

Examples<br />

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in<br />

each programmatic environment. Examples are provided in the following<br />

programmatic environments:<br />

PL/SQL (DBMS_AQADM): Revoking Queue Privilege on page 9-56<br />

VB (OO4O): Example not provided.<br />

Java (JDBC): Revoking Queue Privilege on page 9-56<br />

PL/SQL (DBMS_AQADM): Revoking Queue Privilege<br />

/* User can revoke the dequeue right of a grantee on a specific queue<br />

leaving the grantee with only the enqueue right: */<br />

CONNECT scott/tiger;<br />

EXECUTE DBMS_AQADM.REVOKE_QUEUE_PRIVILEGE(<br />

privilege => ’DEQUEUE’,<br />

queue_name => ’scott.ScottMsgs_queue’,<br />

grantee => ’Jones’);<br />

Java (JDBC): Revoking Queue Privilege<br />

/* User can revoke the dequeue right of a grantee on a specific<br />

queue, leaving only the enqueue right */<br />

public static void example(AQSession aq_sess) throws AQException<br />

{<br />

9-56 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!