—查看日志状态及位置
col member for a45
select group#,status from v$log;
select group#,member from v$logfile;
—修改数据库启用补充日志
alter database add supplemental log data;
—添加日志文件
exec dbms_logmnr.add_logfile('/u01/app/oracle/oradata/lgr/redo01.log',dbms_logmnr.addfile)
—启动挖掘
exec sys.dbms_logmnr.start_logmnr(options=>sys.dbms_logmnr.dict_from_online_catalog);
—将数据写入到表中
create table t as select * from v$logmnr_contents;
—结束logmnr
exec sys.dbms_logmnr.end_logmnr();
注:关闭补充日志:ALTER DATABASE DROP SUPPLEMENTAL LOG DATA;