Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | Email

44.4. SQL Monitoring Report

监控级别

		
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