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

Similar Messages

  • How to estimate undo tablespace size in 11g?

    I found someone document said, use this sql to estimate undo tablespace:
    select (UR*(UPS*DBS))+(DBS*24) as "bytes" from (select value as UR from v$parameter where name='undo_retention'),(select (sum(undoblks)/sum(((end_time-begin_time)*86400))) as UPS from v$undostat),(select value as DBS from v$parameter where name='db_block_size');
    but in my 11g database, the "select value as UR from v$parameter where name='undo_retention'" is 0. so above sql is always get 196608(8192*24)
    How to estimate undo tablespace size in 11g?
    Thanks very much!

    for undo segments size you should turn it to be autoextend on as well undo management set to be AUTO
    i.e
    undo_managment='AUTO'
    for retention see that link
    Ora-01555, snapshot too old: rollback segment number 2 with name "_SYSSMU1
    BTW as hemant stated leave it to be auto which is good approach but make sure enough space on disk has been
    dedicated for undo segments are allowed to grow to the size they need to be based on the requested undo_retention.
    Khurram                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

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

  • How to recover undo tablespace in 9i

    How can i recover undo tablespace 9i.Can any provide step by step recovery process

    Doc ID 94114.1 on Metalink might be of interest to you

  • 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

  • How to switch undo tablespace

    Dear all,
    I have created a new undo tablespace named undotbs2, How can i switch all the session use the undotbs2?
    Many sessions are running and using the old undo tablespace named undotbs1.

    user7244870 wrote:
    CKPT wrote:
    Sb has already mentioned links how to manage undo..
    For more reference check this below links.
    http://oracleflash.com/32/Change-or-switch-undo-tablespace-in-Oracle-database.html
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm#BABGJBJH
    I can't open the link.
    http://oracleflash.com/32/Change-or-switch-undo-tablespace-in-Oracle-database.html
    Is there a specific reason that you are not willing to read the official doc link?
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/logical.htm#CNCPT1079
    Aman....

  • How to protect UNDO TABLESPACE in 9iR2

    We can put REDO LOGs onto different disks by the means of multiplexing, so that even though one datafile is corrupted, the whole system would still be operational. But UNDO TABLESPACE doesn't provide such a mechanism. If the datafile of the active UNDO TABLESPACE is corrupted, it's dead.
    I don't think a system would risk its availability on the single failure of the UNDO TABLESPACE. So there must be some tricks to circumvent this problem. Can anyone tell me that?
    Thanks!

    951368 wrote:
    I am sorry... I should have been more clear...
    The issue i have is : My primary is a 3 node RAC and i created the same 3 node physical standby, now we had a 4th node at our standby, standby allowed me to add all the required cluster parameteres like instance#,thread# for 4th node, but i was stopped at creating a undo tablespace for the 4th node. What is the procedure? do i need to create it at primary or is there a way i can directly create at standby?
    ThanksHi,
    So you have 3 nodes primary and wanted to add 4th node on standby?
    Create the 4th undo tablespace in primary using
    sql > create undo tablespace "undotbs4" datafile 'xxxxx' size xxxx;
    The primary won't touch this undo as none of the instances should pointing to this new undo.
    In the standby on 4th node define 'undo_tablespace' to undotbs4.
    Cheers

  • How to shrink a tablespace;;;Plz Help Me

    Hello,
    I have droped 2 big tables (more than 20 millions of records each one) and eventually many indexes in reference.
    In my Database server I don't have enougth space, I have only 5Go.
    I have to free disk space now by shrinking the size of Index and Data Tablespace.
    I used theses scripts to analyse my object plecement repartiton on both tablespaces : INDEX and DATA.
    1- select file_id, block_id, blocks,
    owner||'.'||segment_name "Name"
    from sys.dba_extents
    where tablespace_name = 'INDX'
    UNION
    select file_id, block_id, blocks,
    'Free'
    from sys.dba_free_space
    where tablespace_name = 'INDX'
    order by 1,2,3
    2- select file_id, block_id, blocks,
    owner||'.'||segment_name "Name"
    from sys.dba_extents
    where tablespace_name = 'DATA'
    UNION
    select file_id, block_id, blocks,
    'Free'
    from sys.dba_free_space
    where tablespace_name = 'DATA'
    order by 1,2,3
    After executing these scripts, I find many free extends in the middle and the command :
    ALTER DATABASE DATAFILE ... RESIZE is failed
    Any idea How to resize / reduce my tablespaces ?
    My database version 's :
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 On Linux Sever.
    Thanks a lot
    Message was edited by:
    OracleJavaLinux

    hi
    do one thing create new tablespace like TEST move table by table to that and viseversa
    ie u have emp,dept ... etc tables move emp to ne tablespace and then move back to its original tablespace
    for ex:emp,dept... belongs to APPS_TS_TX_DATA
    alter table emp move tablespace TEST;
    alter table emp move tablespace APPS_TS_TX_DATA;
    after this rebuild all indexes on that tables
    alter index <index_name> rebuild;
    By this action u can recover unused space by the tables
    Message was edited by:
    BhanuChander

  • Undo Tablespace - newbie question

    Q1. Is an Undo Tablespace mandatory in a database ? I thought the only mandatories were SYSTEM, SYSAUX and TEMP ?
    Q2. What happens if you do not have an Undo Tablespace ?
    Q2. How does an Undo Tablespace relate to Undo / Rollback Segments in a database ?

    >
    Just to give simple, one-liner replies though its all covered in the doc link given by Helios,
    Q1. Is an Undo Tablespace mandatory in a database ? I thought the only mandatories were SYSTEM, SYSAUX and TEMP ?Yes, it is a mandatory tablespace loss of which would be requiring you to do a closed database recovery.
    Q2. What happens if you do not have an Undo Tablespace ?The system tablespace's Undo segment would be used. But that's a bad idea and you should have one .
    Q2. How does an Undo Tablespace relate to Undo / Rollback Segments in a database ?Because Undo segments are no where else but within the Undo tablespace only.
    HTH
    Aman....

  • Exclude undo tablespace in event

    How to exclude undo tablespace from monotoring in grid control? If event is created to notify when tablespace is reached to 90% and wants to exlcude undo. Is it possible?

    Edit the Undo tablespace and "Disable Threshold" on it.

  • How to rebuil undo and temp tbspc

    Hi hussein/helios
    Our apps undo and temp tablespaces got so big ( like 10Gb each) that it almost run out of space. Ho do i resync in back to 2Gb each.
    Is there a system commnad like > alter tablespace undo resync?
    Thanks a lot
    msK

    Hi,
    Please refer tech note *262066.1 : How To Size UNDO Tablespace For Automatic Undo Management*
    Hope helps.
    Regards,
    X A H E E R

  • Undo Tablespace queries

    Hi All,
    I am bit confused with reading about the undo table space. so i need some clarification
    1. There are 2 undo tablespace in our application. Could someone explain how the 2 undo tablespace works? I didn't find any details about this.
    2. Both the undo tablespace is 100% utilized. Where the the new transaction will go? Will new transaction force the used blocks to be expired if needed?
    3. What should be the ideal size of undo tablespace with respect to the total storage size?
    4. is Archive log related to undotable space? if yes then When the archive logs get generated?
    Thanks

    1. In an RAC database, each Instance has to have it's own Undo Tablespace.
    In a non-RAC (single instance) database, only one Undo Tablespace may be active at any time. The other Undo Tablespace would be inactive but can be switched to with an ALTER SYSTEM SET UNDO_TABLESPACE command.
    2. Even if an Undo Tablespace is "100% used" Oracle can expire (and even drop) old extents and segments that are no longer needed by the Undo_Retention value. Thus, undo data for older transactions that have committed (more than Undo_Retention period has elapsed since the commit) will be overwritten.
    3. There's no "ideal size". Undo sizing is based on Transaction volumes, fluctuations in transaction volumes, query patterns etc.
    4. No, there is no direct relation between the two. However, all Undo that is generated also is written to Redo -- i.e. Redo captures Undo as well as it captures changes to Tables, Indexes etc.
    I suggest that you read the Oracle Concepts documentation at
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/toc.htm
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

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

  • 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

  • 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

