User is "SYS"
2、设置字典文件的位置
alter system set utl_file_dir='/home/app/oracle/lgmr_dict' scope=spfile;
startup force;
3、创建字典文件
SQL> exec dbms_logmnr_d.build(dictionary_filename => 'dict.ora',dictionary_location => '/home/app/oracle/lgmn_dic',options => DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);
PL/SQL procedure successfully completed
4、增加、删除、分析文件
1)begin dbms_logmnr.add_logfile(LogFileName => '/home/app/oracle/oradata/tom/redo02.log',Options => dbms_logmnr.NEW); end;
2)begin dbms_logmnr.add_logfile(LogFileName => '/home/app/oracle/oradata/tom/redo01.log' ,Options => dbms_logmnr.ADDFILE); end;
3)exec dbms_logmnr.start_logmnr(DictFileName => '/home/app/oracle/lgmn_dic/dict.ora');
5、本session查询信息
v$logmnr_contents;v$logmnr_logs;v$logmnr_parameter;v$logmnr_dictionary;
6、结束本次日志挖掘
begin dbms_logmnr.end_logmnr;