• oracle巡检脚本备份


    重做日志生成情况,一天生成日志大小:select round(sum(blocks*block_size)/1024/1024/1024,2) BLOCK from v$archived_log where completion_time<sysdate-1;

     日志切换频率

    alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
    SELECT sum(MINATES)/count(*) TIMES FROM (SELECT B.RECID,
    B.FIRST_TIME,
    A.FIRST_TIME LAST_TIME,
    ROUND((A.FIRST_TIME - B.FIRST_TIME) * 24 * 60, 2) MINATES
    FROM V$LOG_HISTORY A, V$LOG_HISTORY B
    WHERE A.RECID = B.RECID + 1
    ORDER BY A.FIRST_TIME DESC)
    WHERE ROWNUM < 120;

    非空闲等待事件:select count(sid) NUM from v$session_wait where event not in (select name from v$event_name where wait_class='Idle');

  • 相关阅读:
    数据库练习
    pymysql
    数据库索引
    数据库查询
    数据库操作
    数据库建表
    数据库初识
    shell 编程
    Struts2与SpringMVC
    SpringAOP
  • 原文地址:https://www.cnblogs.com/slqt/p/6589458.html
Copyright © 2020-2023  润新知