Snapshot too old in a very big undo tablespace

Hi,
I can see the snapshot too old error message in my alert log file.
ORA-01555 caused by SQL statement below (Query Duration=5 sec, SCN: 0x000d.a1e610e5):
It shows that query failed just after its start within 5 seconds. I really dont understand this in the presence of following facts
Current size of my undo tablespace is around 15G and undo retention is 180 minutes and for my environment, oracle recommends to use around 8 G size for undo tablespace if i want to use undo retention to be set for 180 minutes.
I am using oracle 9.2.0.6 and automatic undo management.
Thanks
Salman

Could it be that the ora-1555 is thrown by the statement in the alert log, but is really caused by another statement that has been sitting around since yesterday? Oracle may be trying to make read-consistent some data that the other statement used to have in undo.
I see this all the time if I don't kill off leftover sessions in the middle of the night. Darn users.
Search asktom.oracle.com for the error, many good explanations there and in his books. There are some application coding conditions that can cause this, too.
Also, try doing a full scan of the table - select some arbitrary column without a where statement. This may correct a "delayed block cleanout" condition. Google that for more info if you don't know about it.

Similar Messages

  • Snapshot too old when deleting from a "big" table

    Hello.
    I think this is a basic thing (release 8.1.7.4). I must say I don't know how rollback segments really work.
    A table, where new records are continuously inserted and the old ones can be updated in short transactions, should be purged every day by deleting old records.
    This purge has never been done and as a result it has now almost 4 million records, and when I launch the stored procedure that deletes the old records I get the "snapshot too old" error because of the read consistency.
    If I launch the procedure after stopping the application that inserts and updates in the table, then I don't get the error. I guess the problem is that meanwhile the procedure is being executed other transactions also need to use rollback segments so that the rollback segment space that the snapshot needs isn't enough. Do you think this is the problem?
    If this is the case then I suppose that the only solution is increasing the size of the only datafile of the only tablespace for my 4 rollback segments. Am I wrong?
    (Three more questions:
    - Could the problem be solved by locking some rollback segments for the snapshot? How could I do that?
    - What is a discrete transaction?
    I'm a developer, not a dba, but don't tell me to ask my dba because it isn't that easy. Thanks in advance.

    "snapshot too old indicates the undo tablespace does not have enough free space for a long running query" what does this mean? why do I get the same error in two different databases, in the first the size of the datafile of the undo tablespace is 2GB whilst in the second it is only 2MB? How can I know how big the datafile has to be?
    One possible solution could be not deleting the whole table at once but only a few records? Would this work? Why when I try "select count(*) from my_table where rownum = 1" I also get "snapshot too old" when other transactions are running.

  • UNdo error (ora-01555) - Snapshot too old error

    Hi,
    If undo get filled and if we get a snapshot too old error then what is the solution for this error, plz give step by step solution for this.

    You prevent ORA-01555 errors by
    1) Setting UNDO_RETENTION equal to or greater than the length of the longest running query/ serializable transaction in the system
    2) Ensuring the UNDO tablespace is large enough to accomodate the amount of UNDO generated over that period of time.
    You would need to determine things like the length of your longest running query, the amount of UNDO getting generated, etc. and adjust your UNDO_RETENTION and UNDO tablespace accordingly.
    Justin

  • Error message: snapshot too old: rollback segment number( very urgent)

    Hi everybody,
    I have a question regarding an oracle error message <b>snapshot too old: rollback segment number</b>.
    I get this message when I run a SQL script in Oracle server. To be clear, I wrote the SQL script to extract the data from SAP R3 via Oracle server.
    Could somebody please help me with this issue? It's very urgent.
    The SQL statement which I use at this moment is:
    set undo_management auto
    set undo_retention
    Please help me with this issue.
    Thanks in advance.
    Regards,
    Esrat

    it´s very uncommon to have an Oracle version higher than the client versions of the tools.
    I suggest:
    - Check the note mentioned now several times
    - upgrade to a supported newer Oracle release
    Markus

  • About snapshot too old and undo tablespace

    Hello,
    version: 11.1.0.7
    environment:
    Database A contain some views from several tables located into database B.
    When I query the views that join several tables located in a remote database B using a dblink the query intermittently notice me, the following errors:
    ORA-12801: error signaled in parallel query server
    ORA-01555: snapshot too old: rollback segment number too small
    Some times after the I re-execute the query it run without any problems but it is bad because the Developers can not accurately test their app.
    The undo tablespace have the following configuration:
    guaranteed retention
    unlimited
    undo_retention is about 7200.
    Also the undo tablespace are just using a 4% of total so I think the system should has honor to the old images from my distributed query.
    Thank you in advance for your suggestion.

    user12100209 wrote:
    Hello,
    version: 11.1.0.7
    environment:
    Database A contain some views from several tables located into database B.
    When I query the views that join several tables located in a remote database B using a dblink the query intermittently notice me, the following errors:
    ORA-12801: error signaled in parallel query server
    ORA-01555: snapshot too old: rollback segment number too small
    Some times after the I re-execute the query it run without any problems but it is bad because the Developers can not accurately test their app.
    The undo tablespace have the following configuration:
    guaranteed retention
    unlimited
    undo_retention is about 7200.
    Also the undo tablespace are just using a 4% of total so I think the system should has honor to the old images from my distributed query.
    Thank you in advance for your suggestion.session reporting ORA-01555 is victim.
    some session is doing DML against same table as victim session & doing COMMIT (likely inside LOOP)

  • Snapshot too old

    I have written a procedure that populates a temp table which does a commit on every thousand rows. Now, this job has been running for 3 yrs now. Unfortunately though, lately, i have been getting the following error:
    Declare
    ERROR at line 1:
    ORA-01555: snapshot too old: rollback segment number  with name "" too small
    ORA-06512: at line 189This program have been tuned through out those years, like doing a commit on every n thousand of rows, putting hints and some other things as suggested by our dba. It is also understood that new jobs.. big jobs.. have been created that runs a long side this process.
    Now, my questions is, if i am doing a select on this table for example member_history table in a cursor then doing an insert. Then another job which is running at the same time as my job is doing a
    INSERT /*+ append */ INTO temp_table (column1, column2, column3)
    select column1, column2, column3
    from member_history@dbprod.
    where ... Would this have caused the problem? We are talking about number of rows 64,033,608 on this history table.
    I would very much appreciate all your help!
    Thanks,
    Marilyn

    Well, the primary reason for this error in my experience is fetching across commits. Which sounds exactly what your code is doing.
    Thus for 3 years the code has been wrong. Violating ANSI SQL standards that say you are not allowed to fetch across commits. You were simply lucky that the rollbacks/undo did not wrap as there were little or no other transactions running at the same time.
    Do not commit every n number of rows. Oracle is not SQL-Server or Ingres. It works very different ito concurrency as it has no lock manager and there are no locking overheads.
    Refer to Metalink Note ORA-01555 "Snapshot too old" - Detailed Explanation, note id 40689.1.
    Also refer to asktom.oracle.com on this:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:9219002089752914987::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:275215756923

  • Export with consistent=y raise snapshot too old error.

    Hi,
    Oracle version:9204
    It raises
    EXP-00056: ORACLE error 1555 encountered
    ORA-01555: snapshot too old: rollback segment number 2 with name
    "_SYSSMU2$" too small
    when I do an export with consistent=y option.
    And I find below information in alert_orcl.log
    Wed Apr 20 07:50:01 2005
    SELECT /*NESTED_TABLE_GET_REFS*/ "XXX"."TABLENAME".* FROM
    "XXX"."TABLENAME"
    ORA-01555 caused by SQL statement below (Query Duration=1140060307
    sec, SCN: 0x0000.00442609):
    The undo parameters:
    undo_retention=10800(default value)
    undo_retention is larger than the seconds run export(only 1800
    seconds),so I think the default value is enough.
    undo_management=auto(default value)
    Maybe the rollback tablespace is too small(about 300M)? But I think oracle should increase the size of datafile in this mode.Is that right?
    undo_tablespace=undotbs1
    undo_suppress_errors=false
    I think I must miss something.
    Any suggestions will be very appreciated.
    Thanks.
    wy

    UNDO_RETENTION is a request, not a mandate. If your UNDO tablespace is too small, Oracle may have to discard UNDO segments before UNDO_RETENTION is reached.
    How much UNDO is your database generating every second?
    SELECT stat.undoblks * param.value / 1024 / 1024 / 10 / 60 undo_mb_per_sec
      FROM v$undostat  stat,
           v$parameter param
    WHERE param.name = 'db_block_size'Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Receiving error ORA-01555: snapshot too old:

    Need some info...
    Currently seeing ORA-01555: snapshot too old: rollback segment number 18 with name "_SYSSMU18$" too small.
    Info:
    SQL> show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 4200
    undo_suppress_errors boolean FALSE
    undo_tablespace string UNDOTBS_1
    SQL> select max(maxquerylen) from v$undostat;
    MAX(MAXQUERYLEN)
    35792
    SQL>
    run this based on threads in here:
    SQL> select (35792/60)/60 query,(4200/60)/60 retention from dual;
    QUERY RETENTION
    9.94222222 1.16666667
    I need some help figuring out what to set my undo_retention to? Should it be 36000?
    Any help is appreciated.
    Thanks

    Jamie CC wrote:
    The query that was in the alert log was running against a table with 779 rows. The query uses the index (not worried if it wouldn't for that small a table) and came back in one second... This makes no sense. Is it possible that there was a sub-query running and the wrong query was put into the alert log?More likely the query in the alert log was one that died, but the cause was a different query. Remember, the meaning of an ORA-1555 is that the query needed to go back to undo in order to gather a view of the data to a certain SCN, and the data had already been aged out. So the alert log gets the one that died, but the cause is another one. Feel lucky at that, in older versions it was considered an app error IIRC.
    Search for the error on asktom.oracle.com for a number of scenarios, and you might want to review the part of the concepts manual about read consistency to make sense of it all. You might also find Tom's book explanation about it with a google search.
    Also, depending on your version, there may be things to set like retention guarantee.
    I've found on the ERP/MRP systems I work on these errors will appear weekly from people leaving sessions connected after they go home, so I kill 'em off at night. And that's with an undo nearly as big as the db data, that's normally almost empty.

  • Snapshot too Old Error - Help needed

    One of the batch job is failing due to oracle error “snapshot too old.”
    Please let me know what are the possible reason’s this problem occurs and suggest me the possible solutions to rectify this problem.
    Thanks in advance

    > this can mean different things:
    1. your rollback / undo is too small for this
    transaction,
    Incorrect. A snapshot too old means that a consistent read cannot be maintained. A read is not a transaction - it does not cause any locks on rows.
    What is can mean that rollback is too small to maintain a consistent read for a sufficiently long enough period for the consistent read to be completed.
    > 2. commits aren't made often enough,
    NOT TRUE!! Not in Oracle. (sorry for the emphatic bold, but this an OWT within Oracle - it is very far from the truth in Oracle and Oracle is not SQL-Server)
    > 3. there are concurrent transactions which act on the
    same tables.
    This is usually the case - more accurately, fetching across commits. This is caused by creating a consistent read on a table (opening a cursor in PL/SQL), reading the rows (fetching from cursor in PL/SQL) and then updating those exact same rows.
    The consistent read deals with version n of the table. At the same time the exact same process updates those very same rows creating new versions of those rows.
    Rollbacks are overwritten (it is a circular buffer) and the version n of the rows cannot be maintained and "goes out of scope" as the rollbacks containing that version of the rows are re-used.

  • "Snapshot too old" for a report program

    We get "ORA-1555 error:  snapshot too old" for a report job, NOT an update job.
    We can add rollback segments to the DB.
    Why we cannot increase the commit frequency to fix this issue?
    Thanks!

    > 1. create a big rollback segment. search the web for keyword PSAPROLLBIG.
    > 2. convert to PSAPUNDO, as started by others, check SAP note 600141.
    > 3. analyze the program and if it is a Z program, ask your program to add more commits in his program.
    HI all,
    of course Stefan and Eric have already given the right hints here.
    But the main point here is not the configuration of the UNDO management.
    I know that this kind of problems bears a big mental hurdle in it, which is also difficult to jump over for many supporters.
    The notion of Undo/Rollback data beeing used mainly for ROLLBACK actions is unfortunately totally wrong.
    The primary and main usage of this data is to deliver the consistent view (as already explained in this thread).
    So the single big question here is: why does a single statement of your report needs to visit so many pages from a certain point in time?
    In the wast majority of cases this is because the statement is badly tuned.
    Maybe there is no appropriate index available.
    Or it's just written badly, so that unnecessary data must be read by Oracle.
    Maybe the CBO does something wrong which must be checked.
    Maybe the data is scattered over too many blocks and clustering them together somehow could help
    The core point here is: figure out what causes the statement to touch so many pages and fix that.
    Then you are most likely to come over this problem.
    All other recommendations, especially the move to automatic undo management: full ack.
    But the solution to your problem is to fix your statement.
    regards,
    Lars

  • ORA-01555: snapshot too old while creating large index

    Dear All,
    I have a newly created partitioned table of size 300GB.
    On which i am creating a composite unique index having 5 columns(local partitioned).
    The size of the index may be around 250GB(assume from a similar type table).
    My DB version in Oracle 9i release 2.
    Size of my undo tablespace is 12GB.
    Undo related parameters are as below:
    undo_management AUTO
    undo_retention 18000
    undo_suppress_errors FALSE
    At 10:40:36 AM i fired the "create index .... local;" query
    All day long i was monitoring using "select used_ublk,addr from v$transaction" and same below output all the times:
    USED_UBLK ADDR
    1 C000000185ECF458
    [ using v$session(column TADDR) i found that "C000000185ECF458" is the ADDR of my transaction (if i am not wrong) ]
    But at 11:09:27 PM (about 12 hours later) i found: ORA-01555: snapshot too old
    I am sure that at that time my undo tablespace usages was below < 30%
    At that time some insertion & selection was going on but those were not on this table.
    Why this happened ? As far as i know oracle in AUM oracle doesn't overwrite existing undo data as long as there
    is free space available.
    While searching on web i found one post as below:
    like

    Thanks guys for your prompt replys.
    Yes i've monitored v$TEMPSEG_USAGE and DBA_SEGMENTS for the progress of the index creation, but this are not related to my question and yes i could use nologging or parallel (in gact i'm going to try all these options for faster index creation). On my original post i missed below part, please go through it:
    While searching on web i found one post as below:
    metalinknote #396863.1 which describes it
    => 2) When are UNDO segments OFFLINED?
    Answer:
    SMON decides on the # of undo segs to offline and drop based on the max transaction concurrency over a 12 hour period in 9i. This behavior is altered in 10g where the max concurrency is maintained over a 7-day period. Moreover, in 10g SMON doesn't drop the extra undo segs, but simply offlines them. SMON uses the same values with "fast ramp up" to adjust the number of undo segments online.
    Link:[http://kr.forums.oracle.com/forums/thread.jspa?threadID=620489]
    I says "SMON decides on the # of undo segs to offline and drop based on the max transaction concurrency over a 12 hour period in 9i.".
    what does it mean ? Is this the cause for me, as my query war 12 hours old and my undo_retention is set to 5 hours ?
    I'll be very grateful if some one explains the cause.
    BR
    Obaid

  • ORA-01555: snapshot too old / set transaction

    Hello,
    When I execute a query in a script I have the following error: ORA-01555: snapshot too old...
    At the beginning of the script I have SET TRANSACTION use rollback segment XX.
    On the other hand I used SET TRANSACTION READ ONLY and I had no errors.
    It is a fate or it is the solution?
    What is the difference?
    Thanks

    It's probably just fate. SET TRANSACTION READ ONLY guarantees a read consistent view during the whole transaction rather than an individual statement, but it is not a sovereign remedy against ORA-1555.
    SET TRANSACTION USE ROLLBACK SEGMENT XXXX is meaningless in the context of a SELECT only transaction.
    The ORA-1555 is casued by someone else doing DML that the rollback segment holding the undo information that Oracle uses to provide read consistency. The way to prevent it is to manage the rollback segments properly - big, numerous, high minextents, no shrinking - or to use 9i UNDO tablespace instead.
    Cheers, APC

  • ORA-01555: snapshot too old: rollback segment number

    I getting error while i am taking export one of the table.
    EXP-00056: ORACLE error 1555 encountered
    ORA-01555: snapshot too old: rollback segment number with name "" too small
    ORA-22924: snapshot too old
    Export terminated successfully with warnings.
    can someone advise me

    1) What version of Oracle?
    2) Is UNDO_MANAGEMENT set to AUTO? Or are you still using manual undo management?
    3) What is your UNDO_RETENTION? How quickly are you generating UNDO? How big is your UNDO tablespace?
    4) How long does the export run?
    5) Did you specify CONSISTENT=Y in the export? If so, is that necessary?
    6) What else is going on? Is it possible to run the export during a quieter period?
    Justin

  • ORA-01555: snapshot too old: - export- RAC

    We are getting ORA-01555: snapshot too old: rollback segment number , in 3 node RAC while doing export for multiple schemas. undo rentention is set more than a day for all nodes,. undo tablespace has got enough space. Can anyone tell me what i need to look here.

    hi,
    can you please post below details...
    oracle version,os version?
    and what export command your using...
    hope your using consistent =y ..while using this parameter we require big size of undo tablespace size....
    refer metalink note...113450.1
    thanks,
    DBC,
    Sr DBA,
    Oracle certified expert.

  • ORA-01555: snapshot too old: rollback segment number 3 with name "_SYSSMU3$

    A Materalized view is scheduled to update every 12 hours . When it has tried to update it has thrown the error ...
    ORA-12008: error in materialized view refresh path
    ORA-01555: snapshot too old: rollback segment number 3 with name "_SYSSMU3$"
    too small
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 841
    ORA-06512: at line 1

    Hi,
    Can you increase the size of the UNDO Tablespace ?
    For more information, you can find on this link below:
    http://forums.oracle.com/forums/search.jspa?threadID=&q=ORA-01555&objID=c84&dateRange=all&userID=&numResults=15
    Cheers

Maybe you are looking for

  • STAD Report generation takes too Much time

    Dear Experts, In our Production system if we execute the STAD report for10 minutes to get the business transaction data for a single user or multiple users. Its taking too much time upto 500 sec sometimes throwing DUMP due to time out. We have the is

  • How to start BPEL process with publishing initiation form designed in ADF

    Hii All, Can Anyone please tell me how to Start my BPEL process with publishing initiation forms designed in ADF fusion. I am using JDevloper 11g and Oracle SOASuite 11g toolset in windows platform. Thankx in Advance, Deekay.

  • Iphoto book print orders

    Hi, Is it possible to order iPhoto book when shipping address is in belgium, but billing address is elsewhere - in Slovenia??? Thanks!

  • How do you move videos from video app into camera roll?

    I need to use a video in a Keynote presentation. How do I move a video from the Videos app into the Camera Roll so I can access it in Keynote?

  • Installing trial version PSE 8 for Mac

    I have just downloaded the free trial version of PSE 8 for Mac - or I thought I had.  I ended up with the Akamai Client Installer icon, the PSE_8_WWEFDJ disc image and the icon for Adobe PSE 8 (a blue disc) on the desktop.  When I open either of the