UNDO Retention on 10.2.0.2

We are noticing some of these snapshot too old errors 01555 errors and we are not making use of any of the flashback functionality so I believe we are only interested in the undo table keeping the undo data while the transaction itself is active to ensure read consistency.
Previously we had undo_retention set to 10800 (3 hours) and I am thinking I should shrink this so that we only keep data as long as the transaction is active. If I set the undo retention length to a value like 300 (5 minutes) and a transaction takes 20 minutes am I going to get snapshot too old errors?
I am hoping the behavior is to keep the transaction data in the undo segment as long as the transaction is active for a minimum of undo_retention time and it would keep making use of space until it runs out of space that is not being used by some other transaction and not being held because of the 5 minutes retention. Is this how it will behave or after the 5 minutes will other transactions be able to overwrite this undo data causing an error even if there is other free space?
Some of the documentation seemed to say the undo_retention is a minimum recommendation to oracle. So if I don't care about flashback at all would a setting like 1 be reasonable assuming it would keep stuff as long as the transaction lasts +1 second(suggesting 1 since 0 means use the default of 900 aka 15 minutes)? I saw some other documentation suggesting setting it to the value of your longest transaction but I surely don't want to keep data from shorter transactions as long as my longest transaction as that would require a much larger undo tablespace so I am trying to figure out the most efficient setting to ensure consistency while being as space efficient as possible.
Thanks,
Jared

Thank you for all the replys on this thread those plus some stuff I have read in metalink have been very helpful. Have some follow up related questions.
From what I have read when a block is modified it goes into the undo in one of the segments and has an associated SCN number for each change.
1. If one DB connection does a series of updates to a given block and then disconnects (assume each update autocommits) and then the process is restarted and does more updates to the same block would it re-use the existing undo segment? (assuming that no select statements reference this block and cause it to be flushed) Does a new transaction on a given block imply a segment switch is a new select intersecting with a datablock the only thing that would cause it to change segments?
2. In the same scenario as above with a select happening between the two passes I am assuming that the select would cause it to flush the block (update the actual data) and that the second pass of updates on the same block would do the updates in a different undo segment? Does having a higher retention setting make it more likely to keep rotating segments as opposed to overwriting a previous one? In other words if I have my retention set to some very high amount of time like 10 days would it rotate all of the segments for that block before overwriting the first change?
My application currently has one process that does large queries that could last 5 hours or so at worst(all read only). And another process that does only new inserts.
Trying to figure out the exact behavior of how the undo retention manages switching undo segments to determine what is causing our problems. I have noticed on 10g2 that the number of undo segments is 10 and on 9.2.0.5 it was more like 108 or so and it seems like 10 is more likely to get 1555 errors and I am wondering if this is because it is more likely to cycle all segments and start overwriting blocks that are needed for a long running queries consistency.
Thanks,
Jared

