oracle dbms_logmnr,dbms_logmnr Unsupported SQLREDO

01fac6460a22031b8af8da5848698a70.png

Question:

Try Testing Oracle Logminer

SQL> create table maclean (t1 varchar2(100)) tablespace users;

Table created.

SQL> insert into maclean values (‘MACLEAN’);

1 row created.

SQL> commit;

Commit complete.

after start logmnr:

sql> …add log file ….

sql> exec dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog + dbms_logmnr.committed_data_only);

sql> select sql_redo from v$logmnr_contents;

create table maclean (t1 varchar2(100)) tablespace users;

Unsupported

commit;

In the system, some statement will got sqltext from sqlredo column and other is ‘Unsupported’. The got sqltext have INSERT, DELETE, UPDATE; and ‘Unsupported’ sql have INSERT, DELETE, UPDATE too.

Answer:

Have you enabled supplemental logging prior to mining the redo / archive logs ? If not then please enable the supplemental logging.

To enable minimal supplemental logging execute the following SQL statement:

SQL>ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

If you had not enabled supplemental logging earlier then the redo logs will not contain sufficient information to mine the logs. Additionally logminer will not always populate all the fields of the v$logmnr_contents this is because the redo may/may not have all the information that we need for every column. Adding Supplemental Logging will help in more info being logged in the redo being generated, helping populate more values.

Exactly, supplemental logging is mandatory, Oracle recommends that you at least enable minimal supplemental logging for LogMiner. By default, Oracle Database does not provide any supplemental logging, which means that by default LogMiner is not usable. Therefore, you must enable at least minimal supplemental logging prior to generating log files which will be analyzed by LogMiner.

Once supplemental logging is enabled the log file generated later on will be elgible for log miner.

You must enable at least database minimal supplemental logging prior to generate log files which will be analyzed by LogMiner.

Solution

connect / as sysdba

-- enable minimal supplemental logging at database level

alter database add supplemental log data;

select supplemental_log_data_min from v$database;

SUPPLEME

--------

YES

-- switch logfile to get a new fresh archived log

alter system switch logfile;

connect test/test

-- insert some rows into table

insert into emp values (3, 'Text 3');

insert into emp values (4, 'Text 4');

commit;

connect / as sysdba

-- switch again logfile to get a minimal redo activity

alter system switch logfile;

-- mine the last written archived log

exec dbms_logmnr.add_logfile ('D:\Databases\O102\arc\O102__1__24__676053397.ARC', options => dbms_logmnr.new);

exec dbms_logmnr.start_logmnr(options => dbms_logmnr.dict_from_online_catalog);

select operation, sql_redo from v$logmnr_contents where seg_name = 'EMP';

select operation, sql_redo from v$logmnr_contents where seg_name = 'EMP';

OPERATION

--------------------------------

SQL_REDO

------------------------------------------------------------------------------

INSERT

insert into "TEST"."EMP"("EMPNO","EMPNAME") values ('3','Text 3');

INSERT

insert into "TEST"."EMP"("EMPNO","EMPNAME") values ('4','Text 4');

2 rows selected.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值