美文网首页
oracle归档日志分析

oracle归档日志分析

作者: 李爵麟 | 来源:发表于2019-01-28 09:37 被阅读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 ;

    相关文章

      网友评论

          本文标题:oracle归档日志分析

          本文链接:https://www.haomeiwen.com/subject/yuwojqtx.html