Advanced queue DBMS_AQ.ENQUEUE procedure

Hi all.
I want to use the oracle DBMS_AQ.ENQUEUE procedure to enqueue a message to a specified queue. However I want to only do it in an after statement trigger (for insert update or delete).
My concern is if the DML operation is rolled back for whatever reason, the message might remain (ie: I only want the message to remain if the record is commited).
Can anyone tell me if the DBMS_AQ.ENQUEUE would be rolled back and reversed if the DML operation is rolled back? Or if Oracle decides to re-do the operation for write concurrency, etc.. ?
Any ideas on how to make it work if not?
Regards,
Greg.

Well it appears that I was mistaken. Wouldn't be the first time. But hey - it got you to read the docs. And that's a good thing!
You should be okay in an AFTER STATEMENT trigger since that trigger will only fire once and there will no side effects.
But as Tom Kyte has said
>
Now, before we discuss this - you must be made aware that not only do we NOT promise to fire the trigger once - we actually promise to fire it more than once in certain cases:
You are doing something non-transactional in a trigger - we are doing a statement level rollback silently on you (we do those, we have always done those, we will always do those). When we rollback - your code doesn't "rollback".
in general before, before for each row, after for each row triggers can fire twice in a multi-row update"
{quote}
See this in his Followup April 28, 2010 - 7am Central time zone: at
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2599480800346313755#2600827300346401245

