Rollback Statement Does Not Contain Supplemental Log Data (Doc ID 462948.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.4 [Release 10.2 to 11.2]
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

You use LogMiner to grab the information from Redo logs in source database (SUPPLEMENTAL LOGGING enabled for PK and UI) and apply this to target database. The view V$LOGMNR_CONTENTS doesn't show the complete syntax for SQL_REDO of the 'ROLLBACK' statements (including PK/UI, only ROWID is available, what is not applicable at target database).

connect / as sysdba

alter database add supplemental log data (all) columns;

connect test/test
drop table tab001;
purge recyclebin;

create table tab001 (col001 number);
alter table tab001 add constraint tab001_pk primary key (col001);
alter table tab001 add supplemental log data (primary key) columns;
alter table tab001 add supplemental log data (unique) columns;

insert into tab001 values (1);
rollback;

 

  When an application session is aborted (for instance it exists suddenly),  a rollback should occur for any transaction failure. If a transaction is cancelled or fails, then Oracle needs to cleanup the uncommitted work that was done by this transaction so that other transactions can progress. This cleanup involves rolling back  the uncommitted work.
  From LogMiner point of view, the rollback statement is reported by itself as SQL_REDO  and not SQL_UNDO. For an SQL which rolls back, no undo SQL is generated, and the rollback flag is set. For an insert followed by a rollback the view V$LOGMNR_CONTENTS shows:

select scn,
       to_char (timestamp, 'dd.mm.yy hh24:mi') timestamp,
       rollback,
       sql_redo,
       sql_undo,
       username,
       operation
from   v$logmnr_contents;

For INSERT statement:

SCN        TIMESTAMP      ROLLBACK
---------- -------------- ----------
1330456    16.10.07 13:50          0

SQL_REDO
---------------------------------------------------------------------------
insert into "TEST"."TAB001"("COL001") values ('1');

SQL_UNDO
---------------------------------------------------------------------------
delete from "TEST"."TAB001" where "COL001" = '1' and ROWID = 'AAAM7WAAEAAAACFAAA';

USERNAME                       OPERATION
------------------------------ --------------------------------
TEST                           INSERT


For ROLLBACK statement:

SCN        TIMESTAMP      ROLLBACK
---------- -------------- ----------
1330456    16.10.07 13:50          1

SQL_REDO
---------------------------------------------------------------------------
delete from "TEST"."TAB001" where ROWID = 'AAAM7WAAEAAAACFAAA';

SQL_UNDO
---------------------------------------------------------------------------

USERNAME                       OPERATION
------------------------------ --------------------------------
TEST                           DELETE


==> For the "delete" statement  reported as SQL_REDO , the ROLLBACK column is set to 1 which means that the delete was executed as part of a rollback operation.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms