Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Md Imran.

Asked: September 27, 2018 - 10:20 am UTC

Last updated: October 02, 2018 - 6:50 am UTC

Version: 11.2.0.3.0

Viewed 1000+ times

You Asked

Which background process writes the copy of "old image" from "db buffer cache" to undo -segment of undo tablespace ?

and Connor said...

DBWR is the process that handles the flushing of *all* buffer cache blocks to disk. You don't need to think of those blocks as "old images". Undo blocks are not old copies of blocks, they are more like a list of instructions.

So if I did:

update EMP set sal = 20 where empno= 10

The EMP database block will reflect that change. But the undo information is *not* a copy of the EMP block before that change was made. It will be more something along of the lines of:

"Take block 3124, find row 7, modify the SAL column from 20 to 7"

That information sits in an undo block, and it can be flushed to disk by DBWR as needs be.

Hope this helps.

Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Need a little bit clarification

Md Imran Khan, October 01, 2018 - 7:10 am UTC

Thanks for what you have explained till now,

what happens is from "db buffer cache" to "datafile" data is written by background process known as "dbwr".
this I know for sure is true.

But I need clarification on certain things that I have mentioned below.

* so if data has to be written from "db buffer cache" to "undo tablespace" It would be written by "dbwr"

* Also from "undo tablespace" to "db buffer cache" data would be written by background process "dbwr"

am I right on the above two points that I have mentioned???

waiting for your reply.
Connor McDonald
October 02, 2018 - 6:50 am UTC

so if data has to be written from "db buffer cache" to "undo tablespace" It would be written by "dbwr"


Yes.


Also from "undo tablespace" to "db buffer cache" data would be written by background process "dbwr"


Anything that need to read from disk to buffer cache is done by the background process for the requesting session. DBWR is exactly that - only a *writer*

Thanks a whole lot.

Md Imran Khan, October 02, 2018 - 7:17 am UTC

I'am grateful that you have cleared my doubt,
thanks I really appreciate it.

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database