最近项目日志中发现了这样的错误:
Caused by: java.sql.SQLException: ORA-01555: snapshot too old: rollback segment number 1 with name "_SYSSMU1$" too small
版本是oracle 10g,采用的是自动管理模式
我把undo_retention由原来的900改成了1800,还是不行
NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
undo_management                      string                 AUTO
undo_retention                       integer                1800
undo_tablespace                      string                 UNDOTBS1
望各位大虾帮忙!

解决方案 »

  1.   

    1  检查应用程序,优化SQL。2  增大UNDO表空间。
      

  2.   

    所需要回滚的记录在undo表空间中已经找不到了。被新的记录覆盖了。
      

  3.   

    UNDO表空间使用率还不到30%,不是UNDO表空间大小问题吧?
      

  4.   

    增大undo_retention integer 10800(单位是S)保存3个小时的undo信息,这个的对应的undo表空间也要增加的~~
      

  5.   

    查看数据库日志, 找出导致ORA-01555错误的具体原因。
    贴出来再具体分析。
      

  6.   

    sqlplus里SQL>show parameter background_dump_dest
    然后去服务器主机上,到上面结果中的目录下找alert_SID.log这里的SID,即你的实例名。查看日志内容,找到与ORA-01555相关的内容。
      

  7.   

    多谢,alert_SID.log的与ORA-01555相关的部分内容如下:
    ORA-01555 caused by SQL statement below (SQL ID: 5fh8svvrp7kqz, Query Duration=0 sec, SCN: 0x0000.0022b4e1):
    Thu Mar  4 17:39:04 2010
    select dbemployee0_.ID as ID20_0_, dbemployee0_.NUM as NUM20_0_, dbemployee0_.NAME as NAME20_0_, dbemployee0_.GENDER as GENDER20_0_, dbemployee0_.TEL1 as TEL5_20_0_, dbemployee0_.TEL2 as TEL6_20_0_, dbemployee0_.TEL3 as TEL7_20_0_, dbemployee0_.TEL4 as TEL8_20_0_, dbemployee0_.EMAIL1 as EMAIL9_20_0_, dbemployee0_.EMAIL2 as EMAIL10_20_0_, dbemployee0_.EMAIL3 as EMAIL11_20_0_, dbemployee0_.EMAIL4 as EMAIL12_20_0_, dbemployee0_.DESCRIBE as DESCRIBE20_0_, dbemployee0_.AVAIABLE as AVAIABLE20_0_, dbemployee0_.DEPARTMENTID as DEPARTM15_20_0_ from EMPLOYEE dbemployee0_ where dbemployee0_.ID=:1
    ORA-01555 caused by SQL statement below (SQL ID: az33m61ym46y4, Query Duration=0 sec, SCN: 0x0000.0022b4e1):
    Thu Mar  4 17:39:04 2010
    SELECT NULL AS table_cat,
           o.owner AS table_schem,
           o.object_name AS table_name,
           o.object_type AS table_type,
           NULL AS res
      FROM all_objects o
      WHERE o.owner LIKE :1 ESCAPE '/'
        AND o.object_name LIKE :2 ESCAPE '/'
        AND o.object_type IN ('xxx', 'TABLE')
      ORDER BY table_type, table_schem, table_name
      

  8.   

    http://blog.csdn.net/dancle/archive/2006/03/31/645166.aspx哈哈Oracle的经典问题
      

  9.   

    ORA-1555: Snapshot too oldThe usual cause of this error is that long-running transactions/queries are occurring within the database at the same time as short online transactions. When the short transactions complete, the rollback segments they have used is up for grabs and can be overwritten. As soon as that area is overwritten, the long-running queries/transactions can no longer maintain a read consistent picture of the data, and they fail with an ORA-1555. It's a scheduling problem. Run batch and long-running jobs at off-hours.Example Scenario:1.      A long running Query (T1) is started.2.      A quick update (T2) is performed and committed on a table that T1 won't require for another 20 minutes. When T2 is committed it's rollback segment blocks and extents are kept but ed as inactive.3.      Another DML statement is issued (T3). Oracle assigns a rollback segment to T3 using a round robin algorithm. The assigned segment includes the same storage as the one previously used by T2. Thus it overwrites the inactive before-image of T2.4.      T1 now comes to the point in the query where it needs the before-image of the data that was changed by T2.5.      But T1 must read the before-image of the changed data records (for read consistency).6.      T1 attempts to read the before-image left from T2 -- only to find that it has been overwritten by T3.7.      T1 can no longer access the before-image of T2. T1 abends at this point.8.      ORACLE then issues: ORA-1555: snapshot too old (rollback segment too small). 
      

  10.   

    ORA-1555错误还未解决,等待中……
      

  11.   

    上次oracle的人过来,局方问他们有没有解决方法,他们也拿不出方案来。
      

  12.   

    看起来是oracle的机制缺陷咯!
      

  13.   

    顶一下
       oracle QQ群:54775466
               期待您的一起探讨
                          欢迎爱好者入群学习