My Oracle Support Banner

LogMiner Returns Wrong Delete SQL_REDO Statement For BLOB Datatype (Doc ID 2179380.1)

Last updated on OCTOBER 14, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2.0 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

NOTE: The document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product.
Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

Goal

LogMiner returns wrong sql_redo for BLOB data type as shown below:

CREATE TABLE "LOGDEVICE"
(
"DEVICEOBJECT" BLOB,
"ID" NUMBER(*,0),
PRIMARY KEY ("ID")
)
LOB ("DEVICEOBJECT") STORE AS BASICFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING
);

SQL> insert into LOGDEVICE values ('aaa',1);

1 row created.

SQL> commit;

Commit complete.

SQL> delete from LOGDEVICE where id =1;

1 row deleted.

SQL> commit;

By mining the corresponding redo log the output from v$logmnr_contents shows the following statement for the DELETE sql executed above:( NOTE: the "and" in the where clause):

delete from "SCOTT"."LOGDEVICE" where and "ID" = '1'; >>>>>> we can see "and"immediately after where without a condition.

The correct sql_redo should look like below:

delete from "SCOTT"."LOGDEVICE" where "ID" = '1' and ROWID = 'AAATu8AABAAAZhZAAA';

 

Solution

To view full details, sign in with your My Oracle Support account.

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


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.