oracle归档日志分析

2019-01-28  本文已影响0人  李爵麟

分析日志增长情况

SELECT TRUNC(FIRST_TIME) "TIME",

SUM(BLOCK_SIZE * BLOCKS) / 1024 / 1024 / 1024 "SIZE(GB)"

FROM V$ARCHIVED_LOG

GROUP BY TRUNC(FIRST_TIME);

执行日志分析语句

exec sys.dbms_logmnr.add_logfile(logfilename => '+ARCH/sjck/archivelog/2019_01_23/thread_1_seq_21934.928.998327425',options => dbms_logmnr.new);

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

查看DML语句

select * from v$logmnr_contents;

select count(1),substr(sql_redo,1,100) from v$logmnr_contents group by substr(sql_redo,1,100) order by count(1) desc ;

上一篇下一篇

猜你喜欢

热点阅读