Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

16.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