ORA-01555: snapshot too old

Hi,
We have audit component, one responsibility of which is to archive audit messages from Oracle database. The component fails on a simple select statement (provided below) that retrieves number of records to be archived based on age parameter:
SELECT COUNT(*) FROM blobobjtable blbt, auditmessagetable msgt WHERE msgt.blobobjtablepk = blbt.blobobjtablepk AND trunc(to_number(substr((SYSTIMESTAMP-msgt.credtimeutc),1,instr(SYSTIMESTAMP-msgt.credtimeutc,' ')))) >= age
We tried the following 3 select statements directly from SQL Plus. The result was that the first two succeeded and the last one failed with "ORA-01555: snapshot too old" exception. We tried these select statements after restart of Oracle database but still got last select statement failed. One thing that we noticed was that the last select statement takes extremely long time to complete. Also, analyzing the index table used during the join failed with the same exception. The same is true when the primary key indices are analyzed.
1) select count(*) from blobobjtable
2) select count(*) from auditmessagetable
3) select count(*) from blobobjtable blbt, auditmessagetable msgt WHERE msgt.blobobjtablepk = blbt.blobobjtablepk
Can somebody explain what might be the cause of ORA-01555 exception for such simple select statement? Does Oracle persists information of UNDO buffers before restart? Is there any way to clean UNDO buffers manually?
If somebody has experience in resolving "ORA-01555: snapshot too old" exception problem please share you experience with us. Any help will be appreciated.
Thanks,
Aleks

how many rows in ur tables.
select count(*) from blobobjtable blbt
SQL> show parameter undo
NAME                                 TYPE        VALUE
undo_management                      string      AUTO
undo_retention                       integer     300
undo_tablespace                      string      UNDOTBS1
SQL> select count(*) from sm;
  COUNT(*)
   1326661
Elapsed: 00:00:03.53
SQL> select count(*) from sm;
  COUNT(*)
   1326661
Elapsed: 00:00:03.45
SQL> select count(*) from sm ss,ac_taj@taj ac
  2  where ss.nserial = ac.nserial;
  COUNT(*)
     88763
Elapsed: 00:00:38.35
SQL> show parameter db_name
NAME                                 TYPE        VALUE
db_name                              string      db02
SQL>i have some configuration of undo tbs. but i am not getting any error. also i am just startup my database if right know i am only one user connected to database.
SQL> select  bytes/1024/1024 "UNTO MB" from dba_data_files
  2  where tablespace_name = 'UNDOTBS1'
  3  /
   UNTO MB
       930

