Hi Friends
I wanted to know, what is the content of redo log file? Does it store all the commited or uncommited statement executed by a user or something else?
Please, I need your suggestions
Thanks in Advance
Shailendra
Printable View
Hi Friends
I wanted to know, what is the content of redo log file? Does it store all the commited or uncommited statement executed by a user or something else?
Please, I need your suggestions
Thanks in Advance
Shailendra
Hi,
Redo file containes records called redo entires. Each record will be represent before/after image of data(irrespective of whether committed or uncommitted)or you can say any entry in the rollback segment will generate redo.
Regards,
dear sir
following Text is from Oracle documentation
--------------------------------------------------------------------
Online Redo Log Contents
Online redo log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database. For example, if you change a salary value in an employee table, you generate a redo record containing change vectors that describe changes to the data segment block for the table, the rollback segment data block, and the transaction table of the rollback segments.
Redo entries record data that you can use to reconstruct all changes made to the database, including the rollback segments. Therefore, the online redo log also protects rollback data. When you recover the database using redo data, Oracle reads the change vectors in the redo records and applies the changes to the relevant blocks.
Redo records are buffered in a circular fashion in the redo log buffer of the SGA and are written to one of the online redo log files by the Oracle background process Log Writer (LGWR). Whenever a transaction is committed, LGWR writes the transaction's redo records from the redo log buffer of the SGA to an online redo log file, and a system change number (SCN) is assigned to identify the redo records for each committed transaction. Only once all redo records associated with a given transaction are safely on disk in the online logs is the user process notified that the transaction has been committed.
Redo records can also be written to an online redo log file before the corresponding transaction is committed. If the redo log buffer fills, or another transaction commits, LGWR flushes all of the redo log entries in the redo log buffer to an online redo log file, even though some redo records may not be committed. If necessary, Oracle can roll back these changes.
-------------------------------------------------------------------
Regards
Viraj
---------
9i OCA
Yes it stores all commited and uncomitted changes.Quote:
Originally posted by shailendra
Hi Friends
I wanted to know, what is the content of redo log file? Does it store all the commited or uncommited statement executed by a user or something else?
Please, I need your suggestions
Thanks in Advance
Shailendra
You can say all changes that are being made to a database are first recorded in the redolog files. (ofcource there are exceptions like no logging etc). But the basic funda is that no changes can be recorded in database unless it is first written to redo logs.
And redo log are used only and only for recovery and nothing else.
THANKS TO ALL OF YOU GUYS
Just to add the logfiles nature: in the event of recovering stages it might be useful in ROLLFORWARD Mechanism.Quote:
Originally posted by adewri
Yes it stores all commited and uncomitted changes.
You can say all changes that are being made to a database are first recorded in the redolog files. (ofcource there are exceptions like no logging etc). But the basic funda is that no changes can be recorded in database unless it is first written to redo logs.
And redo log are used only and only for recovery and nothing else.
VAST
Why the confusion about it might be useful in ROLLFORWARD Mechanism . It does roll forward during recovery and then does the rollback.Quote:
Originally posted by vastdba
Just to add the logfiles nature: in the event of recovering stages it might be useful in ROLLFORWARD Mechanism.
VAST
RTFM :D
Redo log files are useful in the event of getting crash of database and subsequently used for ROLLFORWARD MECHANISM .
VAST
any might be useful in that line of yours ??Quote:
Originally posted by vastdba
Redo log files are useful in the event of getting crash of database and subsequently used for ROLLFORWARD MECHANISM .
VAST
Gee, here he goes again, showing off with his "vast" knowledge of Oracle RDBMS!Quote:
Originally posted by vastdba
Just to add the logfiles nature: in the event of recovering stages it might be useful in ROLLFORWARD Mechanism.
VAST
VAST, it realy isn't necessary to respond to each and every post unless you realy have to say something that is related to the subject! Your confusing and incorrect/inacurate answers only adds to the confusion of the original posters!