What's the point of redo logs?

Why does Oracle bother writing everything to redo logs? If it's going to write data changes to the disk, why not just write them once to the data files and be done with it? What's the point of doing it twice? And if it's a redundancy thing, why not mirror the data disks?

Hemant K Chitale wrote:
How would you backup a database while it is in use ? You can't lock all the datafiles to prevent writes to them. Yet, transactions may be updating different blocks in different datafiles even as the backup is in progress. Say your backup starts with datafile 1 (or even datafiles 1,2,3,4 in parallel) at time t0. By time t5, it has copied 20% of the datafile to tape or alternate disk backup location. Along comes a transaction that updates the 100th block (somewhere within the 10-11% range) of datafile 1 and also the 60th block of datafile 5. Meanwhile, the backup continues running, already having taken a prior image of the 100th block and not being aware that the block has been changed. At time t25 it completes datafile 1 (or datafiles 1,2,3,4) and starts backing up datafile 5. Now, when it copies the 60th block of datafile 5, it (the backup utility) doesn't know that this block is inconsistent with the backup image of the 100th block of datafile 1.
Instead of 1 transaction imagine 100 or 1000 transactions occurring while the backup is running.
Surely, Oracle must be able to regenerate a consistent image of the whole database when it is restored ?
That is what the Redo stream provides. The Redo stream is written to Archivelogs so that it can be backed up -- no Archivelog file is "in flux" (particularly if you use RMAN to backup the Archivelogs as well !).
Had Oracle been merely writing to the datafiles alone, without a Redo stream, there is no way it could recreate a consistent database -- whether after Crash Recovery OR after Media Recovery.Interesting point about how redo logs facilitate backups. So what you're saying is that the redo logs help keep the data in the actual data files in a consistent state by only writing full transactions to them at a time. Presumably Oracle will either write out the redo log data to the data files before a backup or will at least prevent the redo logs from writing to the data files during a backup. I always wondered how databases got around that problem of keeping the system available for writing during a backup. I wonder how SQL Server does it.
Hemant K Chitale wrote:
Now, approach this from another angle. A database consists of 10 or 100 or 500 datafiles. You have 10 or 100 or 1000 sessions issuing COMMITs to complete their transactions, which could be of 1 row or 100 rows or 1million rows, each transaction of a different size. Should the 1000 sessions be forced to wait while Oracle writes all those updated blocks to disk in different datafiles -- how many blocks can it write in "an instant" ?
But what if Oracle manages to write much less information -- the bare minimum (called "change vectors") to re-play every transaction to a single file serially ? That would be much faster. Imagine writing to 500 datafiles concurrently, having to open the file, progess to the required block address and update the block, for each block changed in each file VERSUS writing much lesser information serially to a single file -- if the file is full, switch to another file, but keep writing serially.As to your second point, I don't really have a good enough understanding about the format of redo logs vs. the data files to follow you totally. Are you saying that it takes more time to write to the data files because you have to find the proper place in the B-Tree before you can write to it? And that doing that is slower than just opening the redo log and always appending new information to the very end? Maybe so, but it seems like all transactions having to write to a single redo log in serial would slow things down since there would be a ton of contention for one file. Whereas with the data files, you could potentially have several transactions writing to different files simultaneously (provided you hardware would support doing that). And it seems to me like a change vector would contain a lot more information than a field value, but, like I said, I'm not really familiar with the format.

