Question abount undo and Redo

Hello friends,
could you explain the work of UNDO and REDO work ,i have some confusion.

Shiv wrote:
Hello friends,
could you explain the work of UNDO and REDO work ,i have some confusion.Hello,
Where is your db version, OS version?
Generally overview
What Is Undo?
Oracle Database creates and manages information that is used to roll back, or undo, changes to the database. Such information consists of records of the actions of transactions, primarily before they are committed. These records are collectively referred to as undo.
Undo records are used to:
Roll back transactions when a ROLLBACK statement is issued
Recover the database
Provide read consistency
Analyze data as of an earlier point in time by using Oracle Flashback Query
Recover from logical corruptions using Oracle Flashback features
When a ROLLBACK statement is issued, undo records are used to undo changes that were made to the database by the uncommitted transaction. During database recovery, undo records are used to undo any uncommitted changes applied from the redo log to the datafiles. Undo records provide read consistency by maintaining the before image of the data for users who are accessing the data at the same time that another user is changing it.
What Is the Redo Log?
The most crucial structure for recovery operations is the redo log, which consists of two or more preallocated files that store all changes made to the database as they occur. Every instance of an Oracle Database has an associated redo log to protect the database in case of an instance failure.
Redo Threads
When speaking in the context of multiple database instances, the redo log for each database instance is also referred to as a redo thread. In typical configurations, only one database instance accesses an Oracle Database, so only one thread is present. In an Oracle Real Application Clusters environment, however, two or more instances concurrently access a single database and each instance has its own thread of redo. A separate redo thread for each instance avoids contention for a single set of redo log files, thereby eliminating a potential performance bottleneck.
This chapter describes how to configure and manage the redo log on a standard single-instance Oracle Database. The thread number can be assumed to be 1 in all discussions and examples of statements. For information about redo log groups in an Oracle Real Application Clusters environment, please refer to Oracle Real Application Clusters Administration and Deployment Guide.
Redo Log Contents
Redo log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database. For example, if you change a salary value in an employee table, you generate a redo record containing change vectors that describe changes to the data segment block for the table, the undo segment data block, and the transaction table of the undo segments.
Redo entries record data that you can use to reconstruct all changes made to the database, including the undo segments. Therefore, the redo log also protects rollback data. When you recover the database using redo data, the database reads the change vectors in the redo records and applies the changes to the relevant blocks.
Redo records are buffered in a circular fashion in the redo log buffer of the SGA (see "How Oracle Database Writes to the Redo Log") and are written to one of the redo log files by the Log Writer (LGWR) database background process. Whenever a transaction is committed, LGWR writes the transaction redo records from the redo log buffer of the SGA to a redo log file, and assigns a system change number (SCN) to identify the redo records for each committed transaction. Only when all redo records associated with a given transaction are safely on disk in the online logs is the user process notified that the transaction has been committed.
Redo records can also be written to a redo log file before the corresponding transaction is committed. If the redo log buffer fills, or another transaction commits, LGWR flushes all of the redo log entries in the redo log buffer to a redo log file, even though some redo records may not be committed. If necessary, the database can roll back these changes.

