Unable to shrink undo tablespace... Help!

Hi,
I have problems to shrink the system undo tablespace, which has grown up to 14 GB.
I use 9.2. Table space owner is 'SYSTEM', undo_management = AUTO.
I tried to shrink the greatest rollback segments by the commands
ALTER SESSION SET UNDO_SUPPRESS_ERRORS = TRUE;
ALTER ROLLBACK SEGMENT "_SYSSMU6$" SHRINK TO 20 M;
Oracle confirmed these commands, but nothing happened.
What am I doing wrong?
Hermann Mueller

You have seen the discussion about the undo segments, on the temporary tablespaces, you should be aware that the sort segment of a given temporary tablespace is created at the time the first sort operation takes place. The sort segment continues to grow by means of extent allocation until the segment size has reached the total storage demands of all of the active sorts running on the instance. Oracle will keep on allocating temporary space on demand unless the physical limit states otherwise.
Temporary segments are produced each time a sort operation (explicit -order by- or implicit -aggregation, reindexing-) requires to sort a set that cannot fit into memory. So if you detect excesive sort usage you should aim your monitors towards the sort operations (reports, reindexing, max, min, aggregations, order by ...). If your system has a DDS behaviour, this kind of operations are frequent as a massive sorting has to be peformed against millions of rows.
A Temporary tablespace will almost always appear to be near 100% full, that's because once oracle has allocated temporary space it doesn't release it back to the free space, it keeps it allocated even when the sort operation has finished. Criteria behind this fact is similar to the one oracle used to have when the rollback segments were in use, Oracle only allocated space and the dba should perform manual actions to release space, and the criteria is performance. Once it has allocated space this big, there are possibilities that the same circumstances that raised the temporary usage high water mark to this level are repeated, so if oracle keeps the mamimum allocated space, it won't have to allocate the same storage once more.
Main concern with temporary tablespace growth is not free space itself, but the reasons why this amount of space was allocated, so I suggest you to track the sql statements with sort operations. If you are certain the circumstances that motivated this amount of temporary resources to be allocated won't be repeated again, then you could think of resizing down your temporary tablespace. I suggest you to create a new temporary tablespace with the desired size, and alter the default tempoary tablespace to point to this newly crated temporary tablespace, and finally get rid of the original temporary TS.
~ Madrid

