Be aware that some DDL statements issued by a user cause Oracle to internally execute one or more other DDL statements. If you want to reapply SQL DDL from the SQL_REDO
or SQL_UNDO
columns of the V$LOGMNR_CONTENTS
view as it was originally applied to the database, then you should not execute statements that were executed internally by Oracle.
Note:
If you execute DML statements that were executed internally by Oracle, then you may corrupt your database. See Step 5 of "Example 4: Using the LogMiner Dictionary in the Redo Log Files" for an example.
To differentiate between DDL statements that were issued by a user from those that were issued internally by Oracle, query the INFO
column of V$LOGMNR_CONTENTS
. The value of the INFO
column indicates whether the DDL was executed by a user or by Oracle.
If you want to reapply SQL DDL as it was originally applied, then you should only re-execute the DDL SQL contained in the SQL_REDO
or SQL_UNDO
column of V$LOGMNR_CONTENTS
if the INFO
column contains the value USER_DDL.