Similar Messages

  • How can I use undo and redo with run time menu?

    Hi..I try to built my own menu for graphic programming. How can I use undo and redo in labview with run time menu?

    filozof-
    During runtime, by default, LabVIEW has undo/redo data changes under the edit menu. This will undo/redo changes made to controls during runtime. If you want a more extensive undo/redo (custom for your application), you are going to have to do quite a few things
    1) Create a custom runtime menu (Edit>>RunTime Menu) and place your own undo/redo controls on it
    2) Keep an action history in your program
    3) Catch the Shortcut menu event for your custom undo/redo controls
    4) Reverse the last action in your histroy when you catch the event
    This method would allow you undo entire operations (like resize, move, or whatever kind of functionality you are building into your application) unstead of just undoing data changes.
    Xaq

  • TIP: Editor Undo and Redo

    It happend to me a couple of times already that I pressed some strange key combination by accident and erased the whole editor content; probably Ctrl-z. Unfortunately Undo from the web browser menu is greyed out and not available.
    Checking the Jive 5 documenation I found a link to editor shortcuts, which mentioned Ctrl-z for undo and Ctrl-y for redo.
    I have not figured out yet what the exact criteria for undo and redo is, but I find it very important to know that undo and redo exist and work. It just does not use the browser, which provides undo using platform specific shortcuts. So the editor does provide undo and redo support by using the editor's keyboard shortcuts, despite of what is available in the web browser menu.
    I suggest to mention important editor shortcuts in the forum FAQ.

    @https://forums.oracle.com/people/HemantKChitale the like Burton
    for the opening thread is in the top right under the 'follow' button.
    Timo 

  • Problem of cut,copy,past ,undo and redo actions

    hi
    iam a student of computer science
    iam working on my project notpad
    in this i have to apply the command of doing cut ,copy ,past ,undo,redo
    how can i use thes actions in my project
    please help me for making my project
    i will wait your response at [email protected]

    what u can do is
    just component.cut();
    or
    compoennt.copy();
    component.paste();
    for undo and redo
    u need to take help of undo manager
    which will tell u whether u can undo or not
    same with redo case
    hope it will work

  • Can't get to first base using undo and redo

    Hi folks:
    I'm trying to add undo and redo capabilities to a small application I'm writing with Swing, but I can't get to first base. When I try to establish an undo object like this:
    final UndoManager undo = new UndoManager();
    I get two "cannot resolve symbol" errors on the line.
    Is there some library I'm not importing? What gives?
    Thanks

    Is there some library I'm not importing?Probably. Look in the API for UndoManager. It will tell you what package to import.

  • Cut & Paste - Undo and Redo won't work

    Cut & Paste - Undo and Redo won't work in DreamWeaver -
    this happened suddenly today. Frustrating. Did I set something by
    accident?
    Reinstalled and chose "repair" - rebooted, reinstalled java,
    an intuition. Nothing has worked so far.
    Any ideas?

    On Sat, 2 Sep 2006 03:18:19 +0000 (UTC), "Waltzzz"
    <[email protected]> wrote:
    >Cut & Paste - Undo and Redo won't work in DreamWeaver
    - this happened suddenly
    >today. Frustrating. Did I set something by accident?
    >
    > Reinstalled and chose "repair" - rebooted, reinstalled
    java, an intuition.
    >Nothing has worked so far.
    >
    > Any ideas?
    >
    >
    What a coincidence. I have kept Java off my main machine for
    two
    years, but installed it last week for an app that required
    it. I've
    used FW since version 3 and have never seen it be buggy, but
    the past
    couple of days I have had intermittent problems with copy and
    paste.
    Java goes tomorrow. I'm on XP Pro SP2, how about yo?

  • Undo and Redo

    What is the difference between undo and redo?

    Deepa,
    I shall be short in my reply as I shall be leaving in a while now. So in very short,
    when the user updates the block, lets suppose we updated salary from 100 to 200.So in the buffer cache, it was first 100.When you gave a dml to change to 200, oracle will maintain its redo image in the redo log buffer using redo copy latch and thus the changed info is maintained in the redo log buffer.This info is maintained in the block also.Now before this image gets changed,the entry is done in the transacton table (v$transaction) and Oracle just "maps" a block which will contain the undo image.At the moment no physical changeis done neither any physical write is done in the undo tablespace.
    in which stage, commited data is written to data files.....i got confusion??? I know, when Buffer cache is 1/4 th is full...and at every check point...it wil happen...but as per my above scenario..at which stage it will happen...please explain properly..
    Committed data is written into the log files.Oracle makes sure that once committed the data is there in the redo log files which means from there it can recover at any point of time.
    From where did you read 1/4th of buffer cache?Please can you rephrase the questionbefore I try to answer it?
    One more thing....data base writer writes to data files...redo writer writes to redo log files...which will write undo information to undo files.....
    DBWR only writes the data Deepa.So all the normal flushing which is applicable to other buffers thats the same that is applicable to the undo data too.
    Aman....

  • Undo and redo optimal sizes

    Hi,
    I need to find an optimal size of a undo tablespace and redo log files... we are designing a new database as per the formulas that are given in many websites is "UndoSpace = [UR * (UPS * DBS)] + (DBS * 24)" .... but we still didn't build the database and not sure of those values... so how to design in that cases...
    Please help us at earliest..
    Regards,
    Ramu

    Ramu Jagini wrote:
    Hi,
    I need to find an optimal size of a undo tablespace and redo log files... we are designing a new database as per the formulas that are given in many websites is "UndoSpace = [UR * (UPS * DBS)] + (DBS * 24)" .... but we still didn't build the database and not sure of those values... so how to design in that cases...
    Please help us at earliest..
    Regards,
    RamuYou can only find it by empirical testing unless you know those values, which you can only find by empirical testing. The variance from certain feature usage alone can be orders of magnitude, and besides that programming style has a huge influence, as does actual user load. Beyond that, rare operations like massive loads and end of cycle processing may have much different needs. Tom Kyte makes a good case for saying you should leave large undo around for those cases, "wasted" disk is much cheaper than dealing with the lack of undo at critical times. Since you can tune redo log switching with timeouts, you might as well have redo sized for the rare cases too. You have to load the test data anyways, so that's a good first cut.
    Once you have a reasonable test going you can get advice from the db. Requirements can change over time, too.

  • Undo and redo during recovery

    Sorry for being naive.
    Once the datafiles, controlfile, and spfile are restored, archived redo logs are applied to restore. This is a roll-forward operation. There is an undo segment in the db, why whatever stored on undo tablespace is not used during the recovery.
    Thanks, Pedro

    in short, whatever stored in undo tablespace is needed in case the recover need to do rollback as well. And in most cases, it does.
    Because sometime Oracle will pre-write uncommited dirty buffers to datafiles and in the event of recovery any uncommited transaction will be rollback and original value of the entries are stored in undo.

  • Undo and Redo in JTextPane()

    Hi, I am trying to undo some of the text in my JTextPane() and here is the code for it
    //declarations
    protected UndoManager undoMngr;
    Document document;
    //code in constructor
    undoMngr = new UndoManager();
    document = textForJIF.getDocument();
    document.addUndoableEditListener(undoMngr);
    // calling method in actionPerformed
    if(ae.getSource() == undo)
    undoMngr.undo();
    if(ae.getSource() == redo)
    undoMngr.redo();
    The problem I am facing is that, When I type "abcd" and press ctrl+Z I am able to undo the text but if I press ctrl+Z where there is no text in the JTextPane(), I get a lot of erros in the MS DOS prompt. Please tell me the reason and correct me if I am wrong.
    Thanks

    Hi Camickr,
    I have seen those examples and infact many other examples too, but they are too confusing for me. I am not getting the logic out there. And so I came to post a thread. Plase suggest me.
    Thanks

  • Undo and OutOfMemoryError...

    Hi All,
    I have this program in which I work with the StyledDocument. I have implemented the undo functionality as well. Now, if a lot of style changes happen to the file being edited, as in change of color for sections of text eg. highlight of comments, strings etc., I have noticed that lots of instances (thousands) of DefaultStyledDocument.AttributeUndoableEdit are being created. As a result, while doing editing, sometimes java gives OutOfMemoryError.
    Can anyone suggest how I can override the behaviour and instruct java not to worry about remembering AttributeSet changes to an Element?
    Regards,
    M

    Hi All,
    I have seen an example code which is capabable of the operations like undo and redo with JTextPane. But, I need to apply the same for JTextArea.How to apply the undo and redo operations with JTextArea?

  • HT5312 how do i reset my security questions and redo

    I cant remember my answers for security questions how can i redo this because i have a new laptop
    and can not down load anything without answering questions that i can not remember please help

    Read the steps half-way down the page that you posted from, that tells you how to reset them i.e. if you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then steps 1 to 5 half-way down that page should let you reset them.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • Database restore without temp, undo and control files.

    Hi All,
    You might found this question silly but I don't know so asking this question here.
    I have cold back up of the database. Now, I want create clone of that database, but I have some different paths for the DBFs so I will create new control file after restoring the database.
    Now, I know that I don't need control files and tempfiles to be restored. I have 10 undo files in backup but on the new clone database I don't need all 10. I want only 5. So can I do the restoration without undo , temp and control file and later on add undo and temp?? and if yes then tell me that can I add them at mount level??
    This is my first restore, Please guide me its very urgent

    Nitin Joshi wrote:
    f the COLD Backup does not include the Online Redo Logs, an ALTER DATABASE OPEN RESETLOGS is requireed >>to create these Online Redo Logs. Unfortunately, an OPEN RESETLOGS can only be done after an Incomplete >>Recovery or when using a Backup Control file.
    Therefore, we do a RECOVER with a CANCEL to simulate an Incomplete Recovery.Completely agree with you Hemant. And the links you've provided,i've gone through many times. Excellent description.
    I just wanted to know in above(OP's) scenario if he has complete cold backup(includes online redo logs), does he really need open reset logs or any recovery?
    Regards!no , if you have cold backup with online redo log files then i don't think so you need to open database in resetlogs.Resetlog is always after incomplete recovery or recovery using backup controlfile or you dont have redo logs.
    I am completely agree with you that with given scenario for the cold backup undo tablespace would not be part of recovery and you can
    -offline drop undo tablespace file
    -create another one undo tablespace and its undo datafile
    -point spfile to that newly undo tablespace
    I think Aman is saying in the context of restore and recover online database where undo tablespace create a vital role in database recovery, the undo blocks roll back the effects of uncommitted transactions previously applied by the rolling forward phase.
    Khurram

  • Dashboard widgets not working. I trash the dashboard .plist and redo all widgets then after a restart. Widget not working again.

    Dashboard widgets not working. I trash the dashboard .plist and redo all widgets then after a restart. Widget not working again.

    Yes hello,
    My widgets are not working as well, i looked on forms and it seams that the 10.5 update fix there problems. I also did an archive and install from 10.4... One of the major reasons i purchased the upgrade was to use widgets to clip parts of safari, i'am totaly bummed because all forums i find end with the question un answered. i'am a little bummed becuase there are a couple of things that worked with 10.4 that are not working in 10.5 (like some meg moives not playing.
    i do not wish to create a new account because i do not want to reinstall all my software, photoshop, final cut, dvd studio pro.. etc.
    i hope to find the fix some how.
    I have opened up the console application and when i select widgets load or delete them i see no activity in the console. I'am not familiar with the console app. or command lines.
    is there any more info on this matter? is there any support from apple?
    Thankyou

  • Global Temporary table and REDO

    Dear Friends,
    In my production database we are facing problem of excessive redo generation. After initial analysis, we realised that we are using a lot global temporary tables for storing temp data/calculations and they are generating redo.
    I know that GTT doesn’t create redo but as it creates UNDO and undo is protected by redo therefore it creates some redo but lesser than normal table.
    Solution:
    I google and found that if I use direct path insertion (using APPEND hint) into Global temporary table the I can avoid this redo generation as specified in this link (http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:15826034070548)
    I tried this solution in my GTT but its not making any difference with APPEND clause. Please check following results. Could you please guide me if I am doing something wrong or any other way to avoid redo on GTT.
    JM@ORA10G>insert into JM_temp values(1,'aaaaaaaaaaaaaaaaaaaaaaa');
    1 row created.
    Elapsed: 00:00:00.00
    Execution Plan
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | INSERT STATEMENT | | 1 | 100 | 1 (0)| 00:00:01 |
    Statistics
    0 recursive calls
    2 db block gets
    1 consistent gets
    0 physical reads
    *280 redo size*
    918 bytes sent via SQL*Net to client
    967 bytes received via SQL*Net from client
    6 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    1     rows processed
    JM@ORA10G>rollback ;
    Rollback complete.
    JM@ORA10G>insert * into JM_temp values(1,'aaaaaaaaaaaaaaaaaaaaaaa');
    1 row created.
    Elapsed: 00:00:00.00
    Execution Plan
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | INSERT STATEMENT | | 1 | 100 | 1 (0)| 00:00:01 |
    Statistics
    0 recursive calls
    2 db block gets
    1 consistent gets
    0 physical reads
    *280 redo size*
    917 bytes sent via SQL*Net to client
    981 bytes received via SQL*Net from client
    6 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    1     rows processed

    Hi,
    I tried avoiding GTT in my code but I realised that they are so tightly integrated that i cannot remove them. Operations which I am perfroming on my GTT are
    1. Insertion of data
    2. Fetch data from main tables with joins on GTT
    3. Update GTT with calculated values.
    My understanding it Update steps are generating maximum redo.
    Please help me how can i reduce my redo generation in such scenarios.
    Thanks.

Maybe you are looking for

  • [JS CS3] A question about clearing scriptArgs

    Do parameters remain in the app object until they are cleared? I'm invoking scripts from indesign server, supplying parameters which the scripts read using app.scriptArgs.getValue(). Should I call app.scriptArgs.clear() in all scripts, after the "arg

  • Having deleted music from iPad, how do I remove the 'ghost image'?of song titles

    Having deleted music from iPad - how do I remove 'ghost image' that remains?

  • ALV TEXT problem

    Hi Abaper , In my alv repoer i  am doing sum base on the bkpf-month to the field bseg-DMBTR . my problem is i want  text when summing in every month . like Amount in month June is            how can  i do ? if any one can face same problem help me .

  • Best Practice storage of OLAP and ROLAP data

    Hi all, We are looking at building OLAP cubes based on our our existing relational datawarehouse . Should we just build OLAP cubes in another schema on the existing datawarehouse database or are there fundamental reasons for not storing the OLAP cube

  • Two Websites / One MobileMe?

    Is this a feature or an oversight? I have a MobileMe account, my first website made without iWeb is on the 'homepage.mac.com' domain (corresponding to the iDisk 'Sites' directory) However, when creating a new web design in iWeb it gets published to t