Exact contents of redo logs
I want to know the contents of the redo logs. Do redo logs contain exact data inserted by users or instructions to redo transactions in case of failure?

    Requires Free Membership to View

    By submitting your registration information to SearchOracle.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchOracle.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

The online redo logs contain the exact SQL statements to replay the transaction in case of a failure. These SQL statements vary from the actual SQL issued by the user. For instance, assume the user issues the following:
DELETE FROM emp WHERE empno IN (1001,1002);
The online redo logs will contain the following:
DELETE FROM {obj#1785} WHERE {col1} = 1001;
DELETE FROM {obj#1785} WHERE {col1} = 1002;
The original DELETE statement can be broken down into two DELETE statements. Also notice that Oracle references the table by object number and the column by column position.

In addition, your transaction generates undo stored in the undo segments. Oracle needs to replay the changes to the undo segments in case it needs to roll back any uncommitted transactions. So the online redo logs also contain the SQL to undo any operation.

This was first published in October 2006

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.