Friday, 30 October 2015

How to start ENQUEUE and DEQUEUE in Oracle

-- Start a queue and enable both enqueue and dequeue
EXECUTE dbms_aqadm.start_queue (
   queue_name         => 'msg_queue');



-- Start a previously stopped queue for dequeue only
EXECUTE dbms_aqadm.start_queue ( 
   queue_name         => 'msg_queue', 
   dequeue            => TRUE, 
   enqueue            => FALSE);


-- Start enqueue after dequeue also
EXECUTE dbms_aqadm.start_queue ( 
   queue_name         => 'msg_queue', 
   dequeue            => FALSE,  -- dequeue won't be stopped even if this is FALSE
   enqueue            => TRUE);

No comments:

Post a Comment