......Redo  Log and Recovery

Hi,
I am a bit confused on the Oracle Recovery structure. As far as we know, whenever oracle updates a row, it writes the new value in the DB Buffer Cache, Old value in the Undo Segment. Which value is then written in the Logfiles or the Logbuffer? How they can be used as recovery structure. Do they contain Old Value or the New Value.
Your kind response will help most of us as we normally forget these basic things.
It would be best if you can highlight the steps and values etc .
Thanks once again:

Redo logs contain two kinds of statements.
SQL_UNDO and SQL_REDO
SQL_UNDO is the statement which will revert the particular transaction (required if you need to rollback)
SQL_REDO is the statement which will complete the transaction (required if you roll forward).
Archive logs can be used via log miner to find out what was the statement fired to get the table to a particular state (lengthy job though).

Similar Messages

  • Redo logs and Flash recovery area

    Hi,
    Is it a good practice to place a copy of the (multiplexed) online redo at the flash recovery area? Wouldn't it be better to place a copy of the archived log at the flash recovery area?

    user492400 wrote:
    Hi,
    Is it a good practice to place a copy of the (multiplexed) online redo at the flash recovery area? Wouldn't it be better to place a copy of the archived log at the flash recovery area?Its not only the archvielogs that should be placed in the FRA. FRA is supposed to contain one copy of the archive logs and the rest 9 destinations are given to you for the multiplexing of it. The idea of multiplexing the redo logs and placing them anywhere( not just on the FRA itself) is simply required so that you won't get to a situation where you would lose all the redo log files and thus have to recreate them, losing the data inside them. So aleast one copy of the log files should be there and where you want to put it, that would depend on you.
    HTH
    Aman....

  • Disk array configurations with oracle redo logs and flash recovery area.

    Dear Oracle users,
    We are planning to buy the new server for oracle database 10g standard edition. We put oracle database file, redo logs, and flash recovery area on each of disk array. My question is what is the best disk array configuration for redo logs and flash recovery area? RAID 10 or RAID 1? Is that possible we can duplicate Flash recovery area to the other location (such as net work drive) at the same time? Since we only have single disk array controller to connect to the disk arrays, I am try to avoid the single failure that will lose archive logs and daily backup.
    thanks,
    Belinda

    Thank you so much for the suggestion. Could you please let me know the answer for my question of FRA redundancy?
    “Is that possible we can duplicate Flash recovery area to the other location (such as net work drive) at the same time? Since we only have single disk array controller to connect to the disk arrays, I am try to avoid the single failure that will lose archive logs and daily backup.”

  • Multiplexing redo logs and control files to a separate diskgroup

    General question this one...
    I've been using ASM for a few years now and have always installed a new system with 3 diskgroups
    +DATA - for datafiles, control files, redo logs
    +FRA - for achive logs, flash recovery. RMAN backup
    Those I guess are the standards, but I've always created an extra (very small) diskgroup, called +ONLINE where I keep multiplexed copies of the redo logs and control files.
    My reasoning behind this is that if there are any issues with the +DATA diskgroup, the redo logs and control files can still be accessed.
    In the olden days (all those 5 years ago!), on local storage, this was important, but is it still important now? With all the striping and mirroring going on (both at ASM and RAID level), am I just being overtly paranoid? Does this additional +ONLINE diskgroup actually hamper performance? (with dual write overheads that are not necessary)
    Thoughts?

    Some of the decision will probably depend on your specific environment's data activity, volume, and throughput.
    Something to remember is that redo logs are sequential write, which benefit from a lower RAID overhead (RAID-10, 2 writes per IOP vs RAID-5, 4 writes per IOP). RAID-10 is often not cost-effective for the data portion of a database. If your database is OLTP with a high volume of random reads/writes, you're potentially hurting redo throughput by creating contention on the disks sharing data and redo. Again, that depends entirely on what you're seeing in terms of wait events. A low volume database would probably not experience any noticeable degraded performance.
    In my environment, I have RAID-5 and RAID-10 available, and since the RAID-10 requirement from a capacity perspective for redo is very low, it makes sense to create 2 diskgroups for online redo, separate from DATA, and separate from each other. This way, we don't need to be concerned with DATA transactions impacting REDO performance, and vice versa, and we still maintain redo redundancy.
    In my opinion, you can't be too paranoid. :)
    Good luck!
    K

  • Multiplexing Redo Log and maximum protection mode.

    Assume that during writing into redo logs the instance crashes. As a result, members of active redo group are not synchronized, some of them had more data. How Oracle will handle this when instance starts? And there can be case when at startup time some members that had more redo before crash, are lost.
    Now assume that we have standby database with maximum protection mode. After LGWR has written to local redo logs and before writing to standby redo logs, primary instance crashes. In this case standby site lost last transaction.
    Is it correct? Thanks.

    Assume that during writing into redo logs the instance crashes. As a result, members of active redo group are not synchronized, some of them had more data. How Oracle will handle this when instance starts? And there can be case when at startup time some members that had more redo before crash, are lost.
    Members of a particular group are written concurrently by LGWR, all members of a log group will have same data.  If any member of a particular group is lost or not reachable, oracle will read from the available log member during instance recovery.
    Multiplexing Redo Log Files
    http://docs.oracle.com/cd/B19306_01/server.102/b14231/onlineredo.htm#i1006249
    To answer your second question,In this mode no transaction commits on primary unless the redo is also written on atleast one standby database, otherwise primary will go down.
    Check below
    Maximum Protection
    http://docs.oracle.com/cd/B28359_01/server.111/b28294/protection.htm#CHDHFHJI

  • Redo Log and Supplemental Logging related doubts

    Hi Friends,
    I am studying Supplemental logging in detail. Have read lots of articles and oracle documentation about it and redo logs. But couldnot found answers of some doubts..
    Please help me clear it.
    Scenario: we have one table with primary key. And we execute an update query on that table which is not using the primary key column in any clause..
    Question: In this case, does the redo log entry generated for the changes done by update query contain the primary columns values..?
    Question: If we have any table with primary key, do we need to enable the supplemental logging on primary columns of that table? If yes, in which circumstances, do we need to enable it?
    Question: If we have to configure stream replication on that table(having primary key), why do we actually need to enable its supplemental logging ( I have read the documentation saying that stream requires some more information so.., but actually what information does it need. Again this question is highly related to the first question.)
    Also please suggest any good article/site which provide inside details of redo log and supplemental logging, if you know.
    Regards,
    Dipali..

    1) Assuming you are not updating the primary key column and supplemental logging is not enabled, Oracle doesn't need to log the primary key column to the redo log, just the ROWID.
    2) Is rather hard to answer without being tautological. You need to enable supplemental logging if and only if you have some downstream use for additional columns in the redo logs. Streams, and those technologies built on top of Streams, are the most common reason for enabling supplemental logging.
    3) If you execute an update statement like
    UPDATE some_table
      SET some_column = new_value
    WHERE primary_key = some_key_value
       AND <<other conditions as well>>and look at an update statement that LogMiner builds from the redo logs in the absence of supplemental logging, it would basically be something like
    UPDATE some_table
      SET some_column = new_value
    WHERE rowid = rowid_of_the_row_you_updatedOracle doesn't need to replay the exact SQL statement you issued, (and thus it doesn't have to write the SQL statement to the redo log, it doesn't have to worry if the UPDATE takes a long time to run (otherwise, it would take as long to apply an archived log as it did to generate the log, which would be disasterous in a recovery situation), etc). It just needs to reconstruct the SQL statement from the information in redo, which is just the ROWID and the column(s) that changed.
    If you try to run this statement on a different database (via Streams, for example) the ROWIDs on the destination database are likely totally different (since a ROWID is just a physical address of a row on disk). So adding supplemental logging tells Oracle to log the primary key column to redo and allows LogMiner/ Streams/ etc. to reconstruct the statement using the primary key values for the changed rows, which would be the same on both the source and destination databases.
    Justin

  • Best practice - online redo logs and virtualization

    I have a 10.1.0.4 instance (soon to be migrated to 11gr2) running under Windows Server 2003.
    We use a non-standard disk distribution scheme -
    on the c: drive we have oracle_home as well as directories for control files and online redo logs.
    on the d: drive we have datafiles
    on the e: drive we have archive log files and another directory with online redo logs and another copy of control file
    my question is this:
    is it smart practice to have ANY online redo logs or control file on the same spindle with archive logs?
    Our setup works fairly well but we are in the process of migrating the instance first to ESX server and SAN and then secondly to 11gtr2 64bit under server 2008 64 and when we bring up our instance on the VM for testing we find that benchmarking the ESX server (dual Xeon 3.4ghz with 48gb RAM running against FalconStor NSS SAN with 15k SAS disks over iSCSI) against the production physical server (dual Xeon 2.0ghz with 4gb RAM using direct attached SATA 7200rpm drives) we find that some processes run faster on the ESX box and some run 40-100% slower. Running Statspack seems to identify lots of physical read waits as well as some waits for redo and controlfiles.
    Is it possible that in addition to any overhead introduced by ESX and iSCSI (we are running Jumbo Frames over 1gb) we may have contention because the archive logs are on the same "spindle" (virtual) as the online redo and control files?
    We're looking at multiple avenues to bring the 2 servers in line from a performance standpoint - db configuration, memory allocation, possible move to 10gb network, possible move to SSD storage tray, possible application rewrites. But from the simplest low hanging fruit idea, if these files should not be on the same spindle thats an easy change to make and possibly eke out an improvement.
    Ideas?
    Mike

    Hi,
    "Old" Oracle standard is to use as many spindles as possible.
    It looks to me, you have only 1 disk with several partitions on it ??
    In my honest opinion you should anyway start by physically seperating OS from Oracle, so let the C: drive to the Windows OS
    Take another physical seperate D: drive to install you application.
    Use yet another set of physical drives, preferably in RAID10 setup, for your database and redo logs
    And finally yet another disk for the archive logs.
    We have recently configured a Windows 2008 server with an 11G Db, which pretty much follows the above setup.
    All non RAID10 disks are RAID1 ( mirror ) and we even have some SSD's for hot tables and redo-logs.
    The machine, or must I say the database, operates like a high speed train, very, very fast.
    Ofcourse keep in mind the number of cores ( not only for licensing ) and the amount of memory.
    Try to prevent the system from swapping, because that is a performance killer!
    Edit: And even if you put a virtual layer in between, try to seperate the virtual disks as much as possible over physical disks
    Success!
    FJFranken
    Edited by: fjfranken on 7-okt-2011 7:19

  • Location of Redo log and control files?

    Dear all,
    I am checking the location of redo log and control files, but found that the redo log file (like log02a.dbf ....) in the same directory of data files. However, I couldn't find any control files in the data files directries.
    What could be the location of control files?
    Amy

    select name
      from v$controlfile
    or
    show parameter control_filesKhurram

  • The file structure online redo log, archived redo log and standby redo log

    I have read some Oracle documentation for file structure and settings in Data Guard environment. But I still have some doubts. What is the best file structure or settings in Oracle 10.2.0.4 on UNIX for a data guard environment with 4 primary databases and 4 physical standby databases. Based on Oracle documents, there are 3 redo logs. They are: online redo logs, archived redo logs and standby redo logs. The basic settings are:
    1. Online redo logs --- This redo log must be on Primary database and logical standby database. But it is not necessary to be on physical standby database because physical standby is not open. It doesn't generate redo log. However, if don't set up online redo log on physical standby, when primary failover and switch standby as primary. How can standby perform without online redo logs? In my standby databases, online redo logs have been set up.
    2. Archived redo logs --- It is obviously that primary database, logical and physical standby database all need to have this log file being set up. Primary use it to archive log files and ship to standby. Standby use it to receive data from archived log and apply to database.
    3. Standby redo logs --- In the document, it says A standby redo log is similar to an online redo log, except that a standby redo log is used to store redo data received from another database. A standby redo log is required if you want to implement: The maximum protection and maximum availability levels of data protection and Real-time apply as well as Cascaded destinations. So it seems that this standby redo log only should be set up on standby database, not on primary database. Am my understanding correct? Because I review current redo log settings on my environment, I have found that Standby redo log directory and files have been set up on both primary and standby databases. I would like to get more information and education from experts. What is the best setting or structure on primary and standby database?

    FZheng:
    Thanks for your input. It is clear that we need 3 type of redo logs on both databases. You answer my question.
    But I have another one. In oracle ducument, it says If you have configured a standby redo log on one or more standby databases in the configuration, ensure the size of the current standby redo log file on each standby database exactly matches the size of the current online redo log file on the primary database. It says: At log switch time, if there are no available standby redo log files that match the size of the new current online redo log file on the primary database. The primary database will shut down
    My current one data gurard envirnment setting is: On primary DB, online redo log group size is 512M and standby redo log group size is 500M. On the standby DB, online redo log group size is 500M and standby redo log group size is 750M.
    This was setup by someone I don't know. Is this setting OK? or I should change Standby Redo Log on standby DB to 512M to exactly meatch with redo log size on primary?
    Edited by: 853153 on Jun 22, 2011 9:42 AM

  • Dataguard lost both Primary redo log and standby redo log files

    Hi,
    I am new to data guard, i came acorss a scenario where we loose both primary redo log file and standby redo log files.
    Can someone please help me understand how to recover from this situation.
    Thanks!

    >loose both primary redo log file and standby redo log files
    We have to be very clear.
    There are (set A) online redo log files  and (set B) standby redo log files at (location 1) Primary and (location 2) Standby.
    The standby redo log files, depending on the configuration, aren't strictly mandatory.  The standby can be applying redo without online redo log files present as well, depending on how it was setup.
    So, the question is  : Did you lose online redo log files at the primary ?  Didn't the primary shutdown itself then ? If so, you have to do an incomplete recovery at the primary OR switch over to the standby (which may or may not have received the last transaction, depending on how it was configured and operating)   OR restore from the standby (again, with possible loss of transactions) to the primary.
    Hemant K Chitale

  • Fundamental questions on redo logs and rollbacks

    Hi all,
    Some basic questions, I really want to understand it very clearly.
    Suppose that we have updated few records in a table. We know that the blocks to be updated will be fetched into buffer cache, they will be updated with new value and commited eventually. The questions I have are ,
    1) What exact information will go to redo log ? is it a copy of the block before change and copy of the block after change ?
    2) What exactly goes to rollback segment? is it copy of block before change (for update) and just the rowid for inserted row and the copy of block for a deleted row ?
    3) Whatever we do, is it the whole block that goes to redo or rollback ? Means if there are 10 rows in the block and we update one of them, still whole block goes to redo or rollback ?
    4) If we rollback, what goes where ? Is there anything that goes to redo if we rollback ?
    Please explain.
    Thanks.

    Redo stores changes made in the database, and undo/rollback stores the reverse of those changes. Data blocks may be changed prior to a commit, and recorded in both locations.
    So, when a database is recovered, redo is applied to the backup datafiles, rolling every change forward, and then undo is applied to reverse any uncomitted transactions.
    Undo/rollback can also be used simply to roll back a transaction in an active instance. Redo is only used during instance recovery.
    I don't know if this is tracked via the storage of block images, or if it just stores the change itself.
    -cf

  • Multiplex Redo Logs and Control File

    I am wanting to setup an existing Oracle Express 10g instance to multiplex the redo log files and the control file.
    Instance is using Oracle-Managed Files and the Flash Recovery Area.
    With these options being used what are the steps required to setup multiplexing?
    I tried setting the DB_CREATE_ONLINE_LOG_DEST_1 and DB_CREATE_ONLINE_LOG_DEST_2 parameters but this doesn't appear to have worked (I even bounced the db instance).
    BTW, the DB_CREATE_FILE_DEST is set to null and the DB_RECOVERY_FILE_DEST is set to the flash recovery area.
    Any help is much appreciated.
    Regards, Sheila

    Thanks for this. My instance originally had two log groups so I've added a new member to each group into the same flash recovery area directory, but have assigned a name. Is this why when I query v$logfile the is_recovery_dest_file is set to NO? Is it ok to assign a name & directory and if not, how do you add a new memeber and allow Oracle-Managed files to name them?
    Also, how can I check that the multiplexing is working (ie the database is writing to both sets of files)?
    Thanks again.

  • How could I find specified date of REDO log and archive REDO log ?

    we use Oracle11gr2 on win2008R2.
    1
    How could I find specified date of REDO log(2013/10/17,etc) and archive REDO log ?
    2
    What is the format of archive REDO log.? (zipped file ?)

    user12075536123 wrote:
    1)
    select * from v$archived_log;
    select * from v$log_history;
    but there is a possibility there is no old data
    below contains no filename column
    SQL> desc v$log_history
    Name                                      Null?    Type
    RECID                                              NUMBER
    STAMP                                              NUMBER
    THREAD#                                            NUMBER
    SEQUENCE#                                          NUMBER
    FIRST_CHANGE#                                      NUMBER
    FIRST_TIME                                         DATE
    NEXT_CHANGE#                                       NUMBER
    RESETLOGS_CHANGE#                                  NUMBER
    RESETLOGS_TIME                                     DATE
    there is NO data when archive mode is disabled

  • Redo log and Disk Full

    hi
    all
    i'm new oracle DBA. i had one problem is
    my Database is in archive mode. now redo log is available but not archive and my disk is full. so i couldn't open my Database what i have to do next step please help me...
    Thanks in advance
    Dharmesh
    null

    Take a proper copy of all the archived log files from the archive destination to some backup media like tape(for future recoverability) and delete them off from the disk to avail for space on the disk.
    You will then be able to open your DB and proper archiving will take place.
    What is happening?
    The ARCHiver process is finding no space on the disk to archive the redo log files and thus Oracle stops doing any further action since it is in archive log mode.

  • Redo log and buffer size

    Hi,
    i'm trying to size redolog and the buffer size in the best way.
    I already adjusted the size of the redo to let them switch 1/2 times per hour.
    The next step is to modify the redo buffer to avoid waits.
    Actually this query gives me 896 as result.
    SELECT NAME, VALUE
    FROM V$SYSSTAT
    WHERE NAME = 'redo buffer allocation retries';
    I suppose this should be near to 0.
    Log_buffer is setted to 1m.
    And i read "sizing the log buffer larger than 1M does not provide any performance benefit" so what can i do to reduce that wait time?
    Any ideas or suggestions?
    Thanks
    Acr

    ACR80,
    Every time you create a redo entry, you have to allocate space to copy it into the redo buffer. You've had 588 allocation retries in 46M entries. That's "close to zero"..
    redo entries 46,901,591
    redo buffer allocation retries 588The 1MB limit was based around the idea that a large buffer could allow a lot of log to accumulate between writes with the result that a process could execute a small transaction and commit - and have to wait a "long" time for the log writer to do a big write.
    If in doubt, check the two wait events:
    "log file sync"
    "log buffer space".
    As a guideline, you may reduce waits for "log buffer space" by increasing the size of the log buffer - but this introduces the risk of longer waits for "log file sync". Conversely, reducing the log buffer size may reduce the impact of "log file sync" waits but runs the risk of increasing "log buffer space" waits.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

Maybe you are looking for

  • User ID fault

    Today I purchases a TV series from itunes.  One episode downloaded.  The other two went to the cloud of their own accord.  When I tried to watch them I got this message. "You can download past purchases on this computer with just one Apple ID every 9

  • Oracle Application Server 10g Forms and Reports Services

    Hi there, I want to install Oracle Application Server 10g Forms and Reports Services. What must I download? The installation guide says that "Oracle Application Server 10g (9.0.4) Forms and Reports Services allows you to install and configure Forms a

  • SAPMYSPWS90300092COD required to be deleted

    Hi Experts, I am working with a problem in Production system. We are getting a syntax error in the SAPMYSPWS90300092COD program. This program seems to be related to some workflow. My question is , how to determine with which workflow is this program

  • Best screen capture for using with premiere elements?

    i have been scouring the net to figure out how to get better results than what i'm getting with the camstudio (love the program, and it looks great until i pull it into premiere). I have read that it can be a codec issue or an fps issue, but before i

  • Calculate shipping charges using javascript

    I have a pdf order form that I am creating to email customers.  I need to create a shipping field in which the value is a flat rate depending on the subtotal.  Example if subtotal is less than $150 then shipping = $15.  If $250 > subtotal > $150 ship