Similar Messages

  • What is the point of XML formatted alert log in 11g?

    DB version: 11.1.0.6.0
    OS : RHEL 5
    What is the point of have XML formatted alert log in 11G?
    When i tried to open in Internet Explorer
    Only one top level element is allowed in an XML document. Error processing resource 'file:///D:/Work/FILES/log.xm...
    <msg time='2011-01-27T19:42:53.484+08:00' org_id='oracle' comp_id='rdbms'I got a similair error with FireFox. How is the XML alert log file used in diagnosis?

    It is used by the ADRCI command line utility:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/adrci.htm#BGBBBBEA

  • How to increase the size of Redo log files?

    Hi All,
    I have 10g R2 RAC on RHEL. As of now, i have 3 redo log files of 50MB size. i have used redo log size advisor by setting fast_start_mttr_target=1800 to check the optimal size of the redologs, it is showing 400MB. Now, i want to increase the size of redo log files. how to increase it?
    If we are supposed to do it on production, how to do?
    I found the following in one of the article....
    "The size of the redo log files can influence performance, because the behavior of the database writer and archiver processes depend on the redo log sizes. Generally, larger redo log files provide better performance, however it must balanced out with the expected recovery time.Undersized log files increase checkpoint activity and increase CPU usage."
    I did not understand the the point however it must balanced out with the expected recovery time in the above given paragraph.
    Can anybody help me?
    Thanks,
    Praveen.

    You dont have to shutdown the database before dropping redo log group but make sure you have atleast two other redo log groups. Also note that you cannot drop active redo log group.
    Here is nice link,
    http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_34.shtml
    And make sure you test this in test database first. Production should be touched only after you are really comfortable with this procedure.

  • How to know the delay in redo log apply on Active Dataguard 11g

    Hello All,
    How to know the delay in redo log apply on Active Dataguard 11g...
    Do we need to wait till log switch occurs?
    Or is it recommended to schedule a log switch every 15 min, no matter data is updated/inserted or not in primary?
    Please suggest...
    Oracle : oracle 11g Release 2
    OS : RHEL 5.4
    Thanks
    Edited by: user1687821 on Feb 23, 2012 12:02 AM

    Hello CKPT,
    Thank you for the valuable information...
    We have not configured databroker.
    Output of the query
    SELECT * FROM (
    SELECT sequence#, archived, applied,
    TO_CHAR(completion_time, 'RRRR/MM/DD HH24:MI') AS completed
    FROM sys.v$archived_log
    ORDER BY sequence# DESC)
    WHERE ROWNUM <= 10
    Primary...
    SEQUENCE#     ARCHIVED     APPLIED     COMPLETED
    29680          YES          YES     2012/02/23 01:11
    29680          YES          NO     2012/02/23 01:11
    29679          YES          NO     2012/02/22 23:11
    29679          YES          YES     2012/02/22 23:11
    29678          YES          YES     2012/02/22 23:11
    29678          YES          NO     2012/02/22 23:11
    29677          YES          YES     2012/02/22 22:32
    29677          YES          NO     2012/02/22 22:32
    29676          YES          YES     2012/02/22 22:02
    29676          YES          NO     2012/02/22 22:02
    Standby...
    SEQUENCE# ARC APP COMPLETED
    29680 YES YES 2012/02/23 01:11
    29679 YES YES 2012/02/22 23:11
    29678 YES YES 2012/02/22 23:11
    29677 YES YES 2012/02/22 22:32
    29676 YES YES 2012/02/22 22:02
    29675 YES YES 2012/02/22 21:24
    29674 YES YES 2012/02/22 19:24
    29673 YES YES 2012/02/22 18:59
    29672 YES YES 2012/02/22 17:42
    29671 YES YES 2012/02/22 17:41
    Primary shows yes as well as no...
    Next,
    From primary:-
    SQL> select thread#,max(sequence#) from v$archived_log group by thread#;
    THREAD#     MAX(SEQUENCE#)
    1     29680
    From standby:-
    SQL> select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
    THREAD# MAX(SEQUENCE#)
    1 29680
    What is the redo transport service you are using? is it LGWR or ARCH ?
    Output of query select * from v$parameter where name like 'log_archive_dest_2' shows below value...
    SERVICE=b_stdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=b_stdb
    So is it lgwr already configured...? if yes then how do i see the delay in both servers..
    Yes, the network is good as they both resides in same LAN within same rack
    Thanks...

  • Seriously, what is the point in Firefox 29 in removing from Sync the ability to copy all the settings on Device A to Device B?

    Sync used to work, albeit clunkily before Firefox 29. Now it does nothing at all in Firefox 29. What is the point? Bring back Sync functionality so we can copy all the tabs, bookmarks, passwords, and history from Device A to Device B.

    Tyler - Yes I have, yes they are, and yes they are.
    No, Sync is very different in Firefox 29. Before, you could pair a device and specify that you want copy all the tabs, history, bookmarks, and passwords on Device A to Device B and it would do it. It worked. Now in Firefox 29 you upgrade, you log in, you ask it to Sync and nothing happens. It does not work.

  • What's the point of recovery partition when I have to DL the whole thing anyway?

    Well I was supposed to sell my Macbook Air today.
    I tried booting CMD-R into the recovery partition and instead it went to some online thing.
    So then I booted Option, into the recovery partition and clicked on Reinstall Mountain Lion.
    Next thing ya know its got me logging into the Apple Store and now it has a 7 hour download.
    So what is the point of the recovery partition if it can't do a fresh copy of Mountain Lion?  What exactly is it to help me recover from?  What if I was in the hills of Indonesia and tried to do this?
    Any now I can't sell this thing until tomorrow as I have a seven hour download wait ahead of me.  Had I knows, I would have let that be the new owners problem.  Or somehow made a backup of ML previously.
    Silly Apple. Always advertising something so great that turns out to be useless.

    The silly part is not alerting the user that when you download and install that the .ESD installer package will be deleted and to make a copy of it.
    The system you download - guesstimates can be way off - check with speedtest.net - is associated with YOU and your Apple ID and the best thing to do is any OEM material and a blank hard drive - and printout of ML Recovery Mode tech article on doing an internet based install.
    Yes you could have setup a 4GB installer flash drive or on your hard drive. Yes they could maintain that 4GB on a larger Recovery partition (it is less than 1GB).
    Create an OS X Lion Install disc
    OS X Lion Install to Different Drive
    How to create an OS X Lion installation disc MacFixIt
    Migration Assistant Update for Mac OS X Snow Leopard
    http://www.apple.com/support/lion/installrecovery/
    http://reviews.cnet.com/8301-13727_7-20080989-263/how-to-create-an-os-x-lion-ins tallation-disc
    http://www.coolestguyplanettech.com/how-to-make-a-bootable-osx-10-8-mountain-lio n-disc-or-drive-from-the-downloaded-mountain-lion-app/

  • What's the point of FileVault?

    Of the many recent changes and updates that Lion offers, FileVault has me a little baffled.  What's the point of it?  Does it allow me to encrypt my files and folders with a password?  If so, I haven't seen that option yet.  After turning on FileVault, Lion started the process of encrypting my files (so it says) but without the option to enable a password for folders and programs, I'm not sure I understand what purpose it serves.

    I use FileVault on all of my systems, which include two MacBook Pro systems (one with dual hard drives), a Mac Mini, and an XServe, and have enabled it on numerous other Macs that colleagues have used, and also enable encryption on most of my external hard drives.
    You can clone your encrypted drive, though you might have troubles doing block-level clones. Once the drive is unlocked and mounted the system treats it as any other drive, and you can use Carbon Copy Cloner or another cloning tool to file-level clone your drive. The problem with cloning Lion drives with file-level cloning is you will not copy the hidden Recovery HD partiton, but this hurdle is present regardless of whether or not you have FileVault 2 enabled. However, it only takes a few more steps to restore the Recovery HD partition when cloning or restoring your system from backup (it just takes remembering to do so, since cloning is not officially supported by Apple as a backup/recovery routine).
    Installing new applications and managing documents is seamless, and is the same as if you install them on any other OS X system. The encryption happens underneath the OS, so OS X, documents, and applications you use are unaware of it and work as they would on any system.
    Your concerns about losing the password are good ones, but if you already set your system to use the login window instead of automatic login then there is no difference (the regular use of the login window ensures you remember your password). The same password is used to unlock the drive and then log into your account once the system is booted. The difference with login is that you will need to specify the users who are able to unlock the drive (done in the FileVault system preferences). If a user is not, then the initial login window will not show that user account, and to get to that account another user will have to log in, and then log out so the unauthorized user can access his account.
    In terms of performance problems, I've not seen any in my uses (primarily office and computational analysis with programs such as Igor Pro, Matlab); however, I use SSDs in my systems so this greatly increases overall performance and results will likely be different if you are using the slower classic HDD technology.

  • What Is The Point Of The Login & Keychain Update?

    I installed Leopard on Friday.
    It did not and still does not recognise my Username and/or Password.
    I note that a Login & Keychain Update has appeared in Software Update, its purpose being to address login & password issues "where the password is 8 or more characters".
    (1) I cannot install the Update because Leopard does not recognise my password.
    (2) My password is only 7 digits long yet I'm still unable to access my iMac properly.
    What's the point of issuing an Update for people who are unable to install it?

    Hopefull you will have already seen other posts explaining how to get past the login problem. This worked for me:
    1 Boot up from the install disc (hold down C key when restarting).
    2 Launch the installer as if you are going to install.
    3 From the Utilities menu, select reset Passwords
    4 In the username field type: System Administrator (root)
    5 In the password field type the password you want to use
    6 Quit the change passwords app
    7 From utilities, select Start Up Disk. Choose you HD as the start up disc and restart
    8 Once restarted, select accounts from the System Preferences menu
    9 Click the lock at the bottom left
    10 When asked for username and password, enter System Administrator as the username and the password you changed earlier as the password
    11 Click the enable user to administer computer check box for your account. Your account should now change from Standard to Admin.
    After I did that I could log in and download the software update. I was connecting via Ethernet. However, once thte update was installed my PB G4 stated that I do not have an airport card installed (which I obviously do). I still haven't found anything that works for me to fix that. I have given up for the moment.
    Hope this helps

  • I am extremely upset. I purchased my iPad in SA and I am traveling in Greece. When I want to make use of the free apps, I get a message that the app is not available in the SA store. What is the point of having an iPad if you cannot use it worldwide?

    I am extremely upset. I purchased my iPad in SA and now I am in Greece. I cannot download free apps as I get a message that the apps are not available in the SA store and only in US stores. When I change to the US store the same thing happens. What is the point of having an iPad if I cannot use it worldwide??? I feel that I wasted my money purchasing it as I specifically purchased it to use when I travel. How can I get access to all the available apps and why are they restricted.

    You can use your iPad worldwide. However, each AppleID is tied to
    a specific country's store. To use the AppStore in any country, you
    must be in that country and have a credit/debit card issued by a financial
    institution in that country with a verified billing address in that country.
    It is the developer's choice which AppStores he makes his app available
    from, and some countries prohibit certain apps.
    To make a purchase from the US store (including downloading a free app
    available in the US store), you must be in the US and have card issued
    in the US with verified billing address in the US.
    You can use your purchases from the SA store worldwide, but you
    cannot make purchases in other than the SA store unless you meet
    the aforesaid conditions.

  • What is the point of the download window if you use stacks?

    Greetings,
    One of the most annoying things about the download window was the fact that the window always hung around after completing dowloads in Tiger when using safari. To me, that was just a time waster of always pressing Apple+W to close that window.
    When Leopard was released, I was excited to realize that one function of the download stack was to recevie downloads from safari after completed. However, after completion, the download window still sticks around and I still have to close it... then navigate to my stack of downloads to mount the image. What is the point of the download window is I use stacks now? Why can't the window disappear after completion?
    //Cheers

    Aaargh!! Me too - it's so annoying! Firefox has a downloads window as well - I just don't see the point of it. I didn't like it in Tiger either.
    As a way to see the progress of downloads, it's fine, but it should at least close when all the downloads are finished, and completed downloads should not display.
    Ideally it should look & work exactly like the Copy window in Finder - the one that comes up when you are copying or moving a large file or number of files from one folder to another.
    Is there a hack that will make it work like that?

  • My wifes iphone was too full to record a video so I upgraded her cloud storage to 20g and did mine at same time. Cloud is showing 15g free storage butshe still cannot take any mor photos as "not enough memory" What is the point of paying for the extr

    My wifes iphone was too full to record a video so I upgraded her cloud storage to 20g and did mine at same time. Cloud is showing 15g free storage butshe still cannot take any mor photos as "not enough memory" What is the point of paying for the extr

    Hello Pushtheriver,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning iCloud storage issues:
    Get help using iCloud storage
    This may also help:
    Understanding iOS device capacity
    You can sync and download many different types of content on your device. Some types of content (such as music and videos) typically take more space than others (such as notes and books). The amount of space taken by an app depends on the app's purpose; complex or graphically intense apps usually take more space than simpler apps.
    If your device is near its capacity, you can remove some of the less used content to make room for more.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • What's the point of warranty?

    I am a student coming from Hong Kong  to London for postgraduate study. Before I left Hong Kong, I decided to buy a netbook for my lecturers in the UK. Lenovo s10-2 was chosen because the version available in HK comes with 6 cell battery with international warranty and Lenovo Protection Service (against accidental damage).
    This is the first Lenovo machine for me. All was well and I was starting to appreciate Lenovo. Suddenly, the LED screen started to flick with white lines moving across the it, just two weeks after I bought it from Hong Kong.
    Yesterday, I called the UK support line who initially suggested replacement (because the purchase is last than 30-day old). However, when the agent found out that I bought the machine in Hong Kong, he said I could only get it repairs. Fair enough.
    I packed the netbook this afternoon ready to ship it to the repair center. Being not sure about whether or not my proof of purchase was needed, I called the support line again. This time, the agent gave me a "friendly warning" or maybe a management of my expectations.
    I was told that Lenovo believes that there is a 99.5% chance that these type of problems are due to “internal damages" caused by users! I was also advised that sending the machine in for repairs risk myself getting into paying 230 pounds (pretty much the purchase cost) to get the LED screen fixed because it is likely to be not covered by warranty. On top of that, I would have to pay 65 pounds even if I want my netbook back after inspection without getting fixed because again, 99.5% chance that "damages by users" would be concluded!
    What's the point of warranty? Totally unacceptable. Any thoughts? Should I take the risk?
    I only got the machine just over two weeks ago and used for less than 10 times!

    seblee,
    This bears a bit of looking into to provide you the best answer.   Sometimes, the accidental damage policies are only valid in the home country, and I would like to check.  If that were to be the case, you would have replacement or repair options in HK, but standard warranty terms would likely apply in UK.
    Your situation sounds exceptional, and I'd like to look into this and see what can be done.
    Can your send me a private message with your contact information and the serial number from the bottom of the unit?
    Sorry that you are having this trouble.  Will see how we can help.
    Mark
    ThinkPads: S30, T43, X60t, X1, W700ds, IdeaPad Y710, IdeaCentre: A300, IdeaPad K1
    Mark Hopkins
    Program Manager, Lenovo Social Media (Services)
    twitter @lenovoforums
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • What is the point of Precision and Scale in Number Type?

    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
          COL1
    223.993939
    88.228384
          9.34
             0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?

    Omega3 wrote:
    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
    COL1
    223.993939
    88.228384
    9.34
    0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?Lots of business requirements for specific precisions and scales.
    A persons Age may required to be stored as whole numbers of no more than 3 digits.
    A sum of money may required to be stored with no more than 2 decimal places of accuracy e.g. GB Pounds and Pence or US Dollars and Cents
    A unit of length may required to be stored in metres with 2 decimal places for centimetres
    A shoe size may be required to be stored with one decimal place for half sizes
    etc.
    etc.
    Yes, you may just create all of them as generic NUMBER datatype, but creating them with precision and scale can provide additional information about the limitations expected for the values stored, especially for things like reporting tools that may use the specified precision and scale to determine how to display the values automatically (by default).
    If you start questioning "what's the point?" then you may as well say what's the point in having a NUMBER datatype when we can store numbers in a VARCHAR2 datatype? or what's the point in having a DATE datatype when we can stored dates as VARCHAR2 datatype? etc.
    No point in asking such a question because there's almost always a point to these things (and if there isn't they get deprecated in later versions).

  • What is the point of having indented levels in course outlines?

    What is the point of having indented levels in course outlines? It's not possible to add any materials or posts to this. I want to avoid having simply a long list of topics that are difficult to manage. When I create a topic in the outline, I can indent it, but then I can't add any posts to it as it doesn't even show up as a heading in course manager.
    I've been trying to have some kind of logical organisation of materials, but the only thing you seem to be able to do is have a long list of topics.
    Which makes me wonder why the possibility of indenting levels is there at all - it seems to be a completely worthless item.

    I guess the point of the indented lists is to provide the user with some description of the topic’s contents. It's a standard convention in the table of contents of books. It might pay to break your course down into a number of courses if the list of topics is getting too unwieldy.

  • HT5287 If DVD Movies, Audio CD's and even burning CD and DVD's are not supported, what is the point of DVD & CD Sharing then? Wouldn't it just be better to remote in or use a thumb drive if it's only able to be used for data transfer?

    If DVD Movies, Audio CD's and even burning CD and DVD's are not supported, what is the point of DVD & CD Sharing then? Wouldn't it just be better to remote in or use a thumb drive if it's only able to be used for data transfer?
    Or am I missing the bigger picture?

    As long as you have a Superdrive or an external burner/drive, burning, watching, installing, etc. from CD or DVD will work just fine. And so will sharing.

Maybe you are looking for

  • Cannot update iPad 2 to iOS 5.1?

    Hi everyone! I recently got an iPad from my cousin for my birthday. She registered it under her Apple ID at first, but when I got it I re-registered it as mine. She had previously marked it as "Manually manage music and videos". So...when I tried to

  • My facetime and immesage are not activating. So should I upgrade my iPhone 4 from ios 6 to ios 7 ?

    My facetime and immesage are not activating. So should I upgrade my iPhone 4 from ios 6 to ios 7 ?

  • My iSync is in German How do I get it back to English?

    After downloading and installing the PPC combined update to 10.4.8, iSync and only iSync appears in German! Everything else seems fine. I trashed com.apple.isync.registry.plist and com.apple.isync.plist with no change even after restart. Any suggesti

  • GR/IR  - Schedule Lines

    Hi For the Schedule Lines, am creating the Goods Receipt & posting an Invoice as well. But where can I see the details of the GR / IR number in the schedule lines. In a PO, we can see it under Purchase Order history tab - similarly is there somewhere

  • How to clear counter in Cat OS

    Cat OS WS-C4506 Software, Version NmpSW: 7.4(1) i have try perform clear counter, and below error still occured. any advice??? Xmit-Err Rcv-Err U 3148308 1564