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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • UNDO Tablespace size

    Hi,
    We have a production database with size 120GB (DB Version 11.1.0.6), And our UNDO Tablespace size is 30GB.
    For the past 4 days the UNDO tablespace utilization is more than 85%.
    We have disabled the AUTOEXTEND for the UNDO Tablespace.
    So the UNDO RETENTION is dynamically calculated by Oracle itself and the value now is
    TUNED_UNDORETENTION
    339183
    Please suggest how to fix this issue.
    Thanks !

    Hi,
    The UNDO Tablespace size is still increasing. We dont have flashnack enabled for our database.
    The database is 11.1.0.6 Standard Edition.
    TABLESPACE TOTAL_SIZE_IN_MB FREE_SPACE_IN_MB % FREE %USED
    UNDOTBS1 32152 4440 14 86.19
    USERS 123784 23120 19 81.32
    SYSTEM 1536 465 30 69.73
    SYSAUX 1024 449 44 56.15
    GGS_DATA 2048 1388 68 32.23
    We enabled AUTOEXTEND on for one of the datafiles in UNDO Tablespace.
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 9000
    undo_tablespace string UNDOTBS1
    select to_char(begin_time, 'DD-MON-RR HH24:MI') begin_time,
    to_char(end_time, 'DD-MON-RR HH24:MI') end_time, tuned_undoretention
    from v$undostat order by end_time;
    BEGIN_TIME END_TIME TUNED_UNDORETENTION
    23-DEC-11 18:15 23-DEC-11 18:25 375077
    23-DEC-11 18:25 23-DEC-11 18:35 375678
    23-DEC-11 18:35 23-DEC-11 18:45 376278
    23-DEC-11 18:45 23-DEC-11 18:51 376578
    Please let me know how can i reduce the space consumed by UNDO Tablespace.

  • 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

  • How to see the tablespace size

    hi
    how to get the tablespace size??
    thx

    Hello,
    select SUM(bytes)/1024/1024 MB from dba_data_files
    where tablespace_name = 'xxxxxx';
    works fine.
    I am trying to build a function for that:
    select SUM(bytes)/1024/1024 MB
    from dba_data_files
    where tablespace_name=upper('&user')
    However, I need to make some enhancements:
    1. how to make comments in sql files?Refer to the REM statement in the sqlplus reference manual
    2. a lot of outputs are generated:
    SQL> @get_size
    Enter value for user: tts1
    old 3: where tablespace_name=upper('&user')
    new 3: where tablespace_name=upper('tts1')
    MB
    2048
    how to avoid that so that only the size is
    displayed.
    for example:
    SQL> @get_size
    Enter value for user: tts1
    MB
    2048
    Refer to set verify off in the sqlplus reference manual.
    >
    3. how to let the function accept a parameter such
    as:
    SQL> @get_size tts1
    Refer to the define command in the sqlplus reference manual.
    >
    4. how to include a usage (help) to that function
    such as:
    SQL> @get_size
    usage: get_size <tablespace name>
    Many thanksRefer to the prompt statement in the sqlplus reference manual.
    Sybrand Bakker
    Senior Oracle DBA

  • How to query the tablespace size increment speed?

    Hello,
    Do you have any directions or ideas on how to know the tablespace size increments history. or how to know the frequency of tablespace size increment.
    when I went into new database, I never managed this database before, i want to know the tabelspace size increments speed for do the reasonable space extend.
    so could you please give us a guide thanks!

    RLUO wrote:
    Hello,
    Do you have any directions or ideas on how to know the tablespace size increments history. or how to know the frequency of tablespace size increment.
    when I went into new database, I never managed this database before, i want to know the tabelspace size increments speed for do the reasonable space extend.
    so could you please give us a guide thanks!Hi, there good way is using DBMS_SPACE.OBJECT_GROWTH_TREND as Rajesh mentioned that.But also you can use some AWR views to getting this information.Seee below link.
    tablespaces' growth trend

  • Cacluation of undo tablespace size and retenion

    How to calaculate the expected size of the undo tablespace and undo retention parameter from the exisitng data.

    The easiest way to calculate undo requirementes is using the undo advisor, it is available in 10g and 9i. This is a graphical tool that lets you know the amount of required undo space according to your generated undo data.
    Regards.

  • 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

  • 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

  • Estimate the tablespace size

    Hi,
    I am expected to insert around 10580000 rows in a table. Based on this number will I be able to calculate the tablespace size.
    Thanks
    SC

    Hello,
    Simple math; excluding any overhead
    db_block_size/avg_row_len = approx number of rows per block
    Total no of rows / approx number rows per block = Approx number of blocks
    Approx number of blocks * db_block_size = Approx number of bytes
    Approx number of bytes / (1024*1024) = Size in MB
      8192 = db_block_size
      173  = avg_row_len
       select 8192/173 from dual;
       select ( (10580000/47)*8192) / ( 1024 *1024) from dual;
      Regards

  • How to estimate the database size?

    Hello. I have a database model in SQL data modeler. Also I've created it on the test server, but it is empty now.
    Now I need to estimate the size of the database for understanding the requirements to production hardware.
    For, example how many gigabytes I need in two years for my database. How can I do it?
    Thank you in advance.

    It is called "volumetrics" in ErWIN.

  • How to check temporary tablespace size in Oracle 7?

    Hi,
    Anyone still using Oracle 7 ? I would like to know the sql to check the temporary tablespace and its datafile size.
    Thank,
    Regards,
    Eye Gee

    http://www.oracle.com/technetwork/documentation/oracle7-091910.html

  • How to calculate PCT free size oracle 11g

    Hi,
    I have table
    create table T_LOB_DATA
    ID NUMBER not null,
    LOB_NAME VARCHAR2(256),
    DATE_TIME TIMESTAMP(6),
    LOB_DATA BLOB not null,
    LOB_NO NUMBER not null,
    LOBALD VARCHAR2(32)
    i have 100000-200000 records in table and in this table 30k-40k Lob records are updated so what PCT free size set for T_LOB_DATA
    Regards,
    Vaibhav

    I think you should read below links :
    LOB Storage
    http://docs.oracle.com/cd/E11882_01/appdev.112/e18294/adlob_tables.htm
    And
    http://dbaspot.com/oracle-server/395480-pctfree-pctused-table-updates-lobs.html in which there are replies of Sir Jonathan Lewis and Mark. Even that thread is for Oracle 9i, but I think it may also be of your interest.
    As far as concern of PCTFREE for LOB; if LOB segment are stored out of line then PCTFREE is no more in action, because Oracle manages blocks for LOB segment something differently, in which do not play considerable role of PCTFREE.
    Regards
    Girish Sharma

  • How to estimate average row size without populating data

    hi all
    I have a work of estimating the average row size of some tables. Because I don't want to populate these tables with data(It's alot work to do it),so I am not able to get the arerage row size from dba_tables by analyzing these tables.
    Is there other way around to do my job easily?
    Thanks alot.

    Hi,
    I am not a coder,I am a DBA.Do you think that it's coder's responsibility to do such kind of works?Still i think it part of the dba role to suppport the developers or to provide guidance, the easiet way would be the using package DBMs_SPACE, perhaps if you take the help of developer, ask him to populate the single record with full length or say max length in each table and generate the 10053 trace with basic select clauses, You can the information from the trace too...
    - Pavan Kumar N

  • Relation between undo_retention and undo tablepsace size

    Hello,i am on 10.2.0.3.
    Can someone please clear this things a little bit.
    Let's say that i have one SQL that is doing inserts or updates and this have execution time of 30 minutes,
    and my undo_retention parameter is set to 20mins, undo_management=auto, and undo tablespace of 30GB of which is curently taken only 1GB,
    will this insert fail with ora-1555 snapshot too old or not ?
    Is undo_retention the only thing that determines how long query can be run or i can focus on undo tablespace size also if there is enough space in it ?

    No, the DML activity load on the system during any given period of time is the most important factor in how your undo is handled. How you define your undo tablespace in your choice of building it using extendable data files or with a fixed size (my recommendation) also comes into play.
    If you use a fixed size undo tablespace Oracle will attempt to use it all before overlaying data.
    The DBA Administration manual has a decent discussion of undo tablespace managment and sizing considerations in the chapter on managing undo.
    HTH -- Mark D Powell --

Maybe you are looking for