Q

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?

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?
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

Dig deeper on Oracle and SQL

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close