Purging queues in Oracle 8i

Hi,
I've got an old Oracle 8i (8.1.7.3.0) database that has some queues that have been running for years with retention_time=-1 so there are gigabytes of old messages taking up approx 200GB of disk space. Here's an example of how one of the queues looks:
BEGIN DBMS_AQADM.CREATE_QUEUE(
Queue_name => 'ABC.MY_Q',
Queue_table => 'ABC.MY_Q_TAB',
Queue_type => 0,
Max_retries => 5,
Retry_delay => 0,
Retention_time => -1,
dependency_tracking => FALSE,
comment => 'My Queue);
END;
My question is how best to remove the old messages ? I'm quite happy to start afresh with zero messages in the queue tables. From the research I've done I've come up with these possibilities:
1. Allter the queues to have a sensible retention time e.g.
DBMS_AQADM.ALTER_QUEUE(
Queue_name => 'ABC.MY_Q',
Retention_time => 60 * 60 * 24 * 7);
Question - will this automatically cause all older messages to be removed ? If yes, is it a slow operation for hundreds of millions of messages and does it require lots of undo tablespace ? If no, then what other steps are required to purge the data older than the new retention time ?
2. Stop, drop, recreate and start the queues.
Question - will this also be a slow operation for hundreds of millions of messages and does it require lots of undo tablespace ?
3. Truncate the queue tables.
Question - is this safe ? Will behind the scenes objects get screwed up ? Perhaps after truncating the tables I should drop and recreate the queues and queue tables ?
Thanks in advance for your help,
Colm
Edited by: 802408 on 14-Oct-2010 08:52

As i see it your only option is to drop and recreate, I'm assuming you don't want any of the messages that are held? If not then stop, drop and recreate with a sensible retention time.
If you allow oracle to remove the messages you will still be left with a huge queue table as it will not reclaim the space.
The drop operation should be quick and will not cause undo problems - assuming you don't want to try and keep any of the messages to put back on to the recreated queue.
Do not manually truncate the queue tables - this is not supported and not recommended, if you are happy to do this then the best approach is to drop and recreate.
Thanks
Paul
Edited by: PaulTill2508 on Oct 16, 2010 12:05 PM

Similar Messages

  • How to create a QUEUE in Oracle XE

    Hi everybody,
    Can some1 tell what r d steps i need to follow in order to create a queue in Oracle XE database
    Thanks

    I have copied your code here and commented it inline.
    1.Logged in as sysdba
    create user aquser identified by password;
    GRANT CONNECT, RESOURCE to aquser;
    -- Never grant connect or resource. These are demo roles and the definition changes in different versions.
    -- The connect role should be replaced with GRANT CREATE SESSION.
    GRANT EXECUTE ON SYS.DBMS_AQ to aquser;
    GRANT EXECUTE ON SYS.DBMS_AQADM to aquser;
    GRANT EXECUTE ON SYS.DBMS_AQIN to aquser;
    commit;
    -- commit is unnecessary and with DCL does nothing as DCL contains two implicit commits.
    I have also given him dba privileges
    -- why? this is a breach of essentially all reasonable security protocols. Revoke this and provide only the minimum
    -- explicit system privileges required to perform the user function. The required privs are described in detail in the
    -- Oracle docs and also on my website in the demo I provided to you previously.
    -- http://www.morganslibrary.org/reference/aq_demo1.html
    2. Then i created the type(logged in as aquser)
    create or replace type customer_type as object
    name varchar2(100),
    location varchar2(50),
    contract CLOB
    The type is created.
    3.Then i tried to create the queue
    begin
    dbms_aqadm.create_queue_table('customer_in_table', 'aquser.customer_type');
    -- your table name will be CUSTOMER_IN_TABLE
    -- your payload type is CUSTOMER_TYPE
    -- and you did not provide any values for the remaining 11 parameters.
    dbms_aqadm.create_queue('customer_in_queue', 'customer_in_table');
    -- your queue name is CUSTOMER_IN_QUEUE
    -- your table_name is the same as created previously
    -- and you did not provide any values for the remaining 7 parameters.
    dbms_aqadm.start_queue('customer_in_queue');
    end;From this I see no possibility that you received the exception you posted so something you did does not correspond with what you posted.
    Here is the error message you posted:
    cannot create QUEUE_TABLE, user ANONYMOUS does not have execute privileges on QUEUE_PAYLOAD_TYPE ANDY.STREET_INFOThe user AQUSER is not the user ANONYMOUS.

  • Oracle Streaming Queues in Oracle 10G standard Edition

    I would like to configure and implement Oracle Streaming Queues in Oracle 10G standard Edition. If it is possible then please guide me and give me some clues and if not then please advise me some alternate method.

    Here is the guidance you requested.
    License information:
    http://download.oracle.com/docs/cd/B19306_01/license.102/b14199/toc.htm
    Technical information:
    http://tahiti.oracle.com/
    Since I don't even know what version you have ... this is as far as I can take you.

  • I want store JMS queue in oracle database..

    Hi all,
    I want store JMS queue in oracle database..
    How can i configure my jboss 3.0.1
    Thanks,
    Thilsen

    Oracle provides this functionality with Advanced Queues
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96587/qintro.htm
    Although the API is JMS-compliant, the administration can be quite burdensome.

  • Advanced Queuing in Oracle Forms

    Hello! I'm trying to use the Advanced Queuing in Oracle Forms. I do it, that's for this manual:
    http://st-curriculum.oracle.com/obe/forms/11g/formschataq/formschataq.htm
    All objects created in the database successfully! However, in the section "Building the Forms Application to Interact with AQ", My form does not catch the event. Trigger WHEN-EVENT-RAISED in "Event" not called. The same thing happens when testing forms for chat.
    Who have successfully used the "Advanced Queuing", tell me please, this example is correct? If no, can give a correct example? If yes, Maybe I did not set any settings?
    I use Forms 1.1.2
    Thank you!

    Michael Ferrante (Oracle) wrote:
    Enable at least level 2 tracing in the console. You should see an exchange occur every 2 seconds (2000ms). If you do not see this then your MAX_WAIT is not being read. To enable trace level 2, open the console and left click in the text area of it. Then press the number 2 on the keyboard just above the letters Q and W. Do not use the number pad, as this will not work.If enable Level 2 in JavaConsole, nothing is written there. However, when the level 3, then every 2 seconds is displayed in the console this line:
    network: Connecting http://localhost:7001/forms/lservlet;jsessionid=LvhyQ0QNg5KkJ17vnch3pQSMT6Z00B16yVr7m64npFKTKp1pBBjv!656070063 with proxy=DIRECTI changed the file formsfeb.cfg, set MaxEventWait = 5000. All restart, And a similar message is displayed every 5 seconds in the console.
    network: Connecting http://localhost:7001/forms/lservlet;jsessionid=r31zQ0TLpHxK3kjBqMBk0tvYf9hn6wn6sGpKRppTvSX1f70pv0GS!571608984 with proxy=DIRECT
    network: Connecting http://localhost:7001/ with proxy=DIRECT

  • Recommended Third Party Archive and Purging Software for Oracle Database (Oracle CC&B)

    Hi,
    We are currently exploring third party archive and purging software for Oracle Database specifically used by an Oracle Customer Care and Billing implementation. Our current data is growing that we think archiving and purging is a now a viable option. Thanks.
    Regards,
    Dennis

    According to the fine Oracle® Utilities Application Framework Administration Guide Chapter 17, "Archiving and Purging" is readily available to CC&B.

  • Purging Policies in Oracle 10g

    Hi All,
    I m going to implement purging policies and variuos purging methods on tables in database. kindly suggest me what are the variuos methods we use to purge the data in table. pl also advise me what are the variuos purging policies which can be implement on the tables...
    waiting reply from ur end...
    Regards,
    Sanjeev

    Hi,
    I want 2 apply the purging on the tables with some frequency of time like monthly,half yearly and so on.
    Now is there any specific policy on applying them or how can we handle this activity.please suggest me like creating backup table and then truncate the data or creating one proc and call that proc in a oracle job...
    What is the best way to perform this activity,i can't understand how to start this activity..
    Thanks & Regards,
    Sanjeev

  • Queue using OracleAS JMS

    hi , we have developed an application where we have a queue in websphere MQ and the application server used is oracle 10g . Now instead of using the websphereMQ or any other third party software , can we create a a queue and queue manager(MQ terminology ) in the oracle application server. We have created the queue destination and the connection factory in the oarcle , but how actully we have to create a queue and queue manger or is it not necessary to make one or is there any other way around, and we are trying for OEMS JMS In-Memory and File-Based Persistence , and hopefully the xml files are in right place i was refering to http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref141
    for the development

    That's the right doc, you should create your destination and connection factory in jms.xml which is in j2ee/home/config directory.
    Here contains howto for using OracleAS JMS in 10.1.3:
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html#JMS
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-connect-to-oemsjmsmf/doc/how-to-connect-to-oemsjmsmf.html
    -Frances

  • 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

  • Purge queue

    is there a way to purge a queue or topic of all messages from the command line? In other words, is there a way to delete all the existing messages already in an existing queue or topic?

    From the command line, I am sure there is a command within the runmqsc command. But I am not sure what it is..
    Through a program you could just do destructive reads with a receiver that does a "GetWait" on the queue.
    //Start session and etc....
              QueueReceiver queueReciever = session.createReceiver(Queue object);
              boolean messagefound = true;
         //Start connection
              connection.start();
              while (messagefound) {
    Message m = queueReciever.receive(1000);
    if (m != null) {
    messagesCleared++;
    }else {
    messagefound = false;
    //Close session and connection once all messages have been read off.
         session.close();
         connection.close();

  • Queries on Advanced Queuing in Oracle Database

    Hi All,
    We are new to Advanced Queuing.
    We have a requirement wherein we need to implement Oracle AQ.
    However upon some R&D, we got the basic idea of AQ.
    But we would like to know on a broad level,
    i.     The Purpose of enabling/Using AQ
    ii.     Basic understanding on the different components of AQ like Creating Payload, Enqueue, Dequeue messages
    iii.     Some high level understanding of the API’s – Which to use when and the purpose
    iv.     Challenges faced
    v.     Possible issues and Resolutions.
    If anyone can help us with the above questions, it would be of great help.
    Regards,
    Shruti

    Michael Ferrante (Oracle) wrote:
    Enable at least level 2 tracing in the console. You should see an exchange occur every 2 seconds (2000ms). If you do not see this then your MAX_WAIT is not being read. To enable trace level 2, open the console and left click in the text area of it. Then press the number 2 on the keyboard just above the letters Q and W. Do not use the number pad, as this will not work.If enable Level 2 in JavaConsole, nothing is written there. However, when the level 3, then every 2 seconds is displayed in the console this line:
    network: Connecting http://localhost:7001/forms/lservlet;jsessionid=LvhyQ0QNg5KkJ17vnch3pQSMT6Z00B16yVr7m64npFKTKp1pBBjv!656070063 with proxy=DIRECTI changed the file formsfeb.cfg, set MaxEventWait = 5000. All restart, And a similar message is displayed every 5 seconds in the console.
    network: Connecting http://localhost:7001/forms/lservlet;jsessionid=r31zQ0TLpHxK3kjBqMBk0tvYf9hn6wn6sGpKRppTvSX1f70pv0GS!571608984 with proxy=DIRECT
    network: Connecting http://localhost:7001/ with proxy=DIRECT

  • Purge Cache with Oracle BI Event tables don#t work

    Hi,
    i want to purge the bi server cache an oracle bi event table.
    i created an table like:
    create table BISE_UPDATE_EVENTS
    UPDATE_TYPE INTEGER default 1 not null,
    UPDATE_TIME DATE default SYSDATE not null,
    DB_NAME VARCHAR2(40 BYTE),
    CATALOG_NAME VARCHAR2(40 BYTE),
    SCHEMA_NAME VARCHAR2(40 BYTE),
    TABLE_NAME VARCHAR2(40 BYTE) not null,
    OTHER VARCHAR2(80 BYTE)
    and defied it in the Administration tool as an event table
    i insert data into it:
    INSERT INTO BISE_update_events
    (db_name, catalog_name, schema_name, table_name
    VALUES (NULL, NULL, 'PSLID_DT', 'DI_LI_MANDANT'
    COMMIT
    But purging the cache don't work.
    I got error messages in NQServer.log:
    2010-02-19 11:49:56
    [55004] The prepare operation failed while polling from table BISE_UPDATE_EVENTS.
    2010-02-19 11:49:56
    [nQSError: 22006] Repository metadata: missing column object: ID=5111903:5046337.
    2010-02-19 11:49:56
    [55005] The cache polling delete statement failed for table BISE_UPDATE_EVENTS.
    Got somebody help?
    Regards Christian

    From the Manual :-
    SchemaName
    The name of the schema where the physical table that was updated resides.
    Populate the SchemaName column only if the event table does not reside in the same database as the physical tables being updated. Otherwise, set it to the null value.
    TableName
    The name of the physical table that was updated. The name has to match the name defined for the table in the Physical layer of the Administration Tool.
    Values cannot be null.
    Can you check once to see if you really need to put the schemaname and also if the tablename defined in the RPD is the same as put in the insert statement. Finally, the user used in the connection pool should have delete rights on your polling table.
    hope this helps

  • Advanced Queuing for Oracle / Dequeue failed

    Hi *,
    I'm using Oracle Advanced Queuing and OC4J with some MDBs. Unfortunately sometimes I have following exception:
    03-05-21 10:29 Error listening to 'USER_QUEUE'
    oracle.jms.AQjmsException: JMS-120: Dequeue failed
         at oracle.jms.AQjmsError.throwEx(AQjmsError.java:283)
         at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2034)
         at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:981)
         at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:918)
         at oracle.jms.AQjmsConsumer.receive(AQjmsConsumer.java:834)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:905)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
         at java.lang.Thread.run(Thread.java:479)
    All messages hang in my queue with READY state. I really don't know what is happening.
    I have observed that when I run my MDB, but on the different machine, one message is consumed and the same exception arises.
    Why Oracle cannot run dequeue process correctly?
    best regards
    Maciek

    We had similar problems. Mostly the cause was incorrect message type (other than AQ$_JMS..., i. e. ancestor of "message" class) or incorrectly filled body of a message. For example, there seems to be a bug in AQ$_JMS_TEXT_MESSAGE object: you have to set at least one of varchar2 or CLOB in body of message. Otherwise, dequeue will fail, JMS assumes there is some text inside.
    We are using 8i and 9i databases and messages are created using plain constructors (not methods from 9i, since code has to run on either version). I cannot recall any troubles using methods from 9i during researching, but there might be a bug somewhere.
    Myrra

  • Code to Retrieve the message from Queue in Oracle BPEL

    Actually I am placing the Message into JMS Queue using JMS Adapter.After Placing the message,I need to retrieve the placed message from same queue.
    Right now I am using the Receive Activity and the JMS Adapter to retrieve the message from Queue.But my receive activity is always in the waiting state itself and I am not able to retrieve the message from queue.What might be the issue????
    Can anybody give me a better suggestion so that I can go ahead??
    Thanks in advance for your help.

    Hi Raja,
    Is the process a empty bpel process which is used to get the message from the MQ?
    Regards
    Surya

  • Purging instances in Oracle ESB 10.1.3.5

    Hi ,
    I want to purge old instances from production server as the instances are appearing late due to huge records.
    There are 2 ways to do this i.e through ESB console and other is through the Purge_by_date script.
    Please suggest which approch is better one and do we need to restart the SOA server after purging ?
    Thanks,
    Lalit

    Hi ,
    I want to purge old instances from production server as the instances are appearing late due to huge records.
    There are 2 ways to do this i.e through ESB console and other is through the Purge_by_date script.
    Please suggest which approch is better one and do we need to restart the SOA server after purging ?
    Thanks,
    Lalit

Maybe you are looking for

  • Adobe Acrobat 8 Plug-in GUI issues in Mac OS 10.4.11 using XCode 2.5

    I am trying to port my plug-in to Acrobat 8. I have been maintaining this plug-in from Acrobat 5 on both PC and Mac. I am now having some trouble with the UI components of the Plug-in on the Mac. I can load and debug my plug-in on Acrobat 8, however

  • Lock and Unlock Consolidation

    Hi guys, I'd like to know how I can lock a consolidation process. I've working with an application which has 2000 as starting year. Since we have modified some rules for 2011, I do not want anyone to run a consolidation with the current rules, since

  • Mini 110 software

    have hp mini 110 1100  p/nvf704av        hard drive died  cannot find this p/n in hp list to try to get software This question was solved. View Solution.

  • X121e: Driver for the fingerprint reader

    Hello, I purchased a X121e notebook at Lenovo directly; it's of type 3045-CTO and has a fingerprint reader. I installed Windws 7 x64 from scratch and loaded all drivers, but I can't find the driver for the fingerprint reader on the driver download we

  • Web Services Test ORA-28150: proxy not authorized to connect as client

    Oracle 11g R2 APEX 4.2 with the latest listener. Trying to click on the test button on the Oracle.example.hr sample under the SQL WORKSHOP Restful Services and receive the following error: Internal Service Error 500 Error during evaluation of resourc