Question about Undo Tablespace?

Hello;
The size requirement of the undo tablespace is related to the number and size of transactions that occur on the database.But I dont need to query any of these transaction for a schema or table by using flashback so is there a way of disabling writing any transactions on a table or schema to undo tablespace ?
Edited by: Ecimen on 04.Mar.2013 03:50
Edited by: Ecimen on 04.Mar.2013 03:51

Rob_J wrote:
Hi,
No, that's not what I meant. What I meant was that if you say your logging tables are creating a lot of UNDO it must mean that you are writing/updating/deleting a lot of information from them. I was just throwing out the thought that if this is the cause of the issue, can you reduce the amount of data you write to these tables? In other words, do you need all this logging data? It's a question for the business and/or designers of your application to answer.
RobHello Rob;
i got it now , and yes we need to logging all this data because its production database occuring many transactions always...
Edited by: Ecimen on 04.Mar.2013 06:28
Edited by: Ecimen on 04.Mar.2013 06:31

Similar Messages

  • Newbie question about undo/redo.

    When Oracle changes a data block it records the before-image in an undo segment block. Both changes (data and undo) are recorded in the redo log. The change to the undo segment block is recorded in the redo log so that Oracle can rebuild the undo segment after a system crash. Therefore, any transactions that were not committed or rolled back at the time of the crash can be rolled back after the crash.
    My question is: Why does the undo segment need to be rebuilt? Isn't it a file? And shouldn't it still be there after the crash? I realize that sometimes files can get destroyed/corrupted, but that's a different story.

    Thanks for the reply, but the question is not about how it is used, but about why doesn't it already exist and not need rebuilding.
    That is, the undo segment is a file. Right? What happens to it that causes it to need rebuilding?

  • Question about ALTER TABLESPACE add/drop datafile

    Good afternoon,
    As an exercise, I created a tablespace STORETABS and added a datafile to it using the command:
    SQL> alter tablespace storetabs add datafile 'e:/storetabs3.dbf' size 50M;This step succeeded. A new file was created in the root of e: as expected.
    Following that command, I issued:
    SQL> alter tablespace storetabs drop datafile 'e:/storetabs3.dbf';
    Tablespace altered.The command succeeded. However, the file *'e:/storetabs3.dbf'* was not removed. After re-reading the documentation found at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3002.htm, I get the impression that removing the O/S file itself is something that always needs to be done manually.
    The question: Am I correct that there is no option to cause the "alter tablespace <tablespace> drop datafile <datafilename>" to delete the O/S file ? In other words, must the O/S file always be manually deleted as a separate step ?
    Thank you for your help,
    John.

    I believe in windows directory paths used backslash and not forward slash.
    You can argue why oracle does not give error, either while creating or while dropping ;)
    SQL> select * from v$version ;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> select tablespace_name, file_name from dba_data_files ;
    TABLESPACE_NAME
    FILE_NAME
    USERS
    /u01/app/oracle/oradata/orcl/users01.dbf
    UNDOTBS1
    /u01/app/oracle/oradata/orcl/undotbs01.dbf
    SYSAUX
    /u01/app/oracle/oradata/orcl/sysaux01.dbf
    SYSTEM
    /u01/app/oracle/oradata/orcl/system01.dbf
    EXAMPLE
    /u01/app/oracle/oradata/orcl/example01.dbf
    SCOTT_TBS
    /home/oracle/scott_f1.dat
    6 rows selected.
    SQL> !ls -l scott_f1.dat   
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
    SQL> alter tablespace scott_tbs add datafile '/home/oracle/scott_f2.dat' size 10M ;
    Tablespace altered.
    SQL> !ls -l scott_*.dat
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
    -rw-r----- 1 oracle oinstall  10493952 Sep 11 21:18 scott_f2.dat
    SQL> alter tablespace scott_tbs drop datafile '/home/oracle/scott_f2.dat' ;
    Tablespace altered.
    SQL> !ls -l scott*.dat
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat

  • Undo tablespace issue

    Hello,
    I have a question regarding undo tablespace utilization. Currently there are no active transactions, all previous transactions have been commited, there is only one user session on my test database, undo retention is set to 900. I am trying to drop the old undo tablespace (I have created a new one, and switched to it - alter system undo_tablespace= new_undo;) but I get ORA-30013: undo tablespace 'old_undo' is currently in use.
    I have bounced the database, but made no progress. dba_undo_extents stiil have active segments from the old_undo and dba_rollback_segs indicate there are two online segments from the old_undo.
    Why is the old undo being used? WHo is using it?
    Thank you and
    Rgds

    SQL> SELECT * FROM V$VERSION;
    BANNER
    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 Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> select distinct status, segment_name, tablespace_name from dba_undo_extents where status='ACTIVE';
    STATUS SEGMENT_NAME TABLESPACE_NAME
    ACTIVE SYSSMU112241730627$ UNDOTBS8
    ACTIVE SYSSMU161513093487$ UNDOTBS8
    SQL> show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 900
    undo_tablespace string UNDOTBS11
    Thanks!

  • 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

  • Confusion about undo

    hi guys,
    I am a bit confused. I have read a number of articles on undo, and how the undo segments are etc, but I am still a bit confused as to what is going on internally.
    say we have a data block belongin to table1, and it has one column updated that changes its value from 5 to 10 for one row. This is what I see as happening.
    oracle gets a data block from an undo segment, and writes 5 to it
    oracle updates table1.column to be 10 for that row
    oracle has started a transaction, so an itl slot is got in table1s data block - this will contain the transaction id, the xid(pointer to the undo segment transaction table slot), and uba (tail of the undo chain of the block)
    oracle writes redo for both the data blocks of table1 and the undo segment to the redo log
    if someone could help me understand the architecture of an undo segment then I think it might help me understand things better as I am not sure how we can know where to go in the undo segment to find the value (i.e. how do we know where the before image 5 is stored? it could be anywhere inside any data block in the undo segment)
    thanks

    OracleGuy777 wrote:
    hi guys,
    I am a bit confused. I have read a number of articles on undo, and how the undo segments are etc, but I am still a bit confused as to what is going on internally.
    say we have a data block belongin to table1, and it has one column updated that changes its value from 5 to 10 for one row. This is what I see as happening.
    oracle gets a data block from an undo segment, and writes 5 to it
    oracle updates table1.column to be 10 for that row
    oracle has started a transaction, so an itl slot is got in table1s data block - this will contain the transaction id, the xid(pointer to the undo segment transaction table slot), and uba (tail of the undo chain of the block)
    oracle writes redo for both the data blocks of table1 and the undo segment to the redo log
    if someone could help me understand the architecture of an undo segment then I think it might help me understand things better as I am not sure how we can know where to go in the undo segment to find the value (i.e. how do we know where the before image 5 is stored? it could be anywhere inside any data block in the undo segment)
    This is going to be happening from the blocks's transaction header only Oracleguy. In the transaction header, as you mentioned UBA is present, this would point to the the undo segment where the transaction information is maintained. Moreover, the transaction table present in the Undo Segment would help you in finding out that where in a particular undo segment, your transaction's information is maintained.
    What you have put, IMO that's all what is happening. So where is the doubt ? I believe that you have read the notes of Stephen Haisley as well when you last time presented another question about Undo so that does explain the working in quite a good manner.
    HTH
    Aman....

  • About snapshot too old and undo tablespace

    Hello,
    version: 11.1.0.7
    environment:
    Database A contain some views from several tables located into database B.
    When I query the views that join several tables located in a remote database B using a dblink the query intermittently notice me, the following errors:
    ORA-12801: error signaled in parallel query server
    ORA-01555: snapshot too old: rollback segment number too small
    Some times after the I re-execute the query it run without any problems but it is bad because the Developers can not accurately test their app.
    The undo tablespace have the following configuration:
    guaranteed retention
    unlimited
    undo_retention is about 7200.
    Also the undo tablespace are just using a 4% of total so I think the system should has honor to the old images from my distributed query.
    Thank you in advance for your suggestion.

    user12100209 wrote:
    Hello,
    version: 11.1.0.7
    environment:
    Database A contain some views from several tables located into database B.
    When I query the views that join several tables located in a remote database B using a dblink the query intermittently notice me, the following errors:
    ORA-12801: error signaled in parallel query server
    ORA-01555: snapshot too old: rollback segment number too small
    Some times after the I re-execute the query it run without any problems but it is bad because the Developers can not accurately test their app.
    The undo tablespace have the following configuration:
    guaranteed retention
    unlimited
    undo_retention is about 7200.
    Also the undo tablespace are just using a 4% of total so I think the system should has honor to the old images from my distributed query.
    Thank you in advance for your suggestion.session reporting ORA-01555 is victim.
    some session is doing DML against same table as victim session & doing COMMIT (likely inside LOOP)

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

  • Problem with UNDO tablespace

    Hi guys.
    Our database has 50GB of undo tablespace. I decided to create a second undo tablespace and switch to the new one. Since doing that yesterday, the size of the old undo is 49GB (was thinking that the values will drop to zero) and the new tablespace keeps increasing in size! Its size now is about 20GB. I do have the following question.
    a) If I restart the database, it the value of the old undo going to fall to zero?
    b) undo_retention=86400. Setting this value to a lesser value say 800seconds, it is going to act the performance of the database? Is it going to release the space on the old undo?
    Thanks and any help is appreciated.
    David

    The undo tablespace will not automatically shrink size, since you have a new undo tablespace in place. You can drop the old one if you don't plan to use it.
    Set lower undo_retention will certainly help to contain the undo space usage. However you should query v$undostat and v$rollstat to estimate the amount of undo space required for the current workload then size the undo tablespace accordingly. Turn off the auto extend on undo tablespace.

  • Dropping Undo Tablespace

    Hi,
    I am running Oracle 9.2 on Solaris. I have Automatic undo management turned on and have a Undo tablespace by name UNDOTBS. It has a single datafile and has AUTOEXTEND feature turned on. My UNDO_RETENTION was set to 4 hours.
    Presently, the size of UNDOTBS has grown to around 40G and has filled up the file system in which it resides. I need to clean up the file system. In order to do this, I followed the below procedure.
    SQL> create undo tablespace UNDOTBS1 datafile '/u04/oradata/proddb/undo_00.dbf' size 1024M autoextend off;
    SQ> alter system set undo_tablespace=undotbs1 scope=both;
    SQL> alter system set undo_retention=3600 scope=both;
    Now, i checked the alert log and it is offlining all the UNDO segments of the first undo tablespace UNDOTBS. It is taking time and has been more than 1.5 hours. I have a couple of questions here,
    1. As i have issued "alter system undo_tablespace=undotbs1 scope=both", all the new transactions will use the new UNDOTBS1. No new transactions will be using the first undo tablespace UNDOTBS right?
    2. Since, i have issued "alter system undo_retention=3600 scope=both", all the transactions in first undo tablespace UNDOTBS will be rolled back after 2 hours, no matter if it is commited or not. After this period, i am safe to drop the first undo tablespace using "drop tablespace UNDOTBS including contents and datafiles;". Did i get it right?
    Any information will be of a great help.
    THanks,
    Harris.

    Hi,
    Thank you all for the replies. It has been two days since i switched the undo_tablespace to use the new tablespace(undotbs1) but my alert log is still being flooded with " Undo tablespace 1 moved to pending switch out state". I tried the following to see if there are any rows returne from the above query and it did 3 rows, showing some undo segments with the following output
    SQL> select a.name, b.status from v$rollname a, v$rollstat b where a.name in (select segment_name from dba_segments where tablespace_name='UNDOTBS') and a.usn=b.usn;
    Name Status
    _SYSSMU15$      UNKNOWN
    _SYSSMU33$      UNKNOWN
    _SYSSMU9$        PENDING OFFLINE
    I have seen gone through the metalink id: 341372.1 that speaks about this SWITCH-OUT state. How can i make sure what old transactions are still using the Undo segments in first undo tablespace and how can i go about killing them. Could anyone please let me know that i could use the following queries to find the correct sessions that are using the Old Undo tablespace.
    SQL> select ADDR, XIDUSN,STATUS, START_TIME from v$transaction;
    SQL> SELECT
    a.usn,
    a.name,
    b.status,
    c.tablespace_name,
    d.addr,
    e.sid,
    e.serial#,
    e.username,
    e.program,
    e.machine,
    e.osuser
    FROM
    v$rollname a,
    v$rollstat b,
    dba_rollback_segs c,
    v$transaction d,
    v$session e
    WHERE
    a.usn=b.usn AND
    a.name=c.segment_name AND
    a.usn=d.xidusn AND
    d.addr=e.taddr AND
    b.status='PENDING OFFLINE';
    Just wanted to make sure that the second query lists the PENDING OFFLINE segments of the first tablespace right?
    This is a prod. box, so wanted to confirm with you guys before proceeding.
    Thanks,
    Harris.

  • Undo tablespace space usage

    I am sorry If someone asked this question before
    Oracle version : 10.2.0.3.0
    OS : Linux
    Tablespace Name           Tablespace Size (in MB)       Used (in MB)       Free (in MB) Pct. Used
    UNDOTBS1                                    2,000              1,826                174        91
    SELECT tablespace_name TSPACE, status, COUNT(*) AS Segments, sum(bytes)/1024/1024 as "TOTAL_SIZE(MB)"
    FROM dba_undo_extents
    GROUP BY tablespace_name, status
    SQL> SQL>   2    3    4
    TSPACE               STATUS                 SEGMENTS TOTAL_SIZE(MB)
    UNDOTBS1             EXPIRED                     464      1825.9375My all undo segments are expired but undo tablespace shows as 91 % used. Is there any workaround for avoiding this?
    Thanks
    Nisanth V.S

    This could be a normal situation: see http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:676925300346249247#711734500346983254. A 2 GB undo tablespace is a small one and I would not worry about having a lot of expired undo segments.
    You can also use V$UNDOSTAT to check undo tablespace usage for the last 7 days.

  • Few basic questions about database administration

    Hello,
    I have a few basic questions about database administration.
    1. I switched one of my oracle instances to archivelog mode. I just cannot locate the archive log files on my windows system. The %ora_home%/ora92/database/archive directory is desperately empty...
    2.What is the tools01.dbf datafile used for?
    3.What is the undotbso1.dbf datafile used for?
    Thanks in advance,
    Julien.

    1. The archive log location needs to be specified in your init.ora file. By default, Oracle will place the archive files in either ORACLE_HOME/dbs or ORACLE_HOME/database.
    2. The tools01.dbf file belongs to the tools tablespace which should be set as the default tablespace for system. It primary purpose is to hold Oracle Forms and Reports database objects, however, it should also be used for holding other non sys database objects such as the perfstat (statspack) or other third party database schemas e.g. quests sqllab.
    3. undotbs01.dbf file belongs to the undo tablespace.

  • Loss of Undo tablespace

    Hello Friends
    I am confuse about a snario, please clear it:
    What if we loss undo tablespace(data files), and all files remain safe(database in archive log 9i) and the tablespace have some active transactions at the time of failure. My question is that how oracle will recover ? and where the undo data for uncommited transaction will come from at the time of recovery.
    Sunil Kumar

    You can create new undo tablespace , though, is that there cannot be any active transactions in the Undo segments of the tablespace when it is time to actually drop it. In the case of data file corruption, uncommitted transactions in the database that have data in Undo segments can be extremely troublesome because the existence of any uncommitted transactions will lock the Undo segments holding the data so that they cannot be dropped. This will be evidenced by an "ORA-01548" error if this is attempted. This error, in turn, prevents the drop and recreation of the Undo tablespace, and thus prevents the successful recovery of the database.
    To overcome this problem, the transaction tables of the Undo segments can be traced to provide details on transactions that Oracle is trying to recover via rollback and these traces will also identify the objects that Oracle is trying to apply the undo to. Oracle Doc ID: 94114.1 may be referenced to set up a trace on the database startup so that the actual transactions that are locking the Undo segments can be identified and dropped. Dropping objects that contain uncommitted transactions that are holding locks on Undo segments does entail data loss, and the amount of loss depends on how much uncommitted data was in the Undo segments at the point of failure.
    Hope this hepls...

  • Undo tablespace keeps growing

    Hello,
    my undotbs is growing 14g (although i my undotbs actul size is 9g) I try to resize datafiles, but
    this may not work.
    So, i am assuming to perform this task
    >
    - Create a new undo tablespace as :
    SQL> create undo tablespace UNDOTBS2 datafile '<complete file path>' size <smaller size>;
    - Change parameter UNDO_TABLESPACE
    SQL> alter system set UNDO_TABLESPACE=UNDOTBS2;
    - Drop UNDOTBS1
    SQL> drop tablespace UNDOTBS1 including contents and datafiles;>
    but my question is , is it worthy to delete the undotbs1 whose having alot of data and if i deleted
    this (undotablespace) data ,i will not able to recover it thoroughly?
    db_version:10.2.0(linux)

    sunny kichlooIf your concern is regarding how to resize Refer this thread
    >
    i have already try this but it still growing and day-today we are running large transaction on our db.
    marcopb      Try to investigate why your undo tablespace is growing... and think about why your next undo tablespace won't grow as the previous...
    >
    our db size is 60g and we are running on heavy transection on it (everday)

  • What is the difference between undo tablespace and online redo log files.

    what is the difference between undo tablespace and online redo log files. I am confused
    as per my knowledge undo tablespace is used to store the undo information when a table is being updated so that, just incase we need to rollback a transaction we know what was present in the table earlier.
    when a transaction fails the SMON performs the rollback of the data.
    This undo data is stored in the undo tablespace and read consistency if any is enforced.
    is my understanding till here correct?
    Now, can this undo data/before image not be stored in the redo log buffer and online redolog files?
    can redo-log files not store this information?
    in fact, is it that when undo tablespaces exist in a database, the undo data/before image is stored in both the undo tablespace and also the redo log files?
    kindly clarify my doubt.
    thank you.

    This question has been asked many times before. The answer is always the same.
    Yes, redo contains the before image of data (and the after-image). Therefore, it **COULD** be used to roll back a transaction.
    BUT... Redo is written sequentially. Using it to rollback your transaction would involve reading through all the redo written by maybe thousands of other people. It would be painfully slow.
    Your transaction is, however, directly linked to just the UNDO that it generates (which is JUST the before image of the data). So, your undo is your undo and doesn't share space with anyone else's undo. Therefore, using it to roll back YOUR transaction is fast.
    The fact that undo is only the before image of the data also makes it faster than wading through a sea of before and AFTER images as you'd find in redo. About twice as fast, in fact, since there's half the data. Roughly.
    Redo also gets written and flushed to disk whenever there's a commit, 3 seconds are up or too much (1MB, actually) redo gets generated between flushes caused by other factors. Your redo gets flushed when those things happen, even if you haven't actually committed your transaction. And redo logs recycle themselves, meaning that your redo -even if your transaction hasn't been committed yet- can be over-written by later transactions. Try rolling back when that's happened, if redo was the source of your rollback data!
    Undo, however, cannot be over-written if the transaction has not been committed. Ever. If you don't commit for three years, there will be three years' undo stored in your database (assuming you had the space, of course!).
    I could go on, but that will do. Redo is there fore RECOVERY, after catastrophe. Undo is there for read-consistency (and the occasional change of mind). Two different functions. Two different mechanisms. Each one highly tuned to doing what it does, why it does it, most efficiently and effectively.

