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.

<strong>Oracle</strong> Enterprise Manager Support<br />

GRANT EXECUTE ON DBMS_AQADM TO aqadm;<br />

GRANT EXECUTE ON DBMS_AQ TO aqadm;<br />

This allows the user to execute the procedures in the AQ packages from within a<br />

user procedure.<br />

Creating Users AQUSER1 and AQUSER2<br />

If you want to create AQ users who create and access queues within their own<br />

schemas, follow the steps outlined in "Creating a User as an AQ Administrator"<br />

except do not grant the AQ_ADMINISTRATOR_ROLE.<br />

CONNECT system/manager<br />

CREATE USER aquser1 IDENTIFIED BY aquser1;<br />

GRANT CONNECT, RESOURCE TO aquser1;<br />

Additionally, you can grant execute privilege on the AQ packages as follows:<br />

GRANT EXECUTE ON DBMS_AQADM to aquser1;<br />

GRANT EXECUTE ON DBMS_AQ TO aquser1;<br />

If you wish to create an AQ user who does not create queues but uses a queue in<br />

another schema, first follow the steps outlined in the previous section. In addition,<br />

you must grant object level privileges. However, note that this applies only to<br />

queues defined using 8.1 compatible queue tables.<br />

CONNECT system/manager<br />

CREATE USER aquser2 IDENTIFIED BY aquser2;<br />

GRANT CONNECT, RESOURCE TO aquser2;<br />

Additionally, you can grant execute on the AQ packages as follows:<br />

GRANT EXECUTE ON DBMS_AQADM to aquser2;<br />

GRANT EXECUTE ON DBMS_AQ TO aquser2;<br />

For aquser2 to access the queue, aquser1_q1 in aquser1 schema, aquser1<br />

must execute the following statements:<br />

CONNECT aquser1/aquser1<br />

EXECUTE DBMS_AQADM.GRANT_QUEUE_PRIVILEGE(<br />

'ENQUEUE','aquser1_q1','aquser2',FALSE);<br />

<strong>Oracle</strong> Enterprise Manager Support<br />

<strong>Oracle</strong> Enterprise Manager supports most of the administrative functions of<br />

<strong>Advanced</strong> <strong>Queuing</strong>. AQ functions are found under the Distributed node in the nav-<br />

4-8 <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!