Search Results


Wednesday, April 15, 2009

AQ creation script

Advanced queue is highly used in SOA to forward messages between different services through database. We will discuss AQ in detail in the future. Now we will see how to create AQ in database.

create or replace type AQSEC.CT_MESSAGE_TYPE as OBJECT (

PAYLOAD CLOB

)

/


begin

DBMS_AQADM.CREATE_QUEUE_TABLE (queue_table => '"Username"."HR_Q"',

queue_payload_type => 'Username.CT_MESSAGE_TYPE',

storage_clause => '',

sort_list => 'enq_time',

multiple_consumers => false,

message_grouping => DBMS_AQADM.TRANSACTIONAL,

comment => '',compatible => '10.0');

end;

/


begin DBMS_AQADM.CREATE_QUEUE (queue_name => '"HR_Q"',

queue_table => '"Username"."HR_Q"',

queue_type => DBMS_AQADM.NORMAL_QUEUE,

max_retries => 5,

retry_delay => 0,

retention_time => 0,

comment => '');

end;

/


begin DBMS_AQADM.START_QUEUE (queue_name => '"Username"."HR_Q"',enqueue => true, dequeue => true);

end;

/



Article By:
Prasanna Jayaraman

Please post your Ideas and Comments
Post a Comment