Oracle 性能监控统计工具 mystats脚本

下载地址: https://github.com/oracle-developer/mystats

This repository contains two versions of the MyStats utility. This
reports on the resource usage between two snapshots in an active
database session. It is a combination of Jonathan Lewis’s
SNAP_MY_STATS package and my own re-factoring of Tom Kyte’s runstats
utility (also available via www.oracle-developer.net or
github.com/oracle-developer/runstats). I’ve also added some
functionality and flexibility around the statistics reporting section.

看看这个工具的介绍就知道这个工具是很牛的,因为它是在两个牛人的工具是改进的,一出生就有贵族血统呀!
用起来也简单,两种方法,一个是 PL/SQL package ,另一个是SQL*Plus script ,我比较倾向于后者,方便呀。

-- Usage:           @mystats start [optional statistics type(s)]
--                  --<do some work>--
--                  @mystats stop [optional reporting parameter]
--

输出所有统计信息:

                 @mystats start
            --<do some work>--
                 @mystats stop
--

只输出 “redo size” 和 “user commits”

 @mystats start
--                  --<do some work>--
 @mystats stop "n=redo size, user commits"

输出含有redo的统计信息

   @mystats start
--                  --<do some work>--
        @mystats stop l=redo

PL/SQL package的使用类似,请注意这只能统计当前的session的值,不能统计其它session和系统级别的信息

姚远ACE CSDN认证博客专家 ACE 华为云 MVP
Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;获得过两次国家部级科技进步奖;发明过两项计算机专利。微信:yaoyuanace 邮箱:yaoyuanace(at)qq.com
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页