Maybe you are looking for

  • Macbook Pro (10.9.3) w/ FCS 2 Installation?

    Hello everyone, so I have a problem. I recently got a Macbook Pro (10.9.3), and my Video Prodcution teacher was kind enough to give me her Final Cut Studios 2 for free. When I tried to install the program, a message appeared saying "You can't open th

  • Pass Hidden Field (Rep ID) as Parameter when user logs into site (CFusion)

    I have set-up user validation to my site based on a userID and password, but I want to also pass a hidden field/parameter (RepID) to the rest of the site pages so that I can filter my record sets on those pages based on that RepID parameter. I have c

  • No audio with MLS Direct Kick package

    For some reason, there's is no audio with the MLS Direct Kick package tonight.  After spending a fruitless hour on the phone with Fios tech support, their only solution was to dispatch a technician to my house which didn't make any sense to me since

  • Using Webservices in the Self Service UI

    WHat is the best practice to show new fields in Self Service UI pages with out changing existing UI elements? We created new proxies for Siebel WSDL and want to show new fields in the UI. We don't want to create new view object and link with AM to sh

  • Printer Driver Problem?  Page margins shift when using paper tray vs. manual feed

    I am printing to an Apple LaserWriter 12/640 PS. The printed page and page margins are PERFECT (WYSIWYG; "What you see is what you get") when printing either to: (a) the MANUAL FEED TRAY of the Apple LaserWriter 12/640 PS; or (b) PDF to view on scree