Question: I want to understand if
an archived redo log contains the text of the DML changes go
the database or whether the redo log has change vectors
only. How do I see the contents of a redo log?
to my understanding it contain the change vector of the
changed block and the undo block vector information.
When we recover in instance recovery it may undo the
uncommitted changes. Based on the SCN it recovers the
committed blocks and rollbacks the data which is uncommitted
using the undo block entry. This is all thru the information
in the redo log file. Somewhere in the documentation it
stated that from 10g that redo logs contain text of SQL as
well as DML.
redo logs contains ONLY the changes to data (DDL and DML
statements). The 12c docs note these details on the
contents of redo logs:
"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.
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
As we see, the redo logs do NOT contain any read-only SQL
They do not contain plain text
either. You need the LogMiner utility to convert the DML and
DDL into a readable format, See my notes on using
Please read my
concepts for Oracle redo logs.
Regarding the contents of the redo logs, why
guess about the redo log contents, take a look inside a redo
log and see the vector data!
In UNIX/Linux, you can
simply grab an archived redo log file, copy it to /tmp, and
use the "strings" command to view the printable content:
You will see a printable character, here and there, but
it is largely an unprintable vector format. That is
why you need a LogMiner dictionary to translate a redo log
into readable form .