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.

tkaqdocp.sql: Examples of Operational Interfaces<br />

Rem check instance affinity of OE queue tables from AQ administrative view<br />

select queue_table, primary_instance, secondary_instance, owner_instance<br />

from user_queue_tables;<br />

Rem ==================================================================<br />

Rem Illustrating Propagation Scheduling<br />

Rem ==================================================================<br />

Rem Login into OE account<br />

set echo on;<br />

connect OE/OE;<br />

set serveroutput on;<br />

Rem<br />

Rem Schedule Propagation from bookedorders_que to shipping<br />

Rem<br />

execute dbms_aqadm.schedule_propagation(queue_name => 'OE.OE_bookedorders_que');<br />

Rem Login into boladm account<br />

set echo on;<br />

connect boladm/boladm;<br />

set serveroutput on;<br />

Rem create a procedure to enqueue an order<br />

create or replace procedure order_enq(book_title in varchar2,<br />

book_qty in number,<br />

order_num in number,<br />

shipping_priority in number,<br />

cust_state in varchar2,<br />

cust_country in varchar2,<br />

cust_region in varchar2,<br />

cust_ord_typ in varchar2) as<br />

OE_enq_order_data BOLADM.order_typ;<br />

OE_enq_cust_data BOLADM.customer_typ;<br />

OE_enq_book_data BOLADM.book_typ;<br />

OE_enq_item_data BOLADM.orderitem_typ;<br />

OE_enq_item_list BOLADM.orderitemlist_vartyp;<br />

enqopt dbms_aq.enqueue_options_t;<br />

msgprop dbms_aq.message_properties_t;<br />

enq_msgid raw(16);<br />

Scripts for Implementing BooksOnLine C-23

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

Saved successfully!

Ooh no, something went wrong!