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 />

/<br />

state varchar2(2),<br />

zip number,<br />

country varchar2(100));<br />

create or replace type book_typ as object (<br />

title varchar2(100),<br />

authors varchar2(100),<br />

ISBN number,<br />

price number);<br />

/<br />

create or replace type orderitem_typ as object (<br />

quantity number,<br />

item book_typ,<br />

subtotal number);<br />

/<br />

create or replace type orderitemlist_vartyp as varray (20) of orderitem_typ;<br />

/<br />

create or replace type order_typ as object (<br />

orderno number,<br />

status varchar2(30),<br />

ordertype varchar2(30),<br />

orderregion varchar2(30),<br />

customer customer_typ,<br />

paymentmethod varchar2(30),<br />

items orderitemlist_vartyp,<br />

total number);<br />

/<br />

grant execute on order_typ to OE;<br />

grant execute on orderitemlist_vartyp to OE;<br />

grant execute on orderitem_typ to OE;<br />

grant execute on book_typ to OE;<br />

grant execute on customer_typ to OE;<br />

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

grant execute on order_typ to WS;<br />

grant execute on orderitemlist_vartyp to WS;<br />

grant execute on orderitem_typ to WS;<br />

grant execute on book_typ to WS;<br />

grant execute on customer_typ to WS;<br />

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

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