Redo log content
Dear all, does anybody what kind of stuff does contain redologs? So if I do update a table with: update xyztab set col1=11 where col2='ABC'; Does oracle save the datablock before modification or only the undo statement? Kind regards Robert
Hi, Redolog files contain information about the history of activity on a database. So if you update any column, redlog will contain the information about that column along with reverse statement of that update, so that using using logminer you can get that undo statement and revert back that column which was previously updated. Datablock image saved in undo before modification so as to rollback. Hi guys, please specify if i am wrong. HTH. regards Jafar
Check Oracle Concept, Please note some highlight, redo logfile usually only save change vectors not the whole block. Only in certain situation like DB in backup mode, redo logfile will hold image of whole block. And no, it's not in the form of undo statement, remember redo and undo are different. Even redo logfile also save undo information but that's for recover purpose, Redo record is used to recover undo segment so that you can Undo the not committed transaction. http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/onlineredo.htm#sthref850 Redo Log Contents 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 undo segment data block, and the transaction table of the undo segments. Redo entries record data that you can use to reconstruct all changes made to the database, including the undo segments. Therefore, the redo log also protects rollback data. When you recover the database using redo data, the database 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 (see "How Oracle Database Writes to the Redo Log") and are written to one of the redo log files by the Log Writer (LGWR) database background process. Whenever a transaction is committed, LGWR writes the transaction redo records from the redo log buffer of the SGA to a redo log file, and assigns a system change number (SCN) to identify the redo records for each committed transaction. Only when 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 a 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 a redo log file, even though some redo records may not be committed. If necessary, the database can roll back these changes.
And once you finish reading the concepts guide and still looking for "more" , I shall suggest to read this paper from Riyaz. Hemant gave this link to me and I must say,its excellent. http://orainternals.files.wordpress.com/2008/07/riyaj_redo_internals_and_tuning_by_redo_reduction_doc.pdf One more,if you want to see it in good presentation style, http://www.juliandyke.com/Presentations/RedoInternals.ppt Hoep this would be enough. HTH Aman....
Thank you all for help. I have found the oracle doc also. Unclear was what the redo entry and change vector are. The hint to the Oracle Internal site was very helpfull for get light into this.