Home » RDBMS Server » Server Administration » What are the contents of Redo Log File ?!
What are the contents of Redo Log File ?! [message #278531] Sun, 04 November 2007 22:52 Go to next message
rengam
Messages: 3
Registered: November 2007
Junior Member
Hi all,

What are the contents of the redo logfile ?!

Does it store ONLY the committed transaction information?
OR
Whether it stores all changes (NO matter whether committed or NOT) ?!

For example :

I run a long transaction (running for hours) that inserts,updates,deletes etc on few tables, will it generate redo log with information whatever I do during the transaction.

If I do commit, well and good the REDO should have all committed info.

My question is
If I decide to rollback, what will happen to the redologs generated so for (if redo log records, just the changes whatever i made before I decide to rollback).

I appreciate your expert advice on this.

Thanks
Renga.
Re: What are the contents of Redo Log File ?! [message #278533 is a reply to message #278531] Sun, 04 November 2007 23:29 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Redo logs contain all changes (and many other things in 10g and up).

Database Concepts
Part I What Is Oracle?
Chapter 1 Introduction to the Oracle Database
Section Oracle Database Architecture
Subsection Overview of Physical Database Structures
Paragraph Redo Log Files

Regards
Michel

Re: What are the contents of Redo Log File ?! [message #278539 is a reply to message #278531] Mon, 05 November 2007 00:35 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Quote:

If I decide to rollback, what will happen to the redologs generated so for


They are in their way.
Re: What are the contents of Redo Log File ?! [message #278607 is a reply to message #278539] Mon, 05 November 2007 02:42 Go to previous messageGo to next message
rengam
Messages: 3
Registered: November 2007
Junior Member

Redolog buffer has/stores both uncommited and committed information.

the Redolog buffer flushes under the following condition

1. every 3 secs
2. 1/3 of the redo buffer get fill
3. transaction COMMIT occurs
4. checkpoint occurs

If my above understanding is right, let me place the question
Now what information will be written to the redolog file ?!
1. Is it the information committed that are in the redo buffer ( I'm clear at this point)
2. or 1/3 of the buffer or whatever inthe buffer during that 3 secs or while checkpoint
now the redo buffer can have both committed and uncomitted information, if so does the redologfile store just the dump of the redolog buffer ?

If the DB is in archivelog mode, the ARCH process will dump the redologfile and the created archivelog file should have only the committed transaction (this is my understanding/expectation too).

During my session if I perform long (in terms of time) readwrite transaction and rollback, it is obvious that the redolog buffer meets one of the four above listed scenario and switches the logfile (due to the redolog file is full) or may flush the redo buffer, that time what will happen ?! Will the redologfile have transaction and rollback information, further will the archive process make the same trasnaction and rollback information in the archivelog file too ?!

Thanks
Renga.
Re: What are the contents of Redo Log File ?! [message #278610 is a reply to message #278607] Mon, 05 November 2007 02:48 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

Now what information will be written to the redolog file ?!

All that is in the log buffer.

Quote:

the created archivelog file should have only the committed transaction

No, it has what was in redo log that is all what was in log buffer that is all changed made (in your data blocks or undo ones, committed or not).

Quote:

Will the redologfile have transaction and rollback information, further will the archive process make the same trasnaction and rollback information in the archivelog file too ?!

Yes.

Regards
Michel
Re: What are the contents of Redo Log File ?! [message #278628 is a reply to message #278610] Mon, 05 November 2007 03:33 Go to previous messageGo to next message
rengam
Messages: 3
Registered: November 2007
Junior Member
Thanks Michael.

I understand from other articles that

1. Oracle writes all committed changes made to the database in the online redo log.

2. REDO LOG entry will be recorded with SCN (SCN will be generated whenever a commit occurs).


Now the scenario expands little bit

I have a standby database and it is recovering periodically using the archivelogs from the primary DB.

I make long readwrite transaction and rollback it. The redolog file will have those entries and ultimately archived to the archivelog file too.
This archivelog is transferred to the standby and the recovery continues...
that means there will be a readwrite transaction occur in the standby db and rollback will happen in the standby.

Thanks
Renga.
Re: What are the contents of Redo Log File ?! [message #278630 is a reply to message #278628] Mon, 05 November 2007 03:39 Go to previous message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

1. Oracle writes all committed changes made to the database in the online redo log.

All changes committed or not.

Quote:

2. REDO LOG entry will be recorded with SCN (SCN will be generated whenever a commit occurs).

Other things update the SCN but this is the idea.

Quote:

that means there will be a readwrite transaction occur in the standby db and rollback will happen in the standby.

Yes (assuming this is a physical standby).

Regards
Michel

[Updated on: Mon, 05 November 2007 03:39]

Report message to a moderator

Previous Topic: ora-29278
Next Topic: certain tables expected growth
Goto Forum:
  


Current Time: Wed Dec 07 03:05:33 CST 2016

Total time taken to generate the page: 0.06521 seconds