Similar Messages

  • Undo retention is set as too less makes flaskback query fails, why?

    Hi All,
    I got a email that some important records has benn deleted. I tried to use flaskback query to see those deleted records.
    I did not found image of table 2 hours older.
    query I am using is
    select * from bd_owner.sales as of timestamp systimestamp - interval '120' minute;Now my question is that why I am not able to see back in time 2 hours before.
    my flaskback setting is
    db_flashback_retention_target        integer     1440       (24 hours)
    db_flash_cache_file                  string
    db_flash_cache_size                  big integer 0so does this really mean that i can look back old image of data for last 24 hours.
    This db is not very active. Undo tablespace is of 2GB size . It was mostly 90% free
    Please correct me here..
    error i am getting is ora-1555 snapshot too old
    ORA-01555: snapshot too old: rollback segment number 26 with name "_SYSSMU26$" too small
    Is it due to undo setting not proper
    undo_management string AUTO
    undo_retention integer 900
    undo_tablespace string UNDOTBS1
    undo tablespace RETENTION is NOGUARANTEEquestion
    1) shall i set undo retention to GUARANTEE.
    Is any perfomance impact of this on database?
    2) shall increase the undo_retention (15 minutes) equal to DB_FLASHBACK_RETENTION_TARGET ie 1440 (24 hour)
    db details
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for HPUX: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionThanks In Advance
    for answering these questions

    Hi,
    I think you are hitting the bug
    Bug 9212103 Flashback version query omits deleted rows
    Versions confirmed as being affected
    11.2.0.1
    11.1.0.7
    Issue fixed in
    This issue is fixed in
    12.1 (Future Release)
    11.2.0.2 (Server Patch Set)
    Kind Regards,
    Rakesh jayappa

  • Doubt on undo retention

    Hi Friends,
    Just clarification on undo (11g)
    I set undo retention to 15 mins.
    user A performs transaction without commit and the old data is in undo for read consistency.
    when user B performs select query on user A's transaction it gives old data for read consistency from undo.
    The time has excedded 15 mins (say 20 mins) without commit so the data in undo is ready for overwrite
    user c performs DML statement and it requires space on undo and the user A transaction's old snapshot in undo is overwritten.
    Now user D perform's select query on user A's transaction ( i believe he gets snapshoot too old error as the old data is overwritten) pls confirm?
    Now when user A perform's roll back what will happen since the old data is already overwritten in undo (by user c's transaction) how the roll back is performed (or) will he get snap shot too old error?
    My question:
    if the users's are getting snapshot too old because the data is not available in undo then from where the data is rolled back if the user who initiated the DML(beyond undo retention) performs rollback?
    Regards,
    DB

    Read consistency is achieved for committed data by undo_retention parameter exclusively which is specified in seconds ,it determines how much committed's undo data to keep in undo tablespace.Undo retention period mark two state (expired and unexpired) on committed's undo data.Old (committed) undo information that is older than the current undo retention period is said to be expired.Old undo information with an age that is less than the current undo retention period is said to be unexpired.
    if (Undo committed data age)< undo_retention then
      Undo committed data:='Unexpired'
    else
      Undo committed data:='Expired'
    end if;Whenever there is shortage of undo space then Oracle will first overwrite expired committed's undo data , if the space issue still persist then oracle will start to overwrite unexpired committed's undo data.If yours long running query does not find expired or unexpired committed's undo data then an old snapshot error pop out during the execution of this query.
    To safeguard unexpired committed's undo data is called to govern undo_retention,to guarantee the success of long-running queries you can enable retention guarantee.If retention guarantee is enabled, the specified minimum undo retention is guaranteed; the database never overwrites unexpired undo data no matter others transactions fail due to lack of space in the undo tablespace.
    Do not relate undo retention period to un committed data.Un committed undo will never overwrite during the life span of yours database instance.
    Khurram

  • UNDO Retention Problem

    We have a three node 11.1.0.6 RAC.
    Each node has a different undo tablespace specified...these parms:
    INST_ID     NAME     VALUE     DISPLAY_VALUE
    1     db_flashback_retention_target     1440     1440
    2     db_flashback_retention_target     1440     1440
    3     db_flashback_retention_target     1440     1440
    1     undo_management     AUTO     AUTO
    2     undo_management     AUTO     AUTO
    3     undo_management     AUTO     AUTO
    1     undo_retention     64800     64800
    2     undo_retention     64800     64800
    3     undo_retention     64800     64800
    1     undo_tablespace     UNDOTBS1     UNDOTBS1
    2     undo_tablespace     UNDOTBS2     UNDOTBS2
    3     undo_tablespace     UNDOTBS3     UNDOTBS3
    space in each tablespace is plentiful...each at about 11G expandable to 16G. Only 3GB used in one tablespace...100MB in the other two.
    retention guarantee is not set on.
    notice undo_retention is at 18 hours.
    I do the following
    SELECT COUNT(*) FROM MYTABLE as of TIMESTAMP to_timestamp(sysdate - 1/24); --- 1 hour ago.
    ORA-01555 snapshot too old.
    This appears to be a bug....the UNDO tablespaces are never stressed...not even close. undo retention is set to 16 hours....my query only asks for a measly 1 hour ago.
    Why snapshot too old?! Why unexpired undo info gone?!
    I wonder if undo info is getting spread across the RAC and when I do the flashback query, it only looks at the session's local node and can't find it. But thats not how RAC is supposed to work......Just shooting in the dark.
    does db_flashback_retention_target have to be set higher?....doesn't seem from DOCs like that deals with flashback query, just flashback DB.
    Anyone know why this is happening...Remember the UNDO tablespaces never get close to their capacity...never have to auto-expand.
    I should not have to (and don't want to) set RETENTION GUARANTEE on...don't suggest that....I want to know why this failed without it.
    I expect all undo info from 1 hour ago to have been kept if retention is set to 16 hours and the tablespace is not stressed...correct?
    Thanks for any Help you can give.
    Edited by: user3233984 on Mar 30, 2011 2:50 PM

    The big problem with flashback archive tablespaces that I see is that once you place a table into the archive tablespace you cannot alter the table. We have added hundreds of new data columns to our tables over the last couple of years. Some of them have history tables or archived data associated with them.
    The new columns are just null in the history and when archived data is retrieved. I see not being able to alter archived tables as a big problem.
    As for the OP problem. Delayed block clean up is supposed to no longer be a problem in 11g though we all know how past statements from Oracle on like claims have played out (that is, sometimes what Oracle says is fixed turns out to be only partially fixed or the fix introduced a new problem).
    Another possible issue is if Oracle automatic undo managment offlined or dropped any of the undo segments since the segment was not needed. I believe that undo managment is written to the alert log so it should be worth a look.
    IMHO -- Mark D Powell --

  • Undo retention and tablespace size

    Situation:
    Oracle 9.2.0.1 configured with undo_retention=10800 but with a 2GB size limit for the
    undo tablespace with no autoextend.
    As far as i know, with 10800 the undo tablespace could grown to around 10GB
    but i'm not sure tho. I REALLY need to know if this is clearly a wrong setup (imho it
    is) or could be an acceptable situation in some scenarios.
    Thanks heap in advance.

    Oracle 9.2.0.1 configured with undo_retention=108003 Hours? This is realy huge undo retention time.
    with a 2GB size limit for the undo tablespace with no autoextend.You probably mean datafile not tablespace.
    You don't need resize existing datafile you could just add another datafile to undo tablespace.

  • (10g) 자동화된 UNDO RETENTION 튜닝

    제품 : ORACLE SERVER
    작성날짜 : 2004-05-17
    PURPOSE
    이 문서는 Oracle 10g 에서 자동화된 UNDO RETENTION 기능에 대하여
    소개하는 자료이다.
    Explanation
    - Automatic tuning of undo retention in 10g.
    Oracle 9i 에서는 ORA-1555 error가 가끔 발생하여 DBA가 이에 대한
    조정을 해줄 필요가 있었다. 그러나, Oracle 10g 부터는 UNDO_RETENTION
    에 대한 자동 튜닝 기능을 제공하게 되었다. 따라서, ORA-1555 에러가
    발생하지 않도록 자동으로 UNDO RETENTION을 튜닝한다.
    - Mandatory setting
    1) UNDO_RETENTION=0 (10g: 이 파라미터 값을 0으로 해야 자동 활성화됨)
    2) 반드시 SMU(System Managed Undo)를 사용해야 함.
    - 자동 튜닝의 방식
    UNDO_RETENTION을 0으로 셋팅하면 UNDO_RETENTION의 최소값은 900초가 된다.
    즉 15분이다. MMON process가 매 30초마다 query duration을 계산한다.
    MAXQUERYLEN 이라는 값을 계산하는데 이 값에 따라서 MMON은
    TUNED_UNDORETENTION 이라는 수치를 결정한다. 이것은 새로운 UNDO
    RETENTION 값이 TUNED_UNDORETENTION 로 셋팅이 됨을 의미한다.
    계산 공식은 다음과 같다.
    TUNED_UNDORETENTION = MAXQUERYLEN + 300 Sec.
    Example
    테스트를 위한 작업 순서는 다음과 같다.
    1. 다음 SQL을 이용하여 TB1과 TB2 라는 두 개의 테이블을 생성한다.
    create table tb1
         (col1 number not null,
         col2 number,
         col3 number,
         col4 number,
         col5 char(10),
         col6 date,
         col7 char,
         col8 real,
         col9 float,
         col10 float(10))
         tablespace test1;
         begin
         for i in 1..250 loop
         insert into tb1 values (6,1,3,1,'afdfaa','10-SEP-91','g',11.11,10.11,.11);
         insert into tb1 values (7,34,1,23,'faaaa','12-AUG-91','h',11.1,1.11,1.1);
         insert into tb1 values (8,91,17,1,'alkaa','10-AUG-87','i',6.11,31.11,0);
         insert into tb1 values (9,0,8,1,'adfda','12-AUG-91','j',11.11,11.11,11.11);
         insert into tb1 values (10,5,1,1,'advfaa','17-AUG-91','k',1.11,1.11,1111);
         insert into tb1 values (11,5,67,1,'acva','13-AUG-91','l',1.11,13.11,13.11);
         insert into tb1 values (12,7,1,3,'aadfa','14-AUG-90','m',11.11,11.11,11.11);
         insert into tb1 values (13,9,4,1,'ajhka','10-AUG-55','n',11.11,11.41,31.11);
         insert into tb1 values (14,1,1,3,'sdda','10-AUG-91','o',11.11,11.11,11.11);
         insert into tb1 values (15,6,1,3,'sdd332','10-AUG-91','o',11.11,11.11,11.11);
         end loop;
         end;
         create table tb2
         (col1 number not null,
         col2 number,
         col3 number,
         col4 number,
         col5 char(10),
         col6 date,
         col7 char,
         col8 real,
         col9 float,
         col10 float(10))
         tablespace test2;
         begin
         for i in 1..250 loop
         insert into tb2 values (16,100,100,100,'aaaa','10-AUG-95','a',111.11,11.11,11.11);
         insert into tb2 values (27,200,200,200,'bb','11-AUG-95','b',221.22,22.22,22.22);
         insert into tb2 values (38,300,300,300,'ccccccc','12-AUG-99','c',31.333,333.33,3333.3);
         insert into tb2 values (40,400,400,400,'dddddddd','12-AUG-99','d',111.11,11.11,11.11);
         insert into tb2 values (50,33,10000,1000,'aaa','10-AUG-94','f',11.11,111.11,321.11);
         insert into tb2 values (60,1000,3000,10000,'afdfaa','10-SEP-97','g',111.11,144.11,.11);
         insert into tb2 values (70,341,10,2310,'fghfgaaaa','12-AUG-98','h',11.1,11.11,1.1);
         insert into tb2 values (80,0910000,1780,100,'aallkaa','10-AUG-89','i',611.11,311.11,0);
         insert into tb2 values (90,0,80,1000,'adfda','12-AUG-96','j',11.11,11.11,111.11);
         insert into tb2 values (100,51,10,1000000,'advfaa','17-AUG-97','k',11.11,11.11,1111);
         end loop;
         end;
    2. 같은 test schema에서 다른 세션을 open한다.
    3. test schema에게 DBA 권한을 부여한다.
    4. 첫번 째 SESSION에서 다음 SELECT 문장을 수행한다.
    SELECT TB1.*, TB2.*
    FROM TB1, TB2
    WHERE TB1.COL1 > TB2.COL1;
    5. 두번 째 SESSION에서 위 4단계 수행후 2~5초 정도 후에 다음 명령을 수행한다.
    alter system set "_smu_debug_mode" = 45;
    set transaction use rollback segment "_SYSSMU3$";
    set echo on;
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    set transaction use rollback segment "_SYSSMU3$";
    update tb1 set col1 = col1;
    commit;
    6. "_SYSSMU3$" 의 사용량을 보기 위해 세번 째 SESSION을 OPEN한다.
    7. 세번 째 SESSION에서 다음 query를 수행한다.
    select tuned_undoretention, maxquerylen, maxqueryid from v$undostat;
    결과는 다음과 같은 형태일 것이다.
    ===================================
    TUNED_UNDORETENTION MAXQUERYLEN MAXQUERYID
    2300 2000 gpxxh7pysj4fs
    900 1 25z699hs9r3wy
    900 1 2syxvjbg8d6s4
    900 44 5scq3kj3rm7tz
    MAXQUERYLEN 값과 계산된 TUNED_UNDORETENTION 값을 살펴보아야 한다.
    (참고) 만약 관련된 query 문을 조회하려고 한다면 다음 SELECT 문을
    수행하면 된다.
    SQL> Select sql_text from v$sqltext
    where sql_id = 'gpxxh7pysj4fs' /* MAXQUERYID value */
    8. 다음 SQL 문을 이용하여 SMU 의 증가량을 확인한다.
    SQL> select USN, RSSIZE, HWMSIZE, OPTSIZE, SHRINKS, segment_name
    from v$rollstat, dba_rollback_segs
    where usn=segment_id and segment_name like '%SMU3$';
    USN RSSIZE HWMSIZE OPTSIZE SHRINKS SEGMENT_NAME
    3 260096 522240 6 _SYSSMU3$
    9. Step 5 아래에 있는 script를 반복해서 수행하고, step 8 의 SQL을
    다시 반복 수행하면 SMU3 의 증가량을 확인할 수 있을 것이다.
    (참고) 이와 같은 Automatic Undo Retention의 튜닝은 ORA-1555 ERROR
    발생을 예방해준다. 그러나 undo tablespace가 autoextend off 이면
    DML 수행 시 UNDO SPACE 부족과 같은 상황에 처할 수 있다.
    UNDO tablespace의 사이즈가 부족하면 UNDO RETENTION 값이 줄어들 수 있다.
    어떤 UNDO RETENTION을 가능하게 하기 위해서는 그 만큼의 UNDO 공간이
    필요하다. Oracle 9i에서는 DBA가 직접 해주어야 했던 이런 고려를
    Oracle Database 10g에서는 Oracle 서버가 대신 해준다.
    Reference Documents
    <Note:240746.1>

    Flashback Drop uses recycle bin...
    make sure:
    - you didn't create table on SYSTEM + SYSAUX tablespaces.
    - You didn't use "purge" when you drop table " drop table xxx purge"
    Example:
    SQL> show parameter undo_retention
    NAME                    TYPE     VALUE
    undo_retention               integer     0
    SQL> select table_name,tablespace_name from user_tables where table_name='TT';
    TABLE_NAME          TABLESPACE_NAME
    TT               USERS
    SQL> drop table TT;
    Table dropped.
    SQL> desc TT
    ERROR:
    ORA-04043: object TT does not exist
    SQL> FLASHBACK TABLE TT TO BEFORE DROP;
    Flashback complete.
    SQL> desc TT
    Name                         Null? Type
    OWNER                         NOT NULL VARCHAR2(30)
    OBJECT_NAME                    NOT NULL VARCHAR2(30)
    SUBOBJECT_NAME                     VARCHAR2(30)
    Edited by: Surachart Opun (HunterX) on Aug 3, 2009 12:56 PM

  • Undo retention and ORA-01555

    Dear Experts,
    Oracle 9.2.0.6 (Hp-ux 11.11).
    How undo retention and snapshot too old error are related to each other ?
    As per my understanding undo retention is only a request and if a transaction is running out of space, it will use space secured by undo retention.
    Thanks & Regards
    Sunil Kumar

    user13151642 wrote:
    Dear Experts,
    Oracle 9.2.0.6 (Hp-ux 11.11).
    How undo retention and snapshot too old error are related to each other ?
    As per my understanding undo retention is only a request and if a transaction is running out of space, it will use space secured by undo retention.
    Yes, that's why oracle never said in 9i, where this parameter came into existence for the first time that setting it would completely remove the ora1555 issue. If the space is not there and there are incoming transactions requiring the space for their Undo, Oracle can and will overwrite the previously stored Undo leading to the error. That's the reason, you have the Undo Retention guarantee from 10g onwards which ensures that for the time period mentioned, there won't be any overwriting of the Undo data. But, this comes with an issue as well because since now, there is no overwriting of the previosuly written Undo data. the incoming transactions would fail because they won't be able to log their Undo data anymore.
    Aman....

  • UNDO retention causing excessive I/O ?

    New DBA here.
    Quick Summary:
    We have an oracle 10gR2 DB on AIX 5.3. OS runs from the box, Database runs from a san. Aside from the DB, there is a web based application running on the box, which uses the DB.
    System is dedicated to this application.
    We have a consulting company that is making suggestions, and I am not sure about some of them.
    When we set up the software, the vendor told us to set up the database with undo retention to 10800. So we did.
    Our consulting group is telling me that Undo I/O represents 34% of the total database I/O, and that I should reduce the retention time to 1080. *(they also tell me that the longest running query is 100s; I don't quite understand how this is relevent).
    Why would reducing the UNDO retention lenght reduce the UNDO I/O ?

    First you need to check the concept of UNDO, the main purpose of undo are:
    Rollback an active transaction
    Recover a terminated transaction
    Provide read consistency
    Recovery from logical corruptions
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/logical.htm#sthref449
    also check undo retention,
    The undo retention period indicates the amount of time that must pass before old undo information—that is, undo information for committed transactions—can be overwritten.
    As you can see, there's no direct relationship between undo retention and database I/O. Reduce undo retention will not reduce database I/O.
    Besides, the UNDO_RETENTION initialization parameter is ignored unless retention guarantee is enabled.
    *(they also tell me that the longest running query is 100s; I don't quite
    understand how this is relevent).The relevant here is your undo retention should be longer than longest running query (and undo space is big enough to hold the undo data of longest query) , so that you don't have out-of-space conditions in the undo tablespace and ORA-1555 error for consistent reading.
    However again, it's relevant to undo setting not database IO.

  • Undo retention value

    Hi All,
    I am getting following ORA-01555 error for following sql
    ORA-01555 caused by SQL statement below (SQL ID: 9hwwvxc0aa70n, Query Duration=3787 sec, SCN: 0x0001.a84d4a15):
    Tue Mar 17 11:38:28 2009
    SELECT MSI.SEGMENT1 PART_NUMBER ,REPLACE(MSI.DESCRIPTION,',','.') DESCRIPTION ,MSI.PRIMARY_UOM_CODE UOM ,MSI.UNIT_LENGTH LENG
    TH ,MSI.UNIT_WIDTH WEIDTH ,MSI.UNIT_HEIGHT HEIGHT ,MSI.UNIT_VOLUME VOLUME ,MSI.UNIT_WEIGHT NETWEIGHT ,MSI.ATTRIBUTE14 PRICE_C
    LASS ,MSI.INVENTORY_ITEM_STATUS_CODE ITEM_STATUS ,( SELECT MSI1.SEGMENT1 FROM MTL_RELATED_ITEMS MRI ,MTL_SYSTEM_ITEMS MSI1 WH
    ERE 1=1 AND MRI.RELATIONSHIP_TYPE_ID =2 AND MRI.RELATED_ITEM_ID=MSI1.INVENTORY_ITEM_ID AND MRI.ORGANIZATION_ID=MSI1.ORGANIZAT
    ION_ID AND MRI.INVENTORY_ITEM_ID=MSI.INVENTORY_ITEM_ID AND MRI.ORGANIZATION_ID=MSI.ORGANIZATION_ID AND ROWNUM=1 ) SUBSTITUTE_
    PNO ,MSI.ATTRIBUTE8 REGISTRATION_DATE ,XXJPM.FOB FOB ,( SELECT QLL.OPERAND FROM QP_LIST_HEADERS QLH ,QP_LIST_LINES QLL ,QP_PR
    ICING_ATTRIBUTES QPA WHERE 1=1 AND QLH.NAME='EKK PARTS RETAIL PRICE LIST' AND QLH.LIST_HEADER_ID=QLL.LIST_HEADER_ID AND QLL.L
    IST_LINE_ID=QPA.LIST_LINE_ID AND NVL(QLL.PRODUCT_UOM_CODE,'Ea')='Ea' AND NVL(QLL.CONTEXT,'SPARES')='SPARES' AND QLH.LIST_HEAD
    ER_ID=QPA.LIST_HEADER_ID
    The Query Duration=3787 sec.
    My undo retention value is 6000 and my undo tablespace have enough space.
    Still I am getting this error,
    Can someone help me on this.
    Thanks

    here is some more information on "Retention Guarantee" from the Oracle documentation in case it helps.
    Retention Guarantee
    To guarantee the success of long-running queries or Oracle Flashback operations, you can enable retention guarantee. If retention guarantee is enabled, the specified minimum undo retention is guaranteed; the database never overwrites unexpired undo data even if it means that transactions fail due to lack of space in the undo tablespace. If retention guarantee is not enabled, the database can overwrite unexpired undo when space is low, thus lowering the undo retention for the system. This option is disabled by default.
    WARNING:
    Enabling retention guarantee can cause multiple DML operations to fail. Use with caution.
    You enable retention guarantee by specifying the RETENTION GUARANTEE clause for the undo tablespace when you create it with either the CREATE DATABASE or CREATE UNDO TABLESPACE statement. Or, you can later specify this clause in an ALTER TABLESPACE statement. You disable retention guarantee with the RETENTION NOGUARANTEE clause.
    You can use the DBA_TABLESPACES view to determine the retention guarantee setting for the undo tablespace. A column named RETENTION contains a value of GUARANTEE, NOGUARANTEE, or NOT APPLY (used for tablespaces other than the undo tablespace).
    see http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm

  • UNDO RETENTION is Guarenteed ?

    what it means
    UNDO RETENTION is Guarenteed
    any specific answers appreciatable....
    Thanks

    Not really. You might get ORA-1555 Snapshot Too Old with guaranteed undo retention as well. The cause for ORA-1555 is different.
    The guaranteed undo retention guramtees the undo to be available for the duation of time. So it might reduce the chance of ORA-1555; but does not eliminate it.
    On the other hand, guanrateed undo also demands more undo space. So if you don't expand the undo tablespace datafile or make it autoextend, the transactions will fail. So, watch out.
    HTH.
    Arup Nanda

  • Undo Tablespace Retention gurantee

    Hi,
    From what I have read about undo Tablespaces ,If Undo Management is AUTO,and Retention is se to say 15 min and retention gurantee is disabled ,Unexpired transactions can be overwritten by the database,If such is the case then undo tablespace should never get filled up.
    But I have observed despite these settings,Undo tablespace filling issue still occurs.
    Please help me understand this.
    Thanks.

    Either
    1. Your undo tablespace datafile is small (inadequate for the volume of transactions)
    OR
    2. Oracle is using autotuneundo which causes it to retain Undo for longer than undo_retention period and use the undo tablespace datafile to the fullest.
    See Oracle Support notes
    "Oracle 10G new feature - Automatic Undo Retention Tuning [ID 311615.1] "
    "Bug 5387030 - Automatic tuning of undo_retention causes unusual extra space allocation [ID 5387030.8] "
    "Bug 5387030"
    Hemant K Chitale

  • How to find out amount of undo generated in 10g and 9i? for a given session

    Hi All,
    I am on v10.2 on Linux. How can I find out amount of undo generated in my session ?
    I tried this
    SQL&gt; select a.STATISTIC#, a.VALUE, b.NAME from v$mystat a , v$statname b
    2 where a.statistic# = b.statistic# and (b.name like '%undo%' or b.name like '%rollback%') ;
    STATISTIC# VALUE NAME
    5 0 user rollbacks
    75 0 DBWR undo block writes
    176 132 undo change vector size
    177 0 transaction tables consistent reads - undo records applied
    178 0 transaction tables consistent read rollbacks
    179 0 data blocks consistent reads - undo records applied
    182 0 rollbacks only - consistent read gets
    183 0 cleanouts and rollbacks - consistent read gets
    188 0 rollback changes - undo records applied
    189 0 transaction rollbacks
    200 0 auto extends on undo tablespace
    202 0 total number of undo segments dropped
    220 0 global undo segment hints helped
    221 0 global undo segment hints were stale
    222 0 local undo segment hints helped
    223 0 local undo segment hints were stale
    224 0 undo segment header was pinned
    226 0 SMON posted for undo segment recovery
    229 0 SMON posted for undo segment shrink
    236 0 IMU undo retention flush
    241 0 IMU CR rollbacks
    242 488 IMU undo allocation size
    22 rows selected.
    SQL&gt;
    SQL&gt; create table temp1 as select * from dba_objects where 1=2 ;
    Table created.
    SQL&gt; select a.STATISTIC#, a.VALUE, b.NAME from v$mystat a , v$statname b
    2 where a.statistic# = b.statistic# and (b.name like '%undo%' or b.name like '%rollback%') ;
    STATISTIC# VALUE NAME
    5 0 user rollbacks
    75 0 DBWR undo block writes
    176 30280 undo change vector size
    177 0 transaction tables consistent reads - undo records applied
    178 0 transaction tables consistent read rollbacks
    179 8 data blocks consistent reads - undo records applied
    182 8 rollbacks only - consistent read gets
    183 0 cleanouts and rollbacks - consistent read gets
    188 0 rollback changes - undo records applied
    189 0 transaction rollbacks
    200 0 auto extends on undo tablespace
    202 0 total number of undo segments dropped
    220 0 global undo segment hints helped
    221 0 global undo segment hints were stale
    222 0 local undo segment hints helped
    223 0 local undo segment hints were stale
    224 0 undo segment header was pinned
    226 0 SMON posted for undo segment recovery
    229 0 SMON posted for undo segment shrink
    236 0 IMU undo retention flush
    241 0 IMU CR rollbacks
    242 560 IMU undo allocation size
    22 rows selected.
    SQL&gt; insert /*+ APPEND */ into temp1 select * from dba_objects ;
    91057 rows created.
    SQL&gt; commit ;
    Commit complete.
    SQL&gt; select a.STATISTIC#, a.VALUE, b.NAME from v$mystat a , v$statname b
    2 where a.statistic# = b.statistic# and (b.name like '%undo%' or b.name like '%rollback%') ;
    STATISTIC# VALUE NAME
    5 0 user rollbacks
    75 0 DBWR undo block writes
    176 171356 undo change vector size
    177 0 transaction tables consistent reads - undo records applied
    178 0 transaction tables consistent read rollbacks
    179 166 data blocks consistent reads - undo records applied
    182 91 rollbacks only - consistent read gets
    183 0 cleanouts and rollbacks - consistent read gets
    188 0 rollback changes - undo records applied
    189 10 transaction rollbacks
    200 0 auto extends on undo tablespace
    202 0 total number of undo segments dropped
    220 0 global undo segment hints helped
    221 0 global undo segment hints were stale
    222 0 local undo segment hints helped
    223 0 local undo segment hints were stale
    224 0 undo segment header was pinned
    226 0 SMON posted for undo segment recovery
    229 0 SMON posted for undo segment shrink
    236 0 IMU undo retention flush
    241 0 IMU CR rollbacks
    242 1352 IMU undo allocation size
    22 rows selected.
    What exactly is "undo change vector size" ?
    Also, if I am on v 9.2, this ( undo change vector size ) stat name is not there. What can be used in v9.2 ?
    Thanks in advance.

    Hi..
    >
    SET LINESIZE 200
    COLUMN username FORMAT A15
    SELECT s.username,
    s.sid,
    s.serial#,
    t.used_ublk,
    t.used_urec,
    rs.segment_name,
    r.rssize,
    r.status
    FROM v$transaction t,
    v$session s,
    v$rollstat r,
    dba_rollback_segs rs
    WHERE s.saddr = t.ses_addr
    AND t.xidusn = r.usn
    AND rs.segment_id = t.xidusn
    ORDER BY t.used_ublk DESC;
    >
    HTH
    Anand

  • Is there so call "dedicated" UNDO tablespace in Oracle 9i and higher?

    Since one of our applicaions needs to process large amounts of data, we have been using a dedicated rollback segment in order to avoid the "snapshot too old" problem.
    Recently our DB upgraded to Oracle 9i and DBA asked us to use "undo" tablespace.
    Based the Oracle 9i Doc., it only allows to select ONE undo tablespace at a time.
    If so, DBA has to make the only UNDO as large as our Cash large transactions
    need(adjust the UNDO_RENTION), which inevitably waste lots of space.
    Does Oracle 9i allow to have one dedicated UNDO tablespace for large transactions while another one for regular transactions just like we use the old rollback segments.
    Thanks in advance

    Why have multiple UNDO tablespaces? You can only use one at a time, and when the other one is not being used, it still consumes storage space.
    Spend a little time determining how much undo you need and size undo tablespace and undo retention around those values and you should be able to resolve the problems you are experiencing now.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96521/undo.htm#9505

  • Query abort  with ora-30036 after more than 20 hours and 180g of undo

    Dear all,
    A developper transmits me a query. It fails after more than 20 hours and an undotbs of 180g (i change undo-retention, size of undo tbs, without results). That query makes a lot of inserts. How can i rewrite it to be more performant (my database is on 10.2.0.3 and i can't change it).
    here's the query :
    set serveroutput on size unlimited
    set pages 0
    set trims on
    set lines 1000
    set feed off
    set pagesize 50
    set linesize 1000
    set head off
    set echo off
    set verify off
    set feedback off
    WHENEVER SQLERROR EXIT SQL.SQLCODE
    DECLARE
    v_annee VARCHAR(4) := '2012';     
    v_dkm_id NUMBER := '108';
    v_entretien NUMBER;
    v_nb_feuilles_cr NUMBER := 0;
    v_nb_etats_cr NUMBER := 0;
    v_action_id NUMBER;
    v_rm_id NUMBER;
    v_personne_id NUMBER;
    CURSOR c_evaluation IS
         SELECT E.ID# AS E_ID, W.ID# AS WF_ID , E.NATURE_ECHELON AS ECHELON
         FROM T_EVALUATION E
         JOIN T_DKM_LOCALE L ON L.ID#=E.DKM_LOCALE_ID
         JOIN T_WORKFLOW W ON (W.CODE=E.CODE_WORKFLOW_INITIAL AND W.ANNEE=v_annee )
         WHERE L.DKM_NAT_ID=v_dkm_id;
    r_evaluation c_evaluation%ROWTYPE;
    BEGIN
    SELECT ID#
    INTO v_personne_id
    FROM T_PERSONNE
    WHERE ID_FONCTIONNEL = 'herve.collin';
    dbms_output.put_line('===== MAJ evaluations / statut_harmo_shd =============');
    dbms_output.put_line('===== Creation des feuilles ==========================');
    SELECT ID# MOTIF_ID
    INTO v_entretien
    FROM T_REF_MOTIF_TENUE_ENTRETIEN
    WHERE CODE='PLA';
    OPEN c_evaluation;
    LOOP
         FETCH c_evaluation INTO r_evaluation;
         EXIT WHEN c_evaluation%NOTFOUND;
    IF r_evaluation.ECHELON = 'T'
    THEN
    SELECT ID#
    INTO v_rm_id
    FROM T_REF_REDUCMAJO
    WHERE ANNEE = v_annee
    AND CATEGORIE_GRADE = 'ET'
    AND CODE = 'V1';
    END IF;
    IF r_evaluation.ECHELON = 'F' OR r_evaluation.ECHELON = 'V'
    THEN
    SELECT ID#
    INTO v_rm_id
    FROM T_REF_REDUCMAJO
    WHERE ANNEE = v_annee
    AND CATEGORIE_GRADE = 'FV'
    AND CODE = 'R1';
    END IF;
    UPDATE T_EVALUATION
    SET STATUT_HARMO_SHD = 'C' , REF_REDUCMAJO_PROP_SHD_ID = v_rm_id
    WHERE DKM_LOCALE_ID IN ( SELECT ID# FROM T_DKM_LOCALE WHERE DKM_NAT_ID = v_dkm_id );
    INSERT INTO T_FEUILLE(ID#, REF_MOTIF_TENUE_ENT_ID, EVALUATION_ID, WORKFLOW_ID)
    VALUES (S_FEUILLE.NEXTVAL , v_entretien , r_evaluation.E_ID, r_evaluation.WF_ID);
    v_nb_feuilles_cr := v_nb_feuilles_cr + 1;
    END LOOP;
    CLOSE c_evaluation;
    dbms_output.put_line(' -> '||v_nb_feuilles_cr||' feuilles crees');
    COMMIT;
    END;
    set serveroutput off
    exit
    What is the bester choice ? drop the indexes on the table before insert, start the insert without fetching the data in cursor ?
    nb: sorry for my bad english
    Best regards
    Catherine Andre
    @mail: [email protected]

    user4443606 wrote:
    Thanks for your reply !
    I'll try to grow the undo tbs space but i stay convinced that the problem is in the query.You can be convinced & wrong at the same time.
    row by row INSERT is slow by slow.
    It can be done as single INSERT; but that won't change the amount of UNDO that is required.

  • Excessive undo segment extension

    I am using the automatic UNDO feature in 10g.
    The UNDO tablespace size is 3gb with autoextend set ON.
    Undo retention is set at 900.
    I am attempting to update 1M+ records contained in a global temporary table using FORALL .. UPDATE method.
    About 2 minutes into the process, the performance degrades dramatically as undo segment extension alerts eventually make the application freeze.
    Other io alerts ( direct path write temp, busy buffer waits, etc ) also appear.
    I notice that the UNDO tablespace has an init extent of about 131k and additional extents set at 64k.
    These seem small for my needs.
    Can someone please advise ?
    Thanks !

    Can you check from AWR to investigate what waited event happended?
    http://www.oracle-base.com/articles/10g/AutomaticWorkloadRepository10g.php
    Use EM to check waited event.
    If you have another session else accessed this table often, Perhaps you need commit ... often (example: commit every 100000 rows).
    If you found redo log often switch log ... when you update ...
    you can use "nologging" option to help
    update table_name nologging set ....Anyway if you think the problem was about undo... you should found error in alert log or your session...(ora-01555)

Maybe you are looking for

  • Difference between DESCRIBE TABLE..... and  SY-DBCNT

    Hi, i want to know the difference between DESCRIBE TABLE.. command and SY-DBCNT.

  • Enable Commenting & Measuring in Acrobat 10 and 11

    What does the "measuring" refer to in File | Save As Other | Reader Extended PDF | Enable Commenting & Measuring in Acrobat 11? (BTW, it was Comments | Enable for Commenting and Analysis in Adobe Reader in Acrobat 9. The path was similar to 11 in ver

  • User exit  vs customer exit

    Hi experts , i am confusing user exit and customer exit plz give good diffrence and where we use these exits thanks and advance

  • View Panel : Change color of data values in channel table

    Hi, Is there a way wherein I can change the color of a particular data value or data block  in a channel in the VIEW panel and can this be done programtically? I am using DIAdem 2010. Looking forward for your response Thanks in advance Priya

  • Enabling Tool Bar Buttons for LIST UI for FBI ?

    Hi, I have created Actions to a Node 'MNR_SEARCH_RESULT', when I Configure LIST GUIBB with this node I made 3 tool bar Buttons for these actions, but when Test the Application tool Bar Buttons are disabled . (No data present in the list). below are t