This content has been marked as final. Show 3 replies
if you are familiar with database jobs ( e.g. DBMS_JOB or DBMS_SCHEDULER )
you could setup a procedure to listen at your exception queue ( endless loop with DBMS_AQ.DEQUEUE ).
Every time a row will be inserted you could dequeue this row automatically.
I am not familiar with database jobs :(
Could you please provide a simple example to set up a listener at exception queue?
Thanks & Regards,
as you wrote you already have a code snippet with DBMS_AQ.DEQUEUE of an exception queue.
Wrap this DEQUEUE in an infinite loop (LOOP ... END LOOP). In order to have this procedure as an autonomous session
you can start it as a database job:
DECLARE v_jobno NUMBER(6); BEGIN DBMS_JOB.SUBMIT( v_jobno, 'BEGIN <your module>; END;', SYSDATE, NULL ); COMMIT; END; /