logminer使用方法
sqlplus "/as sysdba"
1)设置参数utl_file_dir
alter system utl_file_dir='d:\oracle9i\oradata\' scope=spfile;
2)创建日志分析数据字典
exec dbms_logmnr_d.build('logminer_dict.dat', 'd:\oracle9i\oradata\' );
3)建立日志分析表
exec dbms_logmnr.add_logfile( dbms_logmnr.new,'d:\oracle9i\oradata\ora_t1.arc' );
4)启动分析日志
BEGIN
dbms_logmnr.start_logmnr('d:\oracle9i\oradata\logminer_dict.dat',
to_date('20070210 08:00:00','yyyymmdd hh24:mi:ss'),
to_date('20070214 15:40:30','yyyymmdd hh24:mi:ss');
END;
/
5)查询分析结果
SELECT operation, sql_redo, sql_undo FROM V$logmnr_contents
阅读(1117) | 评论(0) | 转发(0) |