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.

LNOCI Applications<br />

Queue Table Export-Import<br />

For an OCI application to access an 8.1-style queue, the session user has to be<br />

granted either the object privilege of the queue he intends to access or the ENQUEUE<br />

ANY QUEUE or DEQUEUE ANY QUEUE system privileges. The EXECUTE right of<br />

DBMS_AQ will not be checked against the session user’s rights if the queue he<br />

intends to access is an <strong>Oracle</strong>9i or 8.1-compatible queue.<br />

Security Required for Propagation<br />

AQ propagates messages through database links. The propagation driver dequeues<br />

from the source queue as owner of the source queue; hence, no explicit access rights<br />

have to be granted on the source queue. At the destination, the login user in the<br />

database link should either be granted ENQUEUE ANY QUEUE privilege or be granted<br />

the rights to enqueue to the destination queue. However, if the login user in the<br />

database link also owns the queue tables at the destination, no explicit AQ<br />

privileges need to be granted.<br />

Queue Table Export-Import<br />

Exporting Queue Table Data<br />

Table 4–2 Operations and Required Privileges<br />

Operation(s) Privileges Required<br />

ENQUEUE/ DEQUEUE to<br />

another’s queues<br />

ENQUEUE/ DEQUEUE to<br />

any queues<br />

Must be granted execute rights on DBMS_AQ and be granted<br />

privileges by the owner using DBMS_AQADM.GRANT_QUEUE_<br />

PRIVILEGE.<br />

Must be granted execute rights on DBMS_AQ and be granted<br />

ENQUEUE ANY QUEUE or DEQUEUE ANY QUEUE system<br />

privileges by an AQ administrator using DBMS_<br />

AQADM.GRANT_SYSTEM_PRIVILEGE.<br />

When a queue table is exported, the queue table data and anonymous blocks of<br />

PL/SQL code are written to the export dump file. When a queue table is imported,<br />

the import utility executes these PL/SQL anonymous blocks to write the metadata<br />

to the data dictionary.<br />

The export of queues entails the export of the underlying queue tables and related<br />

dictionary tables. Export of queues can only be done at queue-table granularity.<br />

Managing AQ 4-5

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

Saved successfully!

Ooh no, something went wrong!