Maybe you are looking for

  • Driver for HP Photosmart 7510 for Mac OSX 10.8.4

    Hi All, I have an HP Photosmart printer and the drivers won't install on my new MacBookPro which has Mac OSX 10.8.4 I am unable to find any drivers on HP support for this OS. The drivers installed without any problems on my recent iMac which had OSX

  • Can't find any raw files to convert when I am using Adobe DNG converter

    Recently I purchased a new Olympus XZ-1 camera. I shoot exclusively RAW pictures (raw files for this camera are called .orf). Then when I tried to import these .orf files in the organizer of Phtoshop Element 8 it was imposible, nor then I could see t

  • New row creation in value change event

    I used this code for to create new empty for adf table in value change listener public void valchaag(ValueChangeEvent valueChangeEvent) { OperationBinding oper = (OperationBinding ) bindings.get("Create"); oper.execute(); AdfFacesContext.getCurrentIn

  • Speed of text appearance

    I've opened an existing PowerPoint presentation into Keynote. The text boxes had been set to appear letter by letter. I'm finding that they all race onto the screen, and would like to find a way to slow down the appearance of the text. I'm using the

  • UNABLE TO DOWNLOAD INTERNET FILES

    I HAVE CLEANED THE COMPUTER DOWNLOADED ANTIVIRUS PROGRAMS AND STILL CANNOT DOWNLOAD FROM THE INTERNET PLEASE HELP