Similar Messages

  • 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

  • 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.

  • The nature of "ORA-01555: snapshot too old..." error

    Hi all,
    Please help me to understand the nature of this error:
    ORA-01555: snapshot too old: rollback segment number 23 with name "_SYSSMU23_755263746$" too small
    One of reports returns this error. Yes, I googled it, but honestly I can't understand deeply what causes it. Usually I resolve it by performing sql request on yesterday's copy of production database. Is it correct to say that this error happens when I try to perform request on tables that are changed in the same moment? What is correct solution to resolve it other than using yesterday's copy of production database?

    marco wrote:
    Antonio,
         The problem is generally small segments of undo, you need to add more space or put guaranty the tablespaces.
    How do I describe it for our DBA (how much extra space do I need and what is the name of tablespace)?
    Before you go to your DBA, you should figure out how much space your largest query/update uses. That is, your biggest transaction, how much space does it need? 10M? 100M? 1G? From there, your DBA can then size your UNDO properly (or at least "more better" ).   Yes he "name of the tablespace" is just called "UNDO").
    As mentioned before, the solution might not even be to increase your UNDO size, but rather to identify the "problem job", and fix it. That's not easy, however, talk to your DBA, he may be able to help with that as well.
    Things to look for:
    1) a job that issues a lot of commits. (suspicious - try to reduce # of commits).
    2) a job that runs for a long time and updates along the way (suspicious - try to reduce run time).
    3) a job that runs for a long time and has no updates (try to reduce run time - in this case, if this job starts running, and then takes a long time, a lot of other jobs may be reasonably doing updates, and this long run query needs to reference a row that was updated - it might lose it in the UNDO, though).
    4) long running queries running at same time as updates on same table. (not always possible, but think about it: a "long running query" is often a "report" of some sort (not always, but often). Try to schedule the reports when less update activity is expected. Or, if the updates are part of the same batch, try to schedule them after each other so they don't overlap. (if the updates are online users, there isn't much you can do except try to decrease runtime of the long running query).
    You DBA can help find candidates for those cases.

  • 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: rollback segment number 8 with name

    Hi,
    Database version is Oracle8i Enterprise Edition Release 8.1.7.4.0
    I am struggling to fix this error, since I have not worked on 8I DATABASE.
    We getting this kind of error very frequently in one of the 8i database.
    ORA-01555: snapshot too old: rollback segment number 8 with name "ROLLBACK08" too small
    How do i fix this permantely.
    I have verified the RBS configured in the db.
    SEGMENT_NAME TABLESPACE_NAME OWNER STATUS
    SYSTEM SYSTEM SYS ONLINE
    ROLLBACK0 SYSTEM SYS OFFLINE
    ROLLBACK02 RBS1 SYS ONLINE
    ROLLBACK03 RBS1 SYS ONLINE
    ROLLBACK04 RBS1 SYS ONLINE
    ROLLBACK05 RBS1 SYS ONLINE
    ROLLBACK06 RBS1 SYS ONLINE
    ROLLBACK07 RBS1 SYS ONLINE
    ROLLBACK08 RBS1 SYS ONLINE
    ROLLBACK09 RBS1 SYS ONLINE
    ROLLBACK10 RBS1 SYS ONLINE
    ROLLBACK01 RBS1 SYS ONLINE
    SQL> SELECT t1.name, t2.extents, t2.rssize, t2.optsize, t2.hwmsize, t2.xacts, t2.status FROM v$rollname t1, v$rollstat t2 WHERE t2.usn = t1.usn ;
    NAME EXTENTS RSSIZE OPTSIZE HWMSIZE XACTS STATUS
    SYSTEM 7 770048 770048 0 ONLINE
    ROLLBACK02 2 41934848 262144000 41934848 0 ONLINE
    ROLLBACK03 3 62906368 262144000 62906368 1 ONLINE
    ROLLBACK04 3 62906368 262144000 62906368 0 ONLINE
    ROLLBACK05 2 41934848 262144000 41934848 0 ONLINE
    ROLLBACK06 3 62906368 262144000 62906368 1 ONLINE
    ROLLBACK07 3 62906368 262144000 62906368 1 ONLINE
    ROLLBACK08 3 62906368 300146688 62906368 0 ONLINE
    ROLLBACK09 3 62906368 262144000 62906368 1 ONLINE
    ROLLBACK10 3 62906368 262144000 62906368 1 ONLINE
    ROLLBACK01 3 62906368 300146688 62906368 0 ONLINE
    NAME0     USER0          RSSIZE Wraps Extents Shrinks     OPTSIZE     COMM0
    ROLLBACK01          62906368     19     3     0 300146688 lookup
    ROLLBACK02          41934848     0     2     0 262144000 lookup
    ROLLBACK03 OPS$RTRADM     62906368     20     3     0 262144000 lookup 50
    ROLLBACK04          62906368     34     3     0 262144000 lookup
    ROLLBACK05 OPS$RTRADM     41934848     28     2     0 262144000 No Command
    ROLLBACK06 OPS$RTRADM     62906368     21     3     0 262144000 lookup 50
    ROLLBACK07 OPS$RTRADM     62906368     25     3     0 262144000 lookup 50
    ROLLBACK08          62906368     32     3     0 300146688 lookup
    ROLLBACK09 OPS$RTRADM     62906368     20     3     0 262144000 Select
    ROLLBACK10 OPS$RTRADM     62906368     24     3     0 262144000 lookup 50
    SYSTEM               770048     0     7     0     lookup
    Can someone help ... who to set the RBS size here... i dont want this error happens here.. what i need to look or check.

    lm**** wrote:
    Hi,
    Database version is Oracle8i Enterprise Edition Release 8.1.7.4.0
    I am struggling to fix this error, since I have not worked on 8I DATABASE.
    We getting this kind of error very frequently in one of the 8i database.
    ORA-01555: snapshot too old: rollback segment number 8 with name "ROLLBACK08" too small
    How do i fix this permantely. upgrade to supported Oracle version since V8.1.7 has not been supported this Century.

  • 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

  • Request got errror as ORA-01555: snapshot too old: rollback segment number

    hi Consultants,
    reqeust gor errores as ORA-01555: snapshot too old: rollback segment number 50 with name "_SYSSMU50$" too small ORA-06512: at line 90
    anyone please advice me on this.
    Thanks,
    Anu.

    Thanks for ur reply
    Is this a standard or custom concurrent program?This is customer program it is working fine if run as individual
    Thanks,
    Anu

  • Oracle error: Ora-01555 : snapshot too old: rollback segment number 1......

    System Error: Unknown Database error (type qqdb_ResourceException) on WMS_WH1: Execute failed for SQL statement ............... error from database is: ORA-01555: snapshot too old: rollback segment number 1 with name "_SYSSMU1$" too small...
    Any ideas ? Please help.
    Thank you.

    You either have
    - an UNDO tablespace that is way too small (rollback segments that are too small); or
    - an application that does way too many COMMITs (common with apps ported from SQL Server)
    From the added info, I would guess that the Java program has a major loop and does processing on each of the values it gets in that loop. At the end of each turn in the loop, it does a commit. Then it tries to look at the next record in the master list. After a while (say around 388 loops ;-) ) it dies.
    The reason is that when it looks for information in the master query, it needs to rebuild that information to the moment that query was initiated. It uses rollback (AKA undo) to rebuild that. But rollback is not guaranteed to exist after a commit (unless forced) and once a commit happens, that area can be reused. When it is reused, the information is no longer there to rebuild the row, and that raises an ORA-01555
    Edited by: Hans Forbrich on Sep 11, 2009 3:44 PM

  • ORA-01555 Snapshot too old, rollback segment  too small after flashback tab

    Hello
    Further to an update on a table in database, I realize that I have done an error and I want to come back in the state of table before this operation.
    For this I use 'Flashback table' as this command :
    flashback table 'table_name' to timestamp to_timestamp('2010-11-08 08:00:00 AM','YYYY-MM-DD HH:MI:SS PM')
    and I get this error :
    ORA-01555 :Snapshot Too Old rollback segment N° x , "_SYSSMU9$", too small
    What I can do to not have this problem ? can I avoid it ?
    Please helps .
    Regards
    Edited by: 794982 on 12 nov. 2010 05:05
    Edited by: 794982 on 12 nov. 2010 05:05
    Edited by: 794982 on 12 nov. 2010 05:06

    To set the undo retention period:
    Do one of the following:
    • Set UNDO_RETENTION in the initialization parameter file.
    UNDO_RETENTION = 1800
    • Change UNDO_RETENTION at any time using the ALTER SYSTEM statement:
    ALTER SYSTEM SET UNDO_RETENTION = 2400;
    The effect of an UNDO_RETENTION parameter change is immediate, but it can only be honored if the current undo tablespace has enough space.
    For more reference.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm

  • ORA-01555 Snapshot too old - opening scheduled report

    This seems to happen to long running scheduled reports - but not consistentlly. This one in particular ran for 14 hours and then ended with an this error - ORA-01555 snapshot too old: rollback segment number 2 with name "_SYSSMU2_1285383686$" too small. What does this mean?

    Pl post details of OS, database and discoverer versions.
    This is a common error - you will need to get your DBA team involved, and it is fixed easily. See these MOS Docs
    ORA-01555: "Snapshot too old" - Overview (Doc ID 10630.1)
    ORA-01555 "Snapshot too old" - Detailed Explanation (Doc ID 40689.1)
    ORA-1555 Using Automatic Undo Management - How to troubleshoot (Doc ID 389554.1)
    HTH
    Srini

  • 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 error while ANALYZE command!!!

    Hi All,
    I have 2-node 10gR2 RAC on RHEL4. The database is working fine. And i am able to import the schema also. But when i try to analyze all the tables in schema..i'm getting the following error...my undo_tablespace is of 1.2GB in both instances of RAC. and unde_retention is set to 900 (default).
    ORA-01555: snapshot too old: rollback segment number with name "" too small
    Please, can anybody tell me what might be the problem?
    Thanks
    Praveen.

    Hi,
    When the analyze of the table is going on, lot of dml activity is also going on to the table. So run the analyze when there is minimal dml activity on the table. Increase undo_tablespace,undo_retention might help your scenarios.
    10g has got guaranteed undo retention, you can also use that.
    Regards,
    Satheesh Babu.S
    http://www.satheeshbabus.blogspot.com

  • ORA-01555: snapshot too old error

    While i was trying to run the following anonymous block to analyze all the tables and indexes in my schema, it ran for approx. 5 hours and ended up with
    ORA-01555: snapshot too old error
    Can anybody explain me why this happened?
    SQL> DECLARE
    2 CURSOR tab_cur
    3 IS
    4 SELECT table_name
    5 FROM user_tables;
    6
    7 CURSOR indx_cur
    8 IS
    9 SELECT index_name
    10 FROM user_indexes;
    11 BEGIN
    12 FOR rec IN tab_cur
    13 LOOP
    14 EXECUTE IMMEDIATE 'ANALYZE TABLE '
    15 || rec.table_name
    16 || ' COMPUTE STATISTICS';
    17 END LOOP;
    18
    19 FOR rec IN indx_cur
    20 LOOP
    21 EXECUTE IMMEDIATE 'ANALYZE INDEX '
    22 || rec.index_name
    23 || ' COMPUTE STATISTICS';
    24 END LOOP;
    25 END;
    26 /
    DECLARE
    ERROR at line 1:
    ORA-01555: snapshot too old: rollback segment number 13 with name "_SYSSMU13$"
    too small
    ORA-06512: at line 12
    Elapsed: 05:01:26.08
    Thanks and Regards
    --DKar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Your cursor loop uses the database catalog.
    The analyze updates the database catalog -- including some of the same tables required by the cursor loop.
    The undo retention was not sufficient to hold all of the undo necessary to maintain read consistency of the catalog.
    Try using something like this, instead.
    -- for 9i
    BEGIN                                 
    DBMS_STATS.GATHER_SCHEMA_STATS (
              ownname               => '<YOUR SCHEMA>',                    
              estimate_percent      => DBMS_STATS.AUTO_SAMPLE_SIZE,          
              block_sample          => TRUE,        
              method_opt            => 'FOR ALL COLUMNS SIZE AUTO',
              degree                => 6,
              granularity           => 'ALL',
              cascade               => TRUE,
              options               => 'GATHER'
    END;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for