This discussion is archived
1 2 3 4 5 6 Previous Next 83 Replies Latest reply: Jan 7, 2012 1:03 PM by 909589 Go to original post RSS
  • 60. Re: Why not use Redo log for consistent read
    KSG Explorer
    Currently Being Moderated
    Aman sir,

    First in the morning I thought you have lost your temper. But I was wrong, It's really great to see you that you are still open to answer my repeated question.

    Okay, tell me what you haev understood from the above said. We shall discuss that rather than me saying anything.

    My understanding is, when a normal update happens...

    Datablock say 'A' is of size 8k. 'A' contains the value, let's say 100,200,300,400 and 500. When the value 500 is updated to 600, a change vector is generated for the value 500 and that change vector is placed on the redolog buffer.

    Here not the whole block 'A' of 8k is placed on the redolog buffer.

    Please correct me if i'm wrong.

    Thanks a ton
    KSG
  • 61. Re: Why not use Redo log for consistent read
    Aman.... Oracle ACE
    Currently Being Moderated
    when a normal update happens...
    Datablock say 'A' is of size 8k. 'A' contains the value, let's say 100,200,300,400 and 500. When the value 500 is updated to 600, a change vector is generated for the >value 500 and that change vector is placed on the redolog buffer.Here not the whole block 'A' of 8k is placed on the redolog buffer.
    Its correct!

    Aman....
  • 62. Re: Why not use Redo log for consistent read
    KSG Explorer
    Currently Being Moderated
    Thanks again sir..

    But I have one more question for you.

    How is this change vector is maintained by oracle? I like to learn more about change vector.

    Thanks
    KSG
  • 63. Re: Why not use Redo log for consistent read
    Aman.... Oracle ACE
    Currently Being Moderated
    I don't think that much is required to know. And moreover, its just a representation of the change. Dump a redo log file and you can see it for yourself. There is nothing like maintainenance of it. Its just stored in the redo log buffer and from there to the file.

    Aman....
  • 64. Re: Why not use Redo log for consistent read
    KSG Explorer
    Currently Being Moderated
    Thanks for your reply.

    Now I wish to reopen the hot backup scenario.

    Could you please explain me...

    Why in the hot backup entire block is copied to redolog for the first time?

    Thanks
    KSG
  • 65. Re: Why not use Redo log for consistent read
    Aman.... Oracle ACE
    Currently Being Moderated
    Why in the hot backup entire block is copied to redolog for the first time?
    This is the first time you have asked an appropriate question in this thread :-) .

    Well, the reason for doing this links to the reason that oralce defers the IO to be done to the o/s processes when it asks for the user managed backup. So you put a tablespace in the backup mode, run the cp command and would also keep on working in the same file. The o/s command doesn't do in the same units of Oracle processes. So it would read a small portion of the block, start writing that portion to the media. In the meantime, dbwr would request the same file chunk again and may modify its contents. Like this, the content which was originially submitted for the backup and the content that may get backed up, may end up being different leading to "fractured block". So to overcome this barrier, Oracle changed the mechanism and would log for the first time the entire block, making it sure that whatever is needed to be there for the recovery , is already there in the log file. Now even though the actual block may get "fractured", from the logfile( or from archive file) , the first time image can be copied which we actually wanted to be there and recovery can happen. That's why its copied.

    All this doesn't happen if you would use RMAN.

    HTH
    Aman....

    PS: I am really sleepy at the moment so apologies if I sounded more confusing.
  • 66. Re: Why not use Redo log for consistent read
    Franck Pachot Journeyer
    Currently Being Moderated
    Hi,
    Here is a description of what happens during hot backup mode, including the additional logging (full block instead of redo vector) that occurs for the first change in a block since it has been read in buffer cache so that every block write to disk (by dbwr) is fully protected by redo in case of fractured block in the copy:
    http://knol.google.com/k/oracle-begin-backup-end-backup#
    Regards,
    Franck.
  • 67. Re: Why not use Redo log for consistent read
    KSG Explorer
    Currently Being Moderated
    This is the first time you have asked an appropriate question in this thread

    I realised it sir. Thanks for helping me to understand better about the concepts.
    Once again thanks for your wonderful explanation even when you are at sleep ;)

    Frank,

    Thanks for your reply.
    There is also another link where hotbacup is explained very well http://www.oraclealchemist.com/news/hot-backups-redo-and-fractured-blocks
  • 68. Re: Why not use Redo log for consistent read
    Aman.... Oracle ACE
    Currently Being Moderated
    Not a problem dude. Glad to see that I could help.

    Aman....
  • 69. Re: Why not use Redo log for consistent read
    Aman.... Oracle ACE
    Currently Being Moderated
    Very nice Franck!

    Regards
    Aman....
  • 70. Re: Why not use Redo log for consistent read
    751685 Newbie
    Currently Being Moderated
    Hi Aman,Franck,

    Thanks for your beautiful explanations.

    I have another doubt...
    During hot backup, it is said that the SCNs are freezed. why it has to be freezed?


    Thanks,
    Sripada
  • 71. Re: Why not use Redo log for consistent read
    Aman.... Oracle ACE
    Currently Being Moderated
    Its from that "frozen" point onwards, the recovery has to get started or in other words, the redo needs to be applied over the file till the tail of the log.

    Edit:

    And its not that "it is said", it actually does happen. Please see,
    SQL> select file#, checkpoint_change# from V$datafile;
    
         FILE# CHECKPOINT_CHANGE#
    ---------- ------------------
             1          665828791
             2          665828791
             3          665828791
             4          665828791
             5          665828791
             6          665828791
    
    6 rows selected.
    
    SQL> alter tablespace users begin backup;
    
    Tablespace altered.
    
    SQL> select file#, checkpoint_change# from V$datafile;
    
         FILE# CHECKPOINT_CHANGE#
    ---------- ------------------
             1          665828791
             2          665828791
             3          665828791
             4          665829099
             5          665828791
             6          665828791
    
    6 rows selected.
    
    SQL> alter system checkpoint;
    
    System altered.
    
    SQL>  select file#, checkpoint_change# from V$datafile;
    
         FILE# CHECKPOINT_CHANGE#
    ---------- ------------------
             1          665829107
             2          665829107
             3          665829107
             4          665829099
             5          665829107
             6          665829107
    
    6 rows selected.
    
    SQL> alter tablespace users end backup;
    
    Tablespace altered.
    
    SQL>   select file#, checkpoint_change# from V$datafile;
    
         FILE# CHECKPOINT_CHANGE#
    ---------- ------------------
             1          665829107
             2          665829107
             3          665829107
             4          665829107
             5          665829107
             6          665829107
    
    6 rows selected.
    
    SQL>
    Code ran on 11106 on OEL5.1 .

    HTH
    Aman....

    Edited by: Aman.... on Mar 24, 2010 4:40 PM
  • 72. Re: Why not use Redo log for consistent read
    KSG Explorer
    Currently Being Moderated
    Hi Aman Sir,

    An enthusiastic user has restarted the loop. It's interesting to look fwd your explanations ;)
  • 73. Re: Why not use Redo log for consistent read
    Rafi (Oracle DBA) Pro
    Currently Being Moderated
    Hi,
    This is best explained by Aman.I don't know why we start it again and again.Any ways.I have posted this in my link also.


    http://rafioracledba.blogspot.com/2010/03/undo-and-redo-concept-amans-at-its-best.html


    Best regards,

    Rafi.
    http://rafioracledba.blogspot.com
  • 74. Re: Why not use Redo log for consistent read
    Aman.... Oracle ACE
    Currently Being Moderated
    Girish,

    I just replied to him. Hope it helps.

    Cheers
    Aman....

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points