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.

tkaqdoca.sql: Script to Create Users, Objects, Queue Tables, Queues & Subscribers<br />

tkaqdoca.sql: Script to Create Users, Objects, Queue Tables, Queues &<br />

Subscribers<br />

Rem $Header: tkaqdoca.sql 26-jan-99.17:50:37 aquser1 Exp $<br />

Rem<br />

Rem tkaqdoca.sql<br />

Rem<br />

Rem Copyright (c) <strong>Oracle</strong> Corporation 1998, 1999. All Rights Reserved.<br />

Rem<br />

Rem NAME<br />

Rem tkaqdoca.sql - TKAQ DOCumentation Admin examples file<br />

Rem Set up a queue admin account and individual accounts for each application<br />

Rem<br />

connect system/manager<br />

set serveroutput on;<br />

set echo on;<br />

Rem Create a common admin account for all BooksOnLine applications<br />

Rem<br />

create user BOLADM identified by BOLADM;<br />

grant connect, resource, aq_administrator_role to BOLADM;<br />

grant execute on dbms_aq to BOLADM;<br />

grant execute on dbms_aqadm to BOLADM;<br />

execute dbms_aqadm.grant_system_privilege('ENQUEUE_ANY','BOLADM',FALSE);<br />

execute dbms_aqadm.grant_system_privilege('DEQUEUE_ANY','BOLADM',FALSE);<br />

Rem Create the application schemas and grant appropriate permission<br />

Rem to all schemas<br />

Rem Create an account for Order Entry<br />

create user OE identified by OE;<br />

grant connect, resource to OE;<br />

grant execute on dbms_aq to OE;<br />

grant execute on dbms_aqadm to OE;<br />

Rem Create an account for WR Shipping<br />

create user WS identified by WS;<br />

grant connect, resource to WS;<br />

grant execute on dbms_aq to WS;<br />

grant execute on dbms_aqadm to WS;<br />

Rem Create an account for ER Shipping<br />

create user ES identified by ES;<br />

grant connect, resource to ES;<br />

C-2 <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!