Similar Messages

  • Standard datatype in dbms_aq.enqueue procedure

    Payload argument is defined as standard datatype in dbms_aq.enqueue procedure definition. Any object type can then be passed to the enqueue procedure. Can we define an argument's type as STANDARD in a user defined PL/SQL procedure ?
    What is standard datatype ? I haven't seen documentation for it.
    PROCEDURE ENQUEUE
    Argument Name Type
    QUEUE_NAME VARCHAR2 IN
    PAYLOAD STANDARD IN
    other arguments..

    The payload has to be a user created object type. In Oracle9i you can use SYS.Anydata or SYS.XMLType.

  • Doubt: Problem in enqueing using DBMS_AQ.enqueue procedure

    Hello All,
    I have one issue with Oracle AQ. One of our implementation requires us to extract data from the tables and enqueue the extracted data into an Oracle AQ.
    I will try to explain my problem as briefly as possible:
    1. We have created a queue of type CLOB using the following procedure
    begin
    dbms_aqadm.create_queue_table('BOD36_3PLB2B_TABLE', 'IKN_CLOB'); -- IKN_CLOB—This is CLOB custom type that we have created to have CLOB data.
    dbms_aqadm.create_queue('BOD36_3PLB2B_Q', 'BOD36_3PLB2B_TABLE');
    dbms_aqadm.start_queue('BOD36_3PLB2B_Q');
    end;
    The queue creation was successful.
    2. Then we have developed a package to extract data from the database into a VARRAY and then using the varray as the payload.
    3. In the package we are calling the following code to enqueue data into the database with the VARRAY as the payload
    dbms_aq.enqueue(queue_name => ikn_qname,
    enqueue_options => lt_enqueue_options,
    message_properties => lt_message_properties,
    payload => p_SHOWPL_ARR_OUT, ---> p_SHOWPL_ARR_OUT it is the varray to which we are putting the data to enqueue
    msgid => messageid);
    4. When I compile the package, I get the error: PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'.
    If you have faced similar issues and have any pointers to the above, then please help!! I am not sure where i have gone wrong.
    Please help !!!!!
    Thanks in advance and thanks for your patience.
    Regards,
    Dibya

    The package has another function enqueue_array. Maybe that will help you. Check it out from the Oracle docs.
    Ben

  • How many recipients can be added to one enqueue procedure?

    Hi all,
    Does anybody know how many recipients can be added to one DBMS_AQ.ENQUEUE procedure?
    According to a user's guide of Advanced Quing, it seems that we can have 1000 "local queue" subscribers and/or 32 "remote database" subscribers.
    But I'm not sure this restriction is also true to the recipient list which I just declare when I enqueue messages. (I didn't do ADD_SUBSCRIBER.)
    Also, I wander what does the remote "database" mean. At first, I thought it meaned totally different database instance (we need to use DB link or something to connect it), however, it seems that we can't add more than 32 remote queue subscribers.
    I'm using 10g R2.
    Any information on this matter will be highly appreciated.
    Thanks,

    Hi,
    I think there is some confusion between users and subscriber for a queue. Subscriber which dedicatedly point to queue and users who have privilege to dequeue the message. If you are not using ADD_subscriber that means you are connecting to queues as a user with dequeue privilieges.

  • Advanced Queues question

    Hi.
    Can anyone tell me how soon after I place an item into an advanced queue, the notification procedure (which was registered via dbms_aq.register to process the items in the queue) is called when that item is commited?
    Ie: what delay Oracle has? Is it configurable? I am having trouble finding information on the timing of the operation.

    I have read through as much as of the documentation I can find, and now including your link rp0428 ( thank you by the way ) however information on timing is somewhat illusive.
    I'll be creating items in the queue in an after statement trigger ( this way, any rollbacks will also rollback the placed queue item). The plan is to kick off processing once the commit has occurred ( to look at and take action on the latest information updated or inserted).
    My concern was if the record I'm interested in is updated (I don't think I need to worry about inserts) several times (with commits each time) in quick succession. It would create several items in the queue (which is correct, I want it to fire for each commit)
    The notification procedure I register (by the time it is called) may not know several updates have occurred. I know I could possibly include in the queue, a copy of the data but the design I'm trying to follow can't use that information (in order to meet some design goals).
    If the notification (this is all via pl*sql by the way, not email or java) takes a few seconds I'll have a problem. If almost instantly, that's good however information on the speed of that is what may make or break this design.

  • Sample Message Driven Bean using Oracle Advance Queuing

    Hi,
    Can someone please provide me with sample MDB using Oracle Advance Queuing to Enqueue & Dequeue messages?
    Thanks

    Write your email Id .....I have got a test case which basically enqueus and dequeues the messages using Oracle9i AQ..
    --Venky                                                                                                                                                                                                                                                                   

  • Does the advanced queue support setting the pay load type as array/table?

    Does the advanced queue support setting the pay load type as array/table?
    if yes, how to write the enqueue script, I tried to write the following the script to enqueue, but failed, pls help to review it . Thanks...
    ------Create payload type
    create or replace TYPE "SIMPLEARRAY" AS VARRAY(99) OF VARCHAR(20);
    ------Create queue table
    BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE(
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_payload_type => 'LUWEIQIN.SIMPLEARRAY',
    storage_clause => 'PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 TABLESPACE USERS',
    Sort_list => 'ENQ_TIME',
    Compatible => '8.1.3');
    END;
    ------Create queue
    BEGIN DBMS_AQADM.CREATE_QUEUE(
    Queue_name => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_type => 0,
    Max_retries => 5,
    Retry_delay => 0,
    dependency_tracking => FALSE);
    END;
    -------Start queue
    BEGIN
    dbms_aqadm.start_queue(queue_name => 'LUWEIQIN.SIMPLEQUEUE', dequeue => TRUE, enqueue => TRUE);
    END;
    -------Enqueue
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    but when I use the following script to enqueue get error. Pls help to review. Thanks...
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Oracle Advanced Queuing - Propagation problem - 11g

    Hi,
    I have a problem when propagation messages between queues. When the message is propagated, it stays on the source queue with READY state.
    I have created two queues on 11g with a propagation rule that any message from queue A are sent to queue B. My problem is that the message from the source queue stays in the source queue even after propagation, which isn't what I was expecting. The problem doesn't occur if the queues are on a different database. This problem only happens if the queues are on the same database.
    the script I use is this:
    For USERB (which has the destination queue)
    create type EVENT_MESSAGE as object (
    eventsource VARCHAR2(30),
    eventname VARCHAR2(255),
    eventid NUMBER(19,0),
    message CLOB
    DECLARE
    an_agent sys.aq$_agent;
    BEGIN
    -- create the publish/subscribe queue table
    dbms_aqadm.create_queue_table(
    queue_table => 'DESTINATION_QUEUE_TABLE',
    queue_payload_type=>'EVENT_MESSAGE',
    sort_list => 'ENQ_TIME',
    message_grouping => DBMS_AQADM.NONE,
    multiple_consumers=>true
    -- create the queue
    dbms_aqadm.create_queue(
    queue_name => 'DESTINATION',
    queue_table => 'DESTINATION_QUEUE_TABLE',
    queue_type => DBMS_AQADM.NORMAL_QUEUE,
    max_retries => 5
    dbms_aqadm.create_aq_agent(agent_name =>'DEQUEUE_AGENT');
    an_agent := sys.aq$_agent('DEQUEUE_AGENT', null, null);
    dbms_aqadm.enable_db_access(
    agent_name => 'DEQUEUE_AGENT',
    db_username => 'USERB'
    dbms_aqadm.add_subscriber(
    queue_name => 'DESTINATION',
    subscriber => an_agent,
    queue_to_queue => FALSE,
    delivery_mode => DBMS_AQADM.PERSISTENT
    -- start the queues
    dbms_aqadm.start_queue('DESTINATION');
    END;
    For USERA
    create type EVENT_MESSAGE as object (
    eventsource VARCHAR2(30),
    eventname VARCHAR2(255),
    eventid NUMBER(19,0),
    message CLOB
    BEGIN
    -- create the publish/subscribe queue table
    dbms_aqadm.create_queue_table(
    queue_table => 'SOURCE_QUEUE_TABLE',
    queue_payload_type=>'EVENT_MESSAGE',
    sort_list => 'ENQ_TIME',
    message_grouping => DBMS_AQADM.NONE,
    multiple_consumers=>true
    -- create the queue
    dbms_aqadm.create_queue(
    queue_name => 'SOURCE',
    queue_table => 'SOURCE_QUEUE_TABLE',
    queue_type => DBMS_AQADM.NORMAL_QUEUE,
    max_retries => 5
    -- start the queues
    dbms_aqadm.start_queue('SOURCE');
    -- create the propagation
    dbms_aqadm.add_subscriber(queue_name => 'SOURCE',
    subscriber => sys.aq$_agent('DEQUEUE_AGENT','USERB.DESTINATION',null),
    queue_to_queue => true);
    dbms_aqadm.schedule_propagation(queue_name => 'SOURCE',
    start_time => sysdate,
    latency => 25,
    destination_queue => 'USERB.DESTINATION');
    END;
    When I enqueue a message to the source on USERA with this:
    declare
    rc binary_integer;
    nq_opt dbms_aq.enqueue_options_t;
    nq_pro dbms_aq.message_properties_t;
    datas EVENT_MESSAGE;
    msgid raw(16);
    begin
    nq_pro.expiration := dbms_aq.never;
    nq_pro.sender_id := sys.aq$_agent('ENQUEUE_AGENT', null, null);
    datas := AGEAS_EVENT_MESSAGE('message','eventname',1,null);
    dbms_aq.enqueue('SOURCE',nq_opt,nq_pro,datas,msgid);
    end;
    The message is propagated to the destination queue, no problem, but the message state on the source queue is kept as ready. I would have expected it to be marked as processed and disappear from the queue table.
    When I look at the AQ$_SOURCE_QUEUE_TABLE_S the I see these records:
         QUEUE_NAME     NAME     ADDRESS     PROTOCOL      SUBSCRIBER TYPE
         SOURCE     (null)     "USERB"."DESTINATION"@AQ$_LOCAL     0     1736
         SOURCE     DEQUEUE_AGENT     "USERB"."DESTINATION"     0     577
    Can anyone help?

    I was talking about following oracle documentations:
    Oracle Database 11g: Advanced Queuing (Technical Whitepaper)
    Streams Advanced Queuing: Best Practices (Technical Whitepaper)
    Oracle Streams Advanced Queuing and Real Application Clusters: Scalability and Performance Guidelines (Technical Whitepaper)
    They are available at.. http://www.oracle.com/technetwork/database/features/data-integration/default-159085.html

  • Advanced Queuing Help

    Hi, I need help with creating an Advanced queue. I have already created the queue table but when I try to create the queue it says that it was sucessful, yet I can not find it. Also I need help with creating a SQL subscriber such that some sort of SQL code with enqueue a message, and the subscriber will dequeue and print it out or something. I am also going to set up a ESB process to do the some thing.
    Here is my queue_table code:
    dbms_aqadm.create_queue_table( queue_table => 'TEST_QUEUE_TABLE',
                                  queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE',
                                  multiple_consumers => True);

    Hey demorgan, I get this error with the demo. At some point I have to make a procedure with this:
    SELECT TO_NUMBER(SUBSTR(dbms_crypto.randominteger,3,1))
        INTO x
        FROM dual;I get this error: ORA-00904: : invalid identifier
    Also how do I view what is on a queue? This demo does not show that.

  • Wait Time Bug in Advanced Queuing ?

    Hello.
    I'm working with oracle 8.1 db and i have oracle odp.net driver 9.2.
    I have the following problem in AQ, I hope someone can help me.
    I made this stored procedure for enqueuing:
    pMessageID OUT RAW,
         pMessage     IN     varchar2,
         pTicket IN varchar2
    IS
    l_enqueue_options DBMS_AQ.enqueue_options_t;
    l_message_properties DBMS_AQ.message_properties_t;
    l_message_handle RAW(16);
    l_msg TESTES.WORK_MESSAGE;
    BEGIN
    l_msg := TESTES.WORK_MESSAGE(pMessage, pTicket);
    DBMS_AQ.enqueue(queue_name => 'TESTES.WORK',
    enqueue_options => l_enqueue_options,
    message_properties => l_message_properties,
    payload => l_msg,
    msgid => l_message_handle);
    COMMIT;
    END;
    and i have made this procedured for dequeuing:
    pInformation OUT varchar2,
    pTicket OUT varchar2
    IS
    l_dequeue_options DBMS_AQ.dequeue_options_t;
    l_message_properties DBMS_AQ.message_properties_t;
    l_message_handle RAW(16);
    l_message0 WORK_MESSAGE;
    BEGIN
    l_dequeue_options.wait := 1;
    DBMS_AQ.dequeue(queue_name => 'TESTES.WORK',
    dequeue_options => l_dequeue_options,
    message_properties => l_message_properties,
    payload => l_message0,
    msgid => l_message_handle);
    COMMIT;
    pInformation := l_message0.information;
    pTicket := l_message0.ticket;
    END;
    I have one thread that continuously checks the queue for new messages, with 5 seconds interval. this thread can see and process all messages that are in the queue previously... when it connects it processes all the messages. After that it will begin checking the queue in every 5 seconds. Then I put some new messages in the queue and it SHOULD see them and process them. The problem is that if the wait time in dequeue options is 0 (like I would wanted to) the thread doesn't see any message, although there are the ones I put there. If the wait time is > 0 then...it goes ok, it sees the messages and process them.
    Anyone can help me understanding the why of this strange behaviour ?
    I would realy like to use 0 seconds wait time.
    Thanks

    I do not have an answer at the moment but I have unsuffited the file so that others can look at the program.
    Jeremy Braden
    Attachments:
    Queue.vi ‏77 KB

  • Advanced Queuing between 2 databases

    Hi,
    We want to use Oracle Advance Queuing to send a message from a source Database (transactional) to a Reporting database
    On a particular event on a record in the source database, we want to enqueue the record's code on a Queue in the target database, where the dequeuing will happen and some processing will take place for each code retrieved.
    Do we need to set up the Advanced Queuing software on both DBs?
    - Can we just have 1 queue on the target DB and get the source Database to enqueue records to it? How will the source DB will be given access to the queue?
    - Or do I really need to have a queue on each Database and use propagation?
    Thanks in advance for your help.
    Rgds

    Tony,
    thanks very much for your precious advice.
    I like your suggestion of having one queue, it keeps the infrastruture simple.
    Have I got the option of having this single queue either at the source or the target DB?
    Maybe let me summarise more precisely what I am trying to achieve: we want to copy a complex data structure on the Source DB to a simplified/flatter data structure on the reporting DB.
    An event on a row on the main table on the source DB triggers the copy.
    We are thinking of enqueing of the record's id to the queue (So app on the source DB will have to enqueue)
    and when dequeuing each message , a stored procedure will read the data structure for this record id and child tables and insert the relevant data to the report data structure on the target DB.
    So with one queue, it seems that there are 3 options, not sure which is best. The idea is to have minimum impact on the source DB
    1. Queue at the target DB. Source DB enqueues message remotely (is this possible? can't find any documentation about this?). Message is dequeued at the target and the proc (at target) reads from the source with DB link and writes the new data to the target
    2. Queue at the source DB. Source DB enqueues message locally, an application on the target DB dequeues the message and the procedure (at target) reads from the source with DB link and writes the new data to the target DB.
    3.Queue at the source DB. Source DB enqueues message locally, an application on the source DB dequeues the message and the procedure (at source) reads data from the source and writes the new data to the target using a DB link
    3. seems having the most impact on performance of the source db?
    In all case I don't think I can avoid a DB link in the sored proc (one way or the other) as the data structures are a too complex to be passed through the queue....
    What do you think?
    Thanks
    Philippe

  • Bisics of Advanced Queuing????

    Hi,
    I need to write a PL/SQL stored procedure to periodically carry out some processing in the database.
    Only one instance of the procedure is allowed to be run at any point in time. If an attempt to run the procedure is made while it is currently working it should be deferred until the current instance has completed it's task.
    I think one possible solution is to use the Advanced Queuing feature in Oracle 9.
    Please. Can anyone confirm this as a good idea (if so suggest how to get started) or offer other suitable solutions?
    Any relevant comments most welcome?
    Many thanks
    Tyrone

    Sorry about the typo in the subject.
    I will need to use Oracle's batch scheduling feature (dbms_job) to periodically put onto the queue the request for some work to be done (say every two hours). My intention is to use the batch scheduling to enqueue this request.
    The sticking point for me is the configuration of the dequeuing process. Can the queue be configured to automatically invoke an event (some PL/SQL code) once the message works it's way to the top of the queue. This will help avoid a convoluted senerio of setting up another sceheduled batch process to dequeue messages every five minutes (the work to be done can be initiated from sources other then the sheduled job also).
    Thanks in advance for replies.

  • Nested Tables and Advanced Queues- Please Help.

    How do i work with NestedTable type and Advanced Queue.
    I have done the following
    I have Oracle 8.1.7 enterprise edition.
    create type myType as TABLE OF varchar(32);
    create type myObject as OBJECT (
    id int,
    myt myType);
    DECLARE
    BEGIN
    dbms_aqadm.create_queue_table(
    queue_table => 'my_queue_table',
    multiple_consumers => TRUE,
    queue_payload_type => 'myObject',
    compatible => '8.1.3'
    END;
    The Nested Table and Object are created successfully.
    but the queue is not created.
    I get the following message.
    DECLARE
    ERROR at line 1:
    ORA-22913: must specify table name for nested table column or
    attribute
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2012
    ORA-06512: at "SYS.DBMS_AQADM", line 55
    ORA-06512: at line 3
    I know how to specify the nested table storage clause for
    create table statement, but there is no provision for
    it in the create_queue_table procedure.
    Any help will be greately appriciated.
    i have already created and tested aqs with simple data types,
    also i have created simple tables with nested table type
    elements.
    but the combo of Nested tables and AQ is not working.
    thanks in advance.

    Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
    As you suggested me: i have done a block based on a sub-query for the nested-table:
    'select courses from department where name= :department.name'.
    In the master block(department) i have the when-new-record-instance trigger:
    Declare
    LC$Req varchar2(256);
    Begin
    LC$Req := '(select ns.courses from table
    ( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
    Go_block('block11');
    Clear_Block ;
    Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
    Execute_query ;
    End ;
    Now the errors i receive, this time in the runtime mode are:
    - FRM-41380: Cannot set the blocks query data source
    -FRM-41003: This function cannot be performed here.
    Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
    Thank you in advance.

  • Java advanced queue MDB class usage

    Hello,
    Loads of questions about JMS AQ and MDB.
    I have not found anything that tells you how to use the oracle.jms classes within a MDB's directly. Do I just cast the message to a AQMessage and retrieve from there?
    I have found plenty of documentation about using the oracle.jms classes. Ive found a lot of information about using advanced queues and enqueing and dequeuing to them in Java. I have found information about MDBs and how to use them as a regular service ie: using TextMessage
    Is there a simple document describing MDB oracle AQ classes? I have looked through umpteen million Oracle documents to no avail.
    Is there an interface for MDB in the Oracle AQ classes which has an onMessage() method which I can implement taking in oracle.jms classes?
    When processing a message that I would like to put on another queue do I call the AQ classes to enqueue a message and set its attributes that way or do I use the JMS classes and their methods to do that?

    http://download-west.oracle.com/docs/cd/A97688_12/generic.903/a97677/mdb.htm#1013265 should get me most of the way there.

  • Propagation between queues in Oracle Advanced Queuing

    We would like to connect two queues that reside in different database schemas/instances.
    We try to use the propagation feature of Oracle to achieve this.
    The queue-type is the same for both queues.
    Enqueuing is done with a recipient list in order to set multiple local subscribers for the messages that are put onto the queue.
    We would like to propagate between queues without changing the applications that write to originating queue and the other applications that read from the target queue.
    During our research we only found ways where we need to change the application that writes onto the queue, which is not acceptable for us. Also the list of subscribers needs to be different based on the message.
    Therefore I have the following question:
    - is there a way to set up propagation between queues in a way where we don't need to modify the sending application?
    - if not, is there a different way to connect two queues via a subscriber/consumer?

    Oracle8i for Linux does have AQ, although I haven't evaluated it
    yet. If you're still having trouble with the install, make sure
    you get the patch. A quicker and easier way to get Oracle8i up
    cheaply for evaluation is to download the NT version. I'm
    evaluating Oracle8i for both Linux and NT and the NT version is
    more stable.
    I would really appreciate hearing about your experiences with AQ
    on Oracle8 (8.0.4.3). I have several projects that we have been
    considering using AQ with. Please send me an email and tell me
    what problems / work-arounds you found.
    Christian Schroeder (guest) wrote:
    : Hello,
    : I still haven't managed to install 8i completely
    : (files with zero-length, wrong permissions, wrong JVM, ...),
    : anyway... -))
    : We are using Oracle Advanced Queuing under 8.0.4.3 on AIX in
    : a project at my company and I wondered if AQ is in 8i for
    Linux?
    : I really would like to evaluate it at home, since the AIX
    : AQ version has some bugs and restrictions which I really need
    to
    : get around.
    : My idea is to get 8i for AIX, but I wouldn't buy it if the
    : queuing is still unstable.
    : The 8.0.4 documentation states that one will get AQ in the
    : Enterprise Edition with message-type 'RAW' and the Objects
    Option
    : will add full functionality if also purchased. I didn't find
    : any comments on AQ in the installation guide.
    : Regards,
    : Christian
    null

Maybe you are looking for