Home » RDBMS Server » Server Administration » uncommit change and redo record ?
uncommit change and redo record ? [message #577969] Fri, 22 February 2013 02:56 Go to next message
lonion
Messages: 97
Registered: August 2011
Location: shenzhen,China
Member

SQL> update t set a = 1 where b = 2; -- must have redo record
2 rows updated.

SQL> rollback;



the above redo record that uncommit changed must be written from redo buffer to the online redo logfile.

Question:
why Oracle write the redo record that uncommit changed to the online redo logfile ? when it will be used ?

Thanks advance.
Re: uncommit change and redo record ? [message #577970 is a reply to message #577969] Fri, 22 February 2013 02:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
To recover in case of disk failure.

Regards
Michel
Re: uncommit change and redo record ? [message #577971 is a reply to message #577970] Fri, 22 February 2013 03:20 Go to previous messageGo to next message
lonion
Messages: 97
Registered: August 2011
Location: shenzhen,China
Member
when occurs disk failure , the uncommitted changes isn't need . isn't it ?
Re: uncommit change and redo record ? [message #577972 is a reply to message #577971] Fri, 22 February 2013 03:26 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Oracle records in the redo log the modification of the blocks on the fly without knowing if you will commit or roll back in the end.

Regards
Michel
Re: uncommit change and redo record ? [message #577973 is a reply to message #577972] Fri, 22 February 2013 03:33 Go to previous messageGo to next message
lonion
Messages: 97
Registered: August 2011
Location: shenzhen,China
Member
i have a little understand.

Look Here
SQL> update t set a = 1 where b = 2; -- must have redo record
2 rows updated.

SQL> rollback;       --- this statement also is redo record ?? 


Question:
the above ,"rollback" as redo record was written to the online redo logfile ?
Re: uncommit change and redo record ? [message #577974 is a reply to message #577973] Fri, 22 February 2013 03:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
the above ,"rollback" as redo record was written to the online redo logfile ?


I don't understand the question. Some words are missing, it seems.
Don't hesitate to post complete and clear sentences.

Regards
Michel
Re: uncommit change and redo record ? [message #577975 is a reply to message #577974] Fri, 22 February 2013 03:47 Go to previous messageGo to next message
lonion
Messages: 97
Registered: August 2011
Location: shenzhen,China
Member
sorry , my english is so poor .

SQL> update t set a = 1 where b = 2; -- must have redo record
2 rows updated.

SQL> rollback;       --- this statement also is redo record ??????
Re: uncommit change and redo record ? [message #577978 is a reply to message #577975] Fri, 22 February 2013 04:48 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
this statement also is redo record ???


Yes as well as commit is.

Regards
Michel
Re: uncommit change and redo record ? [message #578045 is a reply to message #577978] Sat, 23 February 2013 09:44 Go to previous messageGo to next message
lonion
Messages: 97
Registered: August 2011
Location: shenzhen,China
Member
Now, i understand it clearly .

thank you very much .

by the way ,how to learn English well ? Smile
Re: uncommit change and redo record ? [message #578046 is a reply to message #578045] Sat, 23 February 2013 10:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is a joke? I do not speak well English, I speak a quite bad one, just translating French sentences in English and with a very poor vocabulary. Sad

Regards
Michel
Re: uncommit change and redo record ? [message #578147 is a reply to message #577969] Sun, 24 February 2013 21:24 Go to previous message
hkchital
Messages: 128
Registered: September 2008
Location: Singapore
Senior Member
A transaction ends with *either* COMMIT or ROLLBACK.

A ROLLBACK is an "end of transaction".
Oracle captures the user-initiated rollback in the redo.

(The automatic rollback that happens to an uncommitted transaction is done either by PMON (if the user session fails) or SMON (on instance recovery after an instance "crash")).

Hemant K Chitale
Previous Topic: ORA-12514 during database startup
Next Topic: How to Alter Tablespace/s in oracle?
Goto Forum:
  


Current Time: Thu Mar 28 10:25:01 CDT 2024