CheckPoint and  Instance Recovery

hi,
what is checkpoint Exactly.How it will Preform Instance Recovery.
thanks
with Regards

hi,
thanks for reply.I read the documents and books,but i am not clear Exact point so that i have been posting here.
for example
semantic checking
Twq User a,b.Both of them has Emp tables but different Columns.
user A
select * from Emp;
User B
select * from Emp;
here i have doubts after B executing the query. how oracle take this, i think is it Semantic.
I am n't going to learn without Meaning a single word....
some terms not understanding so i am posting here
thanks
with regards

Similar Messages

  • Undo tablespace  and instance recovery

    Is UNDO tablespace is mandatory during instance recovery. ?
    Suppose my undo tablespace has some active transaction and instance crashes making undo tablespace inaccessible.
    Will database search for that undo tablespace during startup or I can simply create a new one and set as new undo tablespace ?
    With Regards
    Amt

    Hi,
    >>I am actually confused
    Keep in mind that If an Oracle instance crashes, any changes that are made in the SGA are not written to the data files. When you restart the instance, the SMON background process automatically performs instance recovery by performing the following tasks:
    • Rolling forward changes that are made in the online redo log files but not in the data files. Since all the committed transactions are written to the online redo log files, these are successfully recovered as result of rolling forward changes from the online redo log files to the data files.
    • Opening the database. After the database is opened, users can log on and access any data that is not locked by un-recovered transaction.
    • Rolling back all the uncommitted transactions.
    In resume, during database recovery, undo records are used to undo any uncommitted changes applied from the redo log to the datafiles.
    But if your UNDO tablespace crashed, then you will need recover it, using steps like
    1) shutdown abort (If the instance yet is up)
    2) cp -a /backup/undo01.dbf /u01/oradata (restore the latest recent backup file)
    3) startup mount
    4) recover database or recover datafile '/u01/oradata/undo01.dbf'
    5) alter database open;
    In some cases, re-create it, also resolve the problem:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5669213349582
    Missing UNDO tablespace in restore backup
    >>I checked in test setup and it is actually waiting for missing UNDO tablespace.
    Which exactly test you are doing?
    Cheers

  • Oracle Concepts: Clarity required on Instance Recovery

    One of my colleague was discussing instance recovery with me.
    We discussed about checkpoint position, instance recovery phases (rolling forward & rolling back ), then he asked me whats the point of rolling forward (applying redo logs) and then rolling back (applying undo blocks), why not applying only committed transactions?
    I told him that this happens because:
    1) roll forward to recreate the scenario just before when Instance crashed
    2) roll forward/roll back is the fastest way to recover
    I am not sure from where I got this learning, may be some blog or article (probably not from Oracle Docs), but is it correct?
    Regards,
    Ankit Rathi

    OnB wrote:
    The 2nd point is completely wrong!Let me elaborate the context of 2nd point, it was mentioned in context of applying only committed transactions during recovery. As all the change vectors go in the redo log files, had there been any mechanism to identify only committed transactions, it would have taken more time (its really hypothetical as there is no mechanism exists, right?) by that mechanism to identify committted transactions (from redo logs) than simply rolling forward and rolling back.There is no context in that point, it's wrong , plain and simple!
    There is a mechanism to identify committed transactions and that's called commit . But when you are doing recovery, you are not recovering just the committed transactions but you are recreating the entire scene before the crash which means, you would be required to apply both the uncommitted and committed work/change vectors. Going by your logic, if Oracle would start searching for the committed transactions, it would have many issues. One, time taken would be more higher. Two, there may be an instance that the commit was issued but before the commit complete message could reach the user, instance got terminated so how about those blocks which may be now in data file and have got an active transaction status and are unsure whether they are committed or not. And last, the way LGWR writes is just to keep on pushing change vectors to the redo stream in the order of the SCN. So for doing a recovery, you would need to reapply all of that changed data in that same SCN ordering.
    The meaning of instance recovery is that you are not having a physical file crashed or deleted but there was a memory loss and few buffers were left out from being written to the data files and now, data files , control file and log files are not in synch.
    The second point, where you are saying its the fastest, is wrong because even for the instance recovery , it can take a very long time and it would depend on how much work was left over before the instance was crashed. Roll Forward is the way to bring the data files in synch with the redo log files and the control files. So if the data files were on Checkpoint Number 100 and the control files and redo log files recorded the number as 120, the missing 20 numbers gap would be reentered in the data files because only then, the database would be opened. Now, your friend's question that why not only committed transaction because you never say a transaction is only done when there is a commit. Whenever any DML is encountered , it's going to cause a transaction. And you do want that missing work to be recreated to ensure that if there was a commit issued before the instance was crashed , next time, Oracle would ensure that work is there and if not , it would be rolled back. And most importantly, in the redo log files all the change vectors go, not just for the committed transactions .This is fine, same understanding here.
    Bring in your own thoughts now that how much you understood from this explanation before I start to get into more technical terms.I would like to know your view about the 1st point. Suppose, something went wrong (in terms of transactions) due to which instance crashed, if it rolls forward (as it happens automatically) during next start-up, will it crash again?
    It would be rolled back in the case of the instance (next) startup. If all what you are doing is plain DML's they won't crash the instance as long as you haven't encountered any bug in the case of which, next time also the instance may crash.
    Aman....

  • Purpose of ONLINE REDO LOG FILES - Media or Instance recovery or BOTH ?

    Hi
    Currently studying this topic for the 1z0-031 exam and am a little confused.
    my books (from instructor led class) say
    -redo logs are a mean to provide redo transactions in the event of a DATABASE recovery
    -redo log buffer gets flushed to redo log files to provide a recovery mechanism in case of MEDIA FAILURE
    Then it says
    -Online redo log files are used in a situation such as an INSTANCE FAILURE to recover uncommitted data which has not yet been written to the data files
    - online redo log files are used for RECOVERY only.
    Am i misunderstanding? Or are redo log files for both MEDIA and INSTANCE recovery? Or just INSTANCE ?
    confused....
    Amanjit

    Online Redo Log Files are used in a sense for both Media and Instance Recovery. If your database is in NoArchive Mode then you will only be able to use the Redo Log Files for instance recover. But if you are running in Archive Log Mode then Redo Log Files are archived and will allow you to recover from media failure.

  • Crash & instance recovery

    what is the difference between crash recovery and instance recovery???

    From http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96519/recov.htm#1004618
    Crash recovery is used to recover from a failure either when a single-instance database crashes or all instances of an Oracle Real Application Clusters database crashes. Instance recovery refers to the case where a surviving instance recovers a failed instance in an Oracle Real Application Clusters database.

  • How to reduced instance recovery time

    Hello Friends how are you all. I hope you all will be fine. friends I want to reduced the instance recovery time but i don't know which views or parameters which could helpful for me. Please tell me the way how can i reduced the instance recovery time.
    Thanks & Best Wishes

    Hi,
    Reduced instance recovery time
    check ur DB size, is it connected many users.
    my advice is do not set the reduced instance recovery time, it may be decreased run-time peformance.
    the following procedure
    -) Frequent checkpoints
    -) reduce instance recovery time
    -) set FAST_START_MTTR_TARGET parameter
    -) size the Online redo log files
    -) Implent manual checkpoints
    -) reduce log_buffer size
    -) Decrease run-time performance

  • Undo behavior during instance recovery

    i'm confused about 2 concepts in applying undoin the case of instance failure
    1.the common concepts of instance recovery which states :
    a) when instance crash, oracle automatically applies all redo in the redo file to roll the db forward to the last scn be4 the failure
    b) & redo data also contains the undo data, it also undo the uncommitted changes from the old valuesin the undo.
    that'sok
    2.but refereing to 10g database concepts (ch17 high availability-p317 if pdf)
    url: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/high_av.htm#sthref2531
    it says:
    •With fast-start fault recovery, the Oracle database is opened for access by applications without having to wait for the undo, or rollback, phase to be completed.
    •The rollback of data locked by uncommitted transaction is done dynamically on an as needed basis.
    •If the user process encounters a row locked by a crashed transaction, then it just rolls back that row.
    •The impact of rolling back the rows requested by a query is negligible.
    •Fast-start fault recovery is very fast, because undo data is stored in the database, not in the log files.
    •Undoing a block does not require an expensive sequential scan of a log file.
    so which situation is applicable in case of instance recovery
    & do the undo behvior stated above in case of fast start fault recovery is an option or that's the default
    thnx alot

    Hi,
    Whatever changes are made to the database, are recorded in redo log buffer cache sequentially and then shifted to redo log files. Suppose redo logs recorded following changes in the database in following sequence.
    insert a row
    update a row
    commit;
    delete a row
    Now Instance crashes before these changes were written into the database (data remains in buffer cache until checkpoint)
    Now during instance recovery, data which was still in buffer cache and not written to the data files, will be applied in same sequence. All undo data for update/delete is in redo log files and will be applied in the same sequence.
    Salman

  • Instance recovery mechanism

    Hi,
    I try to understand the mechanism of instance recovery of Oracle 8i/ Oracle 9i database and I am little bit confused, since I got some opposed information about that.
    Please find below my questions:
    1. Is SCN number assigned to all transactions or ONLY to committed transactions?
    2. Is the checkpoint number the highest SCN number after an checkpoint event?
    3. After checkpoint event, dirty buffer are written to database files by DBWR. Does DBWR write only dirty buffers of committet transactions or does DBWR write out all dirty buffers in the DB buffer cache?
    Thanks in advance for your answers!
    regards
    Peter

    1. The system change number (SCN) is updated whenever there is a commit.
    2. If you are talking about the checkpoint_change# in the v$database table, yes
    3. All dirty buffers are written to disk. Data files can and do contain uncommitted data
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Motive of checkpoint and SCN using with DBWr and LOGWr processes ??

    What checkpoint has to do with log writer process i am not getting exactly ?..
    Like see i fire 1 update query and apparently it is generating some redo blocks which in turn will come to my redo log files now in tihs whole cycle where the checkpoint will occur and why??
    1)My update query
    2) take locks
    3)generate redo
    4)generate undo
    5)Blocks are modified but they are still in redo log buffer...
    now this blocks eventually comes to redo log files in this whole way where check pointing take place and why??
    checkpoint also takes place when Datablocks are flushed to datafiles again the same reason why??
    Same way around the same question the what checkpointing has to do with DBWr process also i am not clear...
    Apart from this whole picture SCN is generated when user issue comitts..and we can say SCN can be used to identify that transaction is committed or not.?
    So what is the motive of SCN to update in Control file...MAy b to get the latest transaction committed..??
    Sorry one thread with so much questionss..but this all things are creating a fuzzy picture i want to make it clear thnx for your help in advance ..
    I read documentation but they havent mentioned in depth for checkpointing..??
    THANKS
    Kamesh
    Edited by: 851733 on Apr 12, 2011 7:57 AM

    851733 wrote:
    What checkpoint has to do with log writer process i am not getting exactly ?..And where exactly did you read that it has anything to do with it? How did you come up to the relation anyways? The time checkpointing would come into the play with the log files would be when there would be a log switch and this would induce a checkpoint, causing/triggering the DBWR to write the dirty buffers to the datafile and allowing the redo log group to be reused. That's about it.
    Like see i fire 1 update query and apparently it is generating some redo blocks which in turn will come to my redo log files now in tihs whole cycle where the checkpoint will occur and why??
    1)My update query
    2) take locks
    3)generate redo
    4)generate undo
    5)Blocks are modified but they are still in redo log buffer...
    now this blocks eventually comes to redo log files in this whole way where check pointing take place and why??Read my reply above, at the time of writing the change vectors in the log file, there won't be any checkpointing coming into the picture.
    checkpoint also takes place when Datablocks are flushed to datafiles again the same reason why??Wrong, the checkpoint event would make the dirty buffers written to the dataflile. Please spend some time reading the Backup and Recovery guide and in that, instance recovery section. In order to make sure that there wont be much time spent in the subsequent instance recovery, it would be required to move the dirty buffers periodically to the data file. THis would be caused by the incremental checkpoint . Doing so would constantly write the content out of the buffer cache thus leaving few buffers only as the candidate for the recovery in the case of the instance crash.
    Same way around the same question the what checkpointing has to do with DBWr process also i am not clear...Read the oracle documentation's Concept guide again and again as long as it doesn't start getting in sync in with you(and it may take time). One of the events , when DBWR writes , is the occurance of the Checkpoint. Whenever there would be a checkpoint, the DBWR would be triggered to write the buffers (dirty) to the datafile.
    Apart from this whole picture SCN is generated when user issue comitts..and we can say SCN can be used to identify that transaction is committed or not.? Not precisely since there would be a SCN always there , even when you query , for that too. But yes, with the commit, there would be a commit SCN that would be generated including a commit flag entered in the redo stream telling that the transaction is finally committed. The same entry would be updated in the transcation table as well mentioning that the tranaction is committed and is now over.
    So what is the motive of SCN to update in Control file...MAy b to get the latest transaction committed..??Where did you read it?
    Sorry one thread with so much questionss..but this all things are creating a fuzzy picture i want to make it clear thnx for your help in advance ..
    I read documentation but they havent mentioned in depth for checkpointing..??
    Read the book, Expert one on one by Tom Kyte and also, from documentation, version 11.2's Concept guide. These two would be more than enough to get the basics correct.
    HTH
    Aman....

  • Instance recovery by SMON

    Hi,
    are you agree with the followings :
    Your database is running in the ARCHIVELOG mode. After an instance crash, you start up the database by issuing the STARTUP
    command. Instance recovery is initiated by the SMON background process.
    The information used for instance recovery will be derived from the control file.
    The uncommitted changes are rolled back using information in the undo segments.
    The committed and uncommitted changes stored in the online redo log are applied to the
    affected data blocks.Many thanks.

    Oracle instance recovery. I am remebering, one day i was talking with one of my the best and great oracle expert friend and i asked him; "Suppose you have got a chance to ask one question from OCM; what will you ask? He said; i will ask him explain how and when oracle perfrom instance recovery". So you can judge what is instance recovery and how much lengthy is this topic. But if i have to explain then first i will collect some notes from forum and google and the text will be as follow :
    1. The recovery is triggered by smon comparing thre control files and data file headers. If the stop scn of the datafile doesn't match with the checkpoint scn of control file, recovery is triggered(hope I remember correctly). After that recovery starts. There are changes in it from 9i but don't think its neded here. Read on the docs!
    Source:Re: instance recovery in oracle 9i
    Writer:Aman....
    Please read replies by Kamran and Pavan in the above thread.
    2. There is no Instance Recovery at the STARTUP and MOUNT phases. Instance Recovery is at the OPEN phase.
    Source:how oracle will come to know weather it is Instance recovery or Media Recovery
    Writer:Hemant K Chitale
    3. Re: crash recovery/ instance recovery
    Writer:Eduardo Legatti
    etc. etc.
    I mean if i wish to write a note on instance recovery i will collect some good and clear replies by forum experts (as i showed example above) and then will shape-up in my language and then; i will post that text in the forum; so that necessary correction too can be performed (if required).
    Regards
    Girish Sharma

  • Crash recovery/ instance recovery

    Hi,
    How do oracle identifies crash recovery/ instance recovery
    is required?
    Regards,
    Mathew

    Hi,
    >>But how do oracle identifies dabase is abnormally down and crash recovery is required?
    I think that the checkpoint information that is desynchronized in redo log files and datafiles. It is necessary understand what is a checkpoint and what the CKPT process do. A checkpoint is a moment in time when all the changes (dirty blocks) made in the database buffer cache are made to the data files. The checkpoint is performed by the CKPT process and it creates an entry in the control file to identify the point in the online redo log file from where the instance recovery should begin in case of an instance failure. One of the ways a checkpoint is initiated is by the data block writer (DBWR) process. The DBWR process initiates a checkpoint by writing all modified data blocks in the data buffers (dirty buffers) to the data files. After a checkpoint is performed, all committed transactions are written to the data files. If the instance were to crash at this point, only new transactions that occurred after this checkpoint would need to be applied to the database to enable a complete recovery. Therefore, the checkpoint process determines which transactions from the redo logs need to be applied to the database in the event of a failure and subsequent recovery.
    Cheers

  • Checkpoint and SCN

    Hi,
    When executing below command, I found check point occur and SCN is changed...
    alter system switch logfile;
    While executing below commnd checkpoint is also ocuured but SCN not changed..
    alter system checkpoint;
    As both the execusion, checkpoint occur and SCN is written.. can anyone tell why this happened?
    Can anyone explain the relationship between checkpoint and SCN?
    Thanks,
    Tina K.

    Lets keep it simple and straight, SCN generate when ever there is change (ie change vector).
    checkpoint -Simple write dirty block to datafile and update control file too.
    ( check point keep database safe(=easy recoverable )from instance failure , power failure..)
    Just think u have 2 online redo logfile , you switch the logfile so all changes is there in logfile 1 is wriiten to datafile Right, now logfile 2 is current logfile and power went off. When u start again database oracle try to check/match SCN of all datafiles from control file , if any databfiles header has less SCN it will read chnage vector from online redo and apply chnages and update header.
    SCN is base for all recovery and work around the change vector.
    I know i am very poor in explaining things , if you want to know more insight story read book "Backup and Recovery by Rama -Oracle Press" it has very good details.
    Cheer,
    Virag Sharma
    http://virag.sharma.googlepages.com/

  • Incremental checkpoint and SCN

    Hi,
    I am getting messages of incremental checkpoint in my alert logs with some scn.
    >
    Completed checkpoint up to RBA [0x125de6.2.10], SCN: 445135162445
    >
    Does this mean that all dirty blocks which have had their initial changes before this SCN(445135162445) will be written to disk so that instance recovery can begin from the SCN from which checkpoint has completed.Or is it the other way like the incremental checkpoint has occured at scn 445135162445.
    Sekar

    user13485610 wrote:
    As per my knowledge, the checkpoint is classified as below (correct me if I am wrong somewhere)
    Checkpoint types can be divided as INCREMENTAL and COMPLETE.
    Also COMPLETE CHECKPOINT can be divided further into
    PARTIAL and FULL.
    It would be convenient to have a reference to the documents where you picked up this information. There may be further reading in them that clarifies the meaning. The terms have been around for a long time, of course, but it's always hard to get any sort of definitive description together - in your case, for example, you don't make any comment about which checkpoints lead to high priority writes and which to low, but the description of any type of checkpoint isi incomplete without some reference to the write priority.
    As far as classifying checkpoints by name - I'm not too concerned that there is still some confusion in the different way that people name or categorise them, provided that they can describe what's going on to ensure that there is no ambiguity. In this context I think there are only options to consider:
    a) does the particular type of checkpoint walk along the checkpoint queue (CKPTQ) in order to pick the blocks that need to be written to disc.
    b) does the particular type of checkpoint use a different queue (such as an object queue or file queue) to pick the blocks that need to be written to disc.
    c) is there any other mechanism for picking the blocks to be written - such as walking the LRU and identifying all dirty blocks.
    To my mind, an incremental checkpoint should probably have a definition that says it walks the checkpoint queue.
    I dislike the term "complete" if it then leads to the option for "partial" - how much clarity can you read into the statement "at this point Oracle does a partial complete checkpoint" (or should that be a "complete partial checkpoint") - but I can understand the need for a term of that sort to distinguish a checkpoint that is based on one of the other queues.
    But my doubt is mentioned below.
    2.At the time of log switch - Sometimes log switches may trigger a complete checkpoint , if the
    next log where the log switch is to take place is Active.
    Why is this behaves in this fashion? (Any internal thoughts on this please)This, in part, is why I'd like to see the reference document - I think that the term "complete" may have been given a different meaning at this point. If the logfile you want to use is still active checkpoint activity MUST take place urgently, but it need only be a checkpoint that walks the CKPTQ up to the point where the content of the target redo log can be discarded. This is no different from any other checkpointing due to log file switch - but it could have a higher degree of urgency. (The need to differentiate this special case on log file switch probably came about at the time that Oracle stopped triggering an automatic checkpoint at every log file switch.)
    Regards
    Jonathan Lewis

  • BusinessObjects Content recovery and Disaster recovery in BO BI 4.0

    Dear All,
    Could u please guid us how to do step by step Business Objects Content recovery and Disaster recovery in BO 4.0 .We used to do it in XI 3.1 ,but it was found some changes in 4.0 .
    Thank   you in advance for your support and help .
    regards,
    Mohammed

    Hello Ramakrishna,
    Try to see on which kind of objects, the issue is ocurring. I mean try to see if you migrate only universes if it works. Then Crystal reports,...
    We have a bug ADAPT01588140 which gives a similar error message (FWM 04011) and that should be fix in SP02 Patch 9 (should be release very soon)
    This bug is about migrating reports that contains instances in xls or pdf format.
    So might be worth to install the fix when it's out to see if it solves the issue for you also.
    Thanks
    Philippe

  • Uncommited transactions remain after Instance Recovery

    After Instance Recovery, the database seems to contain uncommitted transactions. Please provide an explanation for the following:
    create table t1
    as
    select *
    from all_objects;
    commit;
    create table t2
    as
    select *
    from all_objects;
    update t2
    set object_id = 1 where rownum = 1;
    shutdown abort;
    Neither table t2 nor the update to it were committed (right?), therefore, once the database starts up t2 should not be there. On the contrary, it is still there. In the Oracle Database Backup and Recovery Advanced Guide 10g Release 2, page 11-9, explains how the uncommitted transactions are removed (rolled back) in the Roll Backward step (transaction recovery) of the Instance recovery process.
    Any insight on this is highly appreciated. Thanks.

    Note also following scenario run with SYSDBA privileges:
    bas002> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
    PL/SQL Release 10.2.0.2.0 - Production
    CORE    10.2.0.2.0      Production
    TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    bas002>
    bas002> drop table t2;
    drop table t2
    ERROR at line 1:
    ORA-00942: table or view does not exist
    bas002> create table t2
      2  as
      3  select *
      4  from all_objects;
    Table created.
    bas002>
    bas002> update t2
      2  set object_id = 1 where object_id=258;
    1 row updated.
    bas002>
    bas002> shutdown abort;
    ORACLE instance shut down.
    bas002> startup
    ORACLE instance started.
    Total System Global Area  192937984 bytes
    Fixed Size                  1288484 bytes
    Variable Size             130025180 bytes
    Database Buffers           54525952 bytes
    Redo Buffers                7098368 bytes
    Database mounted.
    Database opened.
    bas002>
    bas002> select count(*) from t2 where object_id=1;
      COUNT(*)
             0
    bas002>Message was edited by:
    Pierre Forstmann

Maybe you are looking for

  • Convert unix time stamp to readable time with daylight saving

    Hello NG, I have a table that has a column containing time stamps in the unix time format (seconds since 1970). If I show these times to the user, they should be converted to some readable format. I'm using the following sql code as an example: selec

  • Buy some song download in nokia music store but ca...

    My currency phone is N95 8GB model, I buy and download song from nokia music store, after I do Sync to my phone, I tried to set the song as the ring tone, but can not do it cos the screen on the phone not showing "set as ringtone" (but other song com

  • TextArea component AS3

    I'm having trouble both working out or finding out how to apply an imported css file to the CS3 TextArea component. I've frequently done this in AS2 using Flash 8, but that code no longer works. If anyone knows could you please let me know. Here's th

  • Conversion of datatypes

    Hi, How to convert a field of type 'date' into 'decimal' on target side in while doing mapping.Anybody Pleaseee..... Thanks & Regards, Radhika.

  • Function to call Process-flows/mapping from SQL

    Hi All, Can any one of you send me the function to call process-flows/mappings (eg: I have 10 mapping/Process-flows). It is an urgent requirement pending in my final testing. Plz help me in this regard. Regards