Similar Messages

  • How to Shrink UNDO Tablespace

    Hello,
    We had a UNDO Tablespace of 22Gb but it is using just 2GB. How to shrink undo tablespace. we are using clustered 3 node production database 10.2.0.4
    Is there is way that we can shrink UNDO Tablespace or do i need to create a UNDO tablespace and assign the undo tablespace to DB and drop the old UNDO?
    How to ensure that transactions are done and free to drop the old UNDO?
    Is it something we need to restart all the three nodes as each node has its own UNDO Tablespace.
    Need Help on this issue.
    would appreciate your quick response.
    Thanks

    if i am in your place i will do the following:
    <pre class="jive-pre">1-Query DBA_DATA_FILES to determine the name of the datafiles of the UNDO</pre>
    2. Create a new UNDO tablespace.
    <pre class="jive-pre">CREATE UNDO TABLESPACE undo_ts2 DATAFILE '/directory/undo_ts2_01.dbf' SIZE xxxM;</pre>
    3. Modify the database parameter to use the new UNDO tablespace.
    <pre class="jive-pre"> ALTER SYSTEM SET undo_tablespace=undo_ts2 SCOPE=BOTH; </pre>
    4-The Drawback:
    <pre class="jive-pre">New transactions will begin using the new undo tablespace. After some time passes (at least the number of seconds specified by the UNDO_RETENTION initialization parameter), you can drop the old UNDO tablespace. The downside to this approach is that for a short time period, your database will have two UNDO tablespaces</pre>
    Regards
    Mohamed

  • Shrinking undo Tablespace

    Shrinking undo Tablespace
    What is the preferred why to shrink the UNDO Tablespace ?
    1.     To create new UNDO TBS , order the DB to work whit it , and drop the oldest.
    2.     To shrink (resize) the exists one .

    Sagi wrote:
    Shrinking undo Tablespace
    What is the preferred why to shrink the UNDO Tablespace ?
    1.     To create new UNDO TBS , order the DB to work whit it , and drop the oldest.
    2.     To shrink (resize) the exists one .The first one would be a better approach as there may be users who are still using the old tablespace. So for all of them, you would see a Pending Offline status. Once all teh segments release the old information stored in them, you can remove the tablespace. By trying to shrink the tablespace, you actually would be increasing the chances to get the 1555 error and also, this won't be happening as already there is a used space in teh datafile.
    HTH
    Aman....

  • ORA-30036: unable to extend segment, our UNDO TABLESPACE grow to 500 GB

    Our client report that when they run their batch job the error "ORA-30036: unable to extend segment..." came into their log file.
    I have checked with alert log but nothing there. We use Oracle 11g on Solaris 10 SPARC.
    Any suggestion ?
    Thanks & Regards

    Refer to
    Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace [ID 460481.1]
    ORA-30036: unable to extend segment by <N> in undo tablespace '<tname>' [ID 271664.1]

  • Unable to shrink/resize undo tablespace

    Hi Experts,
    I have Oracle 10.2.0.4 database running on RHEL 4.7 in production environment, my undo tablespace has grown upto 32 GB, database is rebooted, still the tablespace is full.
    I want to shrink, resize the undo tablespace, please help me
    Few details are as below
    show parameter undo_retention
    NAME TYPE     VALUE
    undo_retention integer     10
    Please help
    Thanks

    This post is repeatedly executed by mistake, thread with same name is posted 2 minutes before this
    Edited by: user1687821 on Jul 9, 2010 9:29 AM

  • UNDO tablespace resize/shrink.

    Hi All ,
    is it possible to shrink/resize undo tablespace.

    Hi Shobhit!
    I is correct that you're unable to set this parameter with ALTER SYSTEM. Please never use this parameter unless you are told to do so from oracle support. Maybe you're playing with your support if you set it by your self. To tune the size of your undo tablespace set the parameter undo_retention. Whit this parameter you tell your DB in seconds how long undo records should be kept within your undo tablespace. Automatic undotuning will be automatically activated if this parameter has a value greater than 0. To determine the correct size you need for your undotablespace use the following example:
    Size of UNDO needed = UNDO_RETENTION x [UNDO block Generation per sec x DB_BLOCK_SIZE] + Overhead(30xDB_BLOCK_SIZE)
    Out of these we know UNDO_RETENTION and DB_BLOCK_SIZE
    All we need is to find out &ldquo;UNDO Blocks per second&rdquo;
    Which can be easily fetched from v$undostat
    SQL&gt; SELECT (SUM(undoblks))/ SUM ((end_time - begin_time) * 24*60*60) "UPS"
    2 FROM v$undostat;
    UPS
    8.11985583
    V$undostat
    stores data for every 10 mins and begin/end times are start/end time of
    those intervals. We multiplied it with 24*60*60 because the difference
    between two dates will be in days and to get to seconds, we need it to
    multiply with 24hrs*60mins*60secs
    So now we have all the values needed.
    Undo size needed = [8.12 x 2000 x 8192] + [30 x 8192] = 133283840 bytes = 127.11 MB
    Hope this helps!
    yours sincerely

  • Segment shrinking and UNDO tablespace

    When i issued
    alter table <table_name> shrink space cascade;
    I got the error 'Unable to extend UNDO ...by 8' . Does Segment shrinking consume space from UNDO tablespace?
    Message was edited by:
    for_good_reason

    As Jonathan said, shrinking segment generates redo and undo data.
    But, this phoenomenon of undo shortage is not normal case.
    Shrinking segment might invole continous DML(deleting and re-inserting),
    but it's transaction seems to be committed internally at regular intervals.
    For this reason, shrinking operation should not hold undo area that long.
    But have no knowledge on exact behavior of shrink operation.
    Someone else will shed a light.
    How big your table and indexes?
    Some cases are reorted that shrinkage on big segment generates really large amount of undo data.
    This might be related with your problem. But not sure.
    Visit metalink note# 3888229.

  • Unable to extend segment by 8 in undo tablespace 'UNDOTBS1'

    Hi All,
    I have enabled the Oracle flashback data archive.
    Undo tbs size is unlimited. Whenevr i enable FBDA i am getting the below error. when i disable this feature the error is not coming.
    My Oracle version is 11.0.2.0
    ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'
    ORA-02002: error while writing to audit trail
    ORA-00604: error occurred at recursive SQL level 1
    ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'
    ; nested exception is java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    can anyone help me to solve the issue would be very much helpful.
    thanks
    Mohan

    ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'
    30036, 00000, "unable to extend segment by %s in undo tablespace '%s'"
    // *Cause:   the specified undo tablespace has no more space available.
    // *Action:  Add more space to the undo tablespace before retrying
    //           the operation. An alternative is to wait until active
    //           transactions to commit.

  • Unable to extend segment by 8 in undo tablespace 'UNDOTBS1' error ?

    I have added a new column to one of my tables,and I am migrating data to fill all the existing rows for this newly added column; but while executing the migration script I get the following error -
    Error:ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'
    Of whatever i searched on the net this error points to lack of space for the undo segment of oracle. is it possible to extend this space dynamically?
    Any pointers to help me resolve the problem would be appreciated.
    Thanks.

    <snip>
    How have you written your migration scripts? Does it include commits at suitable points in the script, or is it one large commit at the end?
    </snip>
    Actually, that is the case too. I have a one large commit at the end. To avoid this and introduce commits at some decent regular intervals, i will have to modify my script. I am trying to see if there is any other configuration solution possible :)
    Thanks

  • ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS2'

    Hi,
    I am running a Pl/Sql block and it is a batch process which will run once a day.
    Yesterday, i gave me this error:
    ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS2'
    What should i do?
    Can any one help me on this.
    thanks in advance,
    Bala

    Hi
    SQL>SHOW PARAMETER UNDO_RETENTION
    NAME TYPE VALUE
    undo_retention integer 900
    Rgds
    Adnan

  • Help Dropping Undo Tablespace

    Guys,
    I want to create a new undo tablespace and drop the old one.
    I followed the below steps, but could not drop it
    create undo tablespace UNDOTBS datafile '/ora01/oradata/DEVTDB/undotbs.dbf' size 100m AUTOEXTEND ON MAXSIZE 5G;
    alter system set undo_tablespace=UNDOTBS scope=both;
    alter tablespace UNDOTBS1 offline; -- this was successful
    DROP TABLESPACE UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
    -- Last command threw the following error:
    ORA-01548: active rollback segment '_SYSSMU6$' found, terminate dropping tablespace
    I am using oracle 10.2.0.4G on Linux Redhat.
    Any help is appreciated.
    Thanks!

    Charlov wrote:
    Guys,
    I want to create a new undo tablespace and drop the old one.
    I followed the below steps, but could not drop it
    create undo tablespace UNDOTBS datafile '/ora01/oradata/DEVTDB/undotbs.dbf' size 100m AUTOEXTEND ON MAXSIZE 5G;
    alter system set undo_tablespace=UNDOTBS scope=both;
    alter tablespace UNDOTBS1 offline; -- this was successful
    DROP TABLESPACE UNDOTBS1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
    -- Last command threw the following error:
    ORA-01548: active rollback segment '_SYSSMU6$' found, terminate dropping tablespace
    I am using oracle 10.2.0.4G on Linux Redhat.
    Any help is appreciated.
    Thanks!Hi,
    I think you need to wait until there's no active rollback segments in the old undotbs before you can drop it. You can also restart the instance to force Oracle to release the old undotbs.
    HtH
    //Johan

  • Cannot shrink the undo tablespace

    Hello!
    I have run a very long procedure, which generated 15GB undo information. Now I can see in the enterprise manager, that the undo tablespace is empty again. I tried to resize the datafile, but I receive "*ORA-03297*: file contains used data beyond requested RESIZE value". How can I shrink the tablespace without dropping and recreating it?
    I tried also
    purge recyclebin;
    I still get ORA-03297 if I try to resize the datafile.
    I wanted to try something like
    ALTER TABLE xxxxx UNALLOCATE UNUSED;
    or
    ALTER TABLE xxxxx SHRINK SPACE;
    but are there any tables that save the undo information?
    Regards.

    Hi
    well, my transaction is ready! The undo tablespace has not more that 10M of information, the other 15G are free!
    Thanks for the answers, it seems that i still have recreate it ...
    Well, another quertion:
    Is it possible, that I just have to wait longer before I resize the undo data file? I have just succeeded in resizing the data file to 7 GB. I really wish I could shrink it to 100M or so, but still - from 15G to 7G is a lot better! 2 hours ago this action was not possible. Is it some automatic management, that needs to time-out before I can shrink the undo tablespace?
    Edited by: user10962462 on Apr 8, 2009 2:39 AM

  • Doubt regarding ORA-30036: unable to extend segment by 8 in undo tablespace

    I am using 11g Release 1 Database .
    I have to analyze the performance of two tables of different designs which serve the same purpose and come up with the design which is efficient .
    SQL> desc staging_dict
    Name                                      Null?    Type
    SNO                                                NUMBER
    CODE_FRAGMENTS                                     CLOB
    CODE_FRAGMENTS_U                                   CLOB
    CODE_FRAGMENTS_D                                   CLOB
    CODE_FRAGMENTS_DO                                  CLOB
    SQL> desc staging_dict1
    Name                                      Null?    Type
    SNO                                                NUMBER
    CODE_FRAGMENTS                                     CLOB
    CODE_FRAGMENTS_UD                                  CLOB
    CODE_TYPE                                          VARCHAR2(5 CHAR)Initially I tried inserting a few thousand records into both the tables . Then I did some conversion on one column and I populate the result on other column of the same table . So I update the table in bulk mode and I commit for every thousand records .
    I have a undo tablespace of 2G with undo_retention=900 , retention guratantee is not set for the undo tablespace .
    When I tried the conversion and update on the first table (STAGING_DICT) it took more time for around 2500 records compared to other table and when I increased the number of records to 10000 it threw an error
    ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS'
    But I didn't come across this error when I tried the conversion and update on the table for the same 2500 records (STAGING_DICT1) and it was also 10 times faster .
    My doubt is does the error ORA-30036 occur because it is saving the undo image of all the four clob columns though I am doing conversion on one column and updating the other column (using only two columns in the update and only one column is affected by update command) ?
    Also how is that having less CLOB rows prove more effective by adding one more VARCHAR column which differentiates the code_frament type in the STAGING_DICT1 table than having it as more CLOB columns as in STAGING_DICT table ?

    Don't you think the error OP reported is kind of weird?
    Because as you said, Oracle stores "undo" of lob in user tablespace not undo tablespace if the lob is stored out-of-line.
    1. If the size of lob was small, small size of undo would be stored into undo tablespace,
    and OP would'nt have undo tablespace shortage problem.
    (How does small lob flood undo tablespace?)
    2. If the size of lob was big, OP would have 01555 error on user tablespace not undo tablespace shortage error.
    So, i think there are 2 theories that can explain this abnormality.
    1. OP hit the bug of massive undo generation.
    2. OP is using securefile which is 11g new feature.
    Oracle documents says that undo for securefile lob is stored in "undo" tablespace, not user tablespace.
    But unfortunately, i'm not sture about this coz i didn't try it myself

  • ORA-30036: unable to extend segment by 8 in undo tablespace 'APPS_UNDOTS1'

    Hi,
    A user who is trying to run a report on an EBS system, gets the following error from the application end:
    java.sql.SQLException: ORA-30036: unable to extend segment by 8 in undo tablespace 'APPS_UNDOTS1'
    I would have expected to see this ORA error in the Oracle database alert log as well, however this is not the case.
    I increased the size of the APPS_UNDOTS1 tablespace from 1700mb with autoextend to max 3000mb, however it seems that the tablespace is not extending beyond it's original size of 1700mb. In TOAD, I see that the tablespace has not grown even after the user ran the report again. Any idea why? Is there perhaps something that needs to be adjusted on the application side as well?
    Thanks.

    Hi,
    The tablespace is not extending and this error is not written to the alert log, but I found a trace file with the following information....
    ORA-30036 happens when trying to extend undo segment SYSSMU91258636580$ (usn=9) by 8 blocks
    Reason: Fail to Steal
    Current undo tablespace APPS_UNDOTS1 (tsn=1)
    undo tablespace current size 218240 blks, maxsize 218240 blks, fixed sized
    Undo Retention (reactive): 936, Parameter Undo Retention: 900, Tuned Undo Retention: 936, High threshold Undo Retention: -2
    Retention Guarantee FALSE
    Does anyone know how to solve this "Fail to Steal" problem?
    Btw, the query SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*) FROM DBA_UNDO_EXTENTS GROUP BY STATUS; returns about 55 expired extents, therefore there are still available extents to "steal" from. So why does this fail?

  • 0RA-30036: Unable to extend segment by 8 in Undo tablespace

    Hi,
    I am getting this error " 0RA-30036: Unable to extend segment by 8 in Undo tablespace ". Please Advise me how i can solve this error. Just to let u know that I don't have extra space in my Partition at OS level to increase the size of Undo tablespace. Please Advise what is the alternate option to solve this problem.
    I know that I can't do coalesce on Undo tablespace any other way.
    Regards

    Do frecuent commits.
    whats the size of your temp tablespace.
    you can try reducing its size and giving to undo / rollback.
    try droping unused indexes.
    But man..... strart planning your space and make an annual budget for disks.

Maybe you are looking for