09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Granting System Privilege<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.GRANT_SYSTEM_PRIVILEGE procedure<br />

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

Java (JDBC): There is no applicable syntax reference for this use case<br />

Usage Notes<br />

Not applicable.<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): Granting System Privilege on page 9-49<br />

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

Java (JDBC): Granting System Privilege on page 9-50<br />

PL/SQL (DBMS_AQADM): Granting System Privilege<br />

/* User AQADM grants the rights to enqueue and dequeue to ANY queues: */<br />

Note: You may need to set up the following data structures for<br />

certain examples to work:<br />

CONNECT system/manager;<br />

CREATE USER aqadm IDENTIFIED BY aqadm;<br />

GRANT CONNECT, RESOURCE TO aqadm;<br />

GRANT EXECUTE ON DBMS_AQADM TO aqadm;<br />

GRANT Aq_administrator_role TO aqadm;<br />

CONNECT aqadm/aqadm;<br />

EXECUTE DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(<br />

privilege => ’ENQUEUE_ANY’,<br />

grantee => ’Jones’,<br />

admin_option => FALSE);<br />

EXECUTE DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(<br />

Administrative Interface 9-49

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

Saved successfully!

Ooh no, something went wrong!