
create or replace type AQ_SERVICE_EXCEPTION_T as object
(
CORRELATION_ID VARCHAR2 (50),
process_name   varchar2(100),
INSTANCE_ID VARCHAR2 (50),
ERROR_TIMESTAMP DATE ,
ERROR_CATEGORY VARCHAR2 (50),
ERROR_MESSAGE VARCHAR2 (2000),
INPUT_MESSAGE CLOB,
STATUS_CODE NUMBER  ,

);
/

begin
  dbms_aqadm.create_queue_table(queue_table =>'SERVICE_EXCEPTIONS_QT',
                                queue_payload_type => 'etcadmin.AQ_SERVICE_EXCEPTION_T',multiple_consumers => false,compatible => '10.1.0' );  
                                dbms_aqadm.create_queue_table(queue_table=>'SERVICE_EXCEPTIONS_QT', queue_payload_type=>'sys.aq$_jms_message');                                
  dbms_aqadm.create_queue(queue_name => 'SERVICE_EXCEPTIONS_Q',queue_table => 'SERVICE_EXCEPTIONS_QT');
  dbms_aqadm.start_queue('SERVICE_EXCEPTIONS_Q'); 
end;

/
commit;
