-
Great. Thanks again.
I'd still like to understand this at a lower level. In what locations does Oracle store the information that a change in a datafile is uncommitted? Is that merely because there is an undo in rollback? Clearly it isn't all in online redo, since log switches could goof that up.
Oracle DBA and Developer
-
This information is stored in the Block Header in the datafiles.
I would like to see what JModic has to say about this but in the meantime you may take a look at this article for a better explanation --
http://asktom.oracle.com/pls/ask/f?p...D:275215756923
- Rajeev
Rajeev Suri
-
"Restore" vs "Rebuild"? I think it's an issue of wording. ( I think "recover" is actually better.)
Now, I believe jmodic has made this very clear! Oracle must recover rollback segment before it can do the "Rollback" in the instance recovery.
By the way, jmodic said
"T1: log swich occurs, data from RedoA is written to datafiles, including to RBS segments; RedoB becomes active redo"
Here is what I believe:
When log switch occurs, RedoA should be "ARCHIVED" to archived logs instead of "written to datafiles." I believe there is big difference between "datafiles" and "archived logs."
Or, do you mean the redo records in the redo logs will be written to correspoding data files. No, only DBWR will write data from DB Buffer back to corresponding datafiles. And that only happen when DBWR is triggered. LGWR and DBWR will not be triggered at the same time except during CHECKPOINT.
I will be glad to hear any comments. Thank you!
-
Wow. Tons of great info.
Thanks to all (again)!
Thanks for the link. That's a good explanation.
Oracle DBA and Developer
-
Originally posted by rsuri
This information is stored in the Block Header in the datafiles.
Well, it would be an overkill if Oracle had to scan all the datablock headers in every datafile in the database during rollback phase of crash recovery. It really doesn't have to do that. After rolling forward, all the informations about each and every uncommited transactions are available in the rollback segments. Remember, uncommited undo information can not be overwritten by any other transaction, it must remain in RB segment until commited or rolled back. So your uncommited transactions might be days or weeks old, but they will still be there in the RB segments! Oracle just needs to scan RB segments and rolls those transactions back.
Originally posted by dba_admin
By the way, jmodic said
"T1: log swich occurs, data from RedoA is written to datafiles, including to RBS segments; RedoB becomes active redo"
Here is what I believe:
When log switch occurs, RedoA should be "ARCHIVED" to archived logs instead of "written to datafiles." I believe there is big difference between "datafiles" and "archived logs."
Or, do you mean the redo records in the redo logs will be written to correspoding data files. No, only DBWR will write data from DB Buffer back to corresponding datafiles. And that only happen when DBWR is triggered. LGWR and DBWR will not be triggered at the same time except during CHECKPOINT.
I will be glad to hear any comments. Thank you!
You are absolutelly correct. I might have done some unnecessary simplifications in my explanation. First assumption (for simplicity sake): checkpoint parameters are set so that checkpoints will occure only during log switches.
What I've written about what happens during log switch (implicitly during checkpoint) was realy badly phrased, your explanation is much more accurate. What I realy ment (and this was the whole point in this topic) was, that when logswitch (checkpoint) occurs the uncomitted transactions changes, that are allready written in the redo log files, are also written into database files. And your intervention here was correct - this information is not written from redo log file, but from buffer cache. But the point is, even uncommited transaction changes are written into database files when log switch occurs, so they can't be lost no matter how many log switches have occured from that moment on untill the database crashed.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|