logminr 日誌挖掘

darren__chan發表於2014-11-27

挖掘聯機日誌:
select * from v$log where status ='CURRENT'
select member from v$logfile where group#='1'

挖掘歸檔日誌:
select name from v$archived_log;


execute dbms_logmnr.add_logfile('+FRA/gdstjcpt/onlinelog/group_1.290.857160811',dbms_logmnr.new);---第一個
execute dbms_logmnr.add_logfile('+FRA/gdstjcpt/onlinelog/group_1.290.857160814',dbms_logmnr.addfile);---次個


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


alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

---會列出你加入的日誌檔案的以上資訊。
select low_time,high_time,low_scn,next_scn from v$logmnr_logs;


select sql_redo from v$logmnr_contents;

----也可以建立分析表
create table aa_logmnr_tab_0106 parallel nologging   as 
Select *
  From V$LOGMNR_CONTENTS ;


exec dbms_logmnr.end_logmnr;







來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29863023/viewspace-1348250/,如需轉載,請註明出處,否則將追究法律責任。

相關文章