Help in server architecture [message #56490] |
Thu, 03 April 2003 09:55 |
M. Gopinath
Messages: 6 Registered: April 2003
|
Junior Member |
|
|
Hi,
Thanks in advance.
I am preparing myself for DBA, I have a doubt pls help me.
My question:
I created a table Employ, Inserted 10 records...
I deleted 5 records.
I want to know where the records are stored when I insert and where the records are stored when I delete and what happens when I rollback.
Pls help me, I posted this question to Arikaplan.com.
But no reply.
Thanking you.
Gopinath
|
|
|
Re: Help in server architecture [message #56499 is a reply to message #56490] |
Thu, 03 April 2003 15:21 |
Anand
Messages: 161 Registered: August 1999
|
Senior Member |
|
|
Whenever you do any DML operation ( INSERT, UPDATE , DELETE), Oracle takes an image/copy of the old data and stores in the rollback segments. That what rollback segments are used for. So, when you try to INSERT new data, old data goes to the rollback segment. Once you COMMIt the changes, new data is written permanently to the table and old data is discarded. However, the data in the rollback segments are not automatically flushed out. When a new transaction requests space in the rollback segments, old data are automatically flushed out of the rollback segments.
Incase you do a ROLLBACK, the old data is copied back from the rollback segments to the data blocks and the new data is discarded.
Whenever you INSERT, DELETE or UPDATE, old data will be stored in the rollback segments.
Hope it's clear.
|
|
|