监控级别
SQL> show parameter statistics_level NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ statistics_level string TYPICAL SQL> select statistics_name,session_status,system_status,activation_level,session_settable from v$statistics_level where statistics_name = 'SQL Monitoring'; STATISTICS_NAME SESSION_ SYSTEM_S ACTIVAT SES ---------------------------------------------------------------- -------- -------- ------- --- SQL Monitoring ENABLED ENABLED TYPICAL YES
SQL> show parameter control_manage NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_management_pack_access string DIAGNOSTIC+TUNING
强制对某个SQL使用实时监控
select /*+ monitor */ count(*) from emp where sal > 5000;
禁止实时监控:
select /*+ no_monitor */ count(*) from emp where sal > 5000;
SQL监控报表
SQL> select dbms_sqltune.report_sql_monitor from dual; REPORT_SQL_MONITOR -------------------------------------------------------------------------------- SQL Monitoring Report SQL Text ------------------------------ DECLARE job BINAR
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。