2026-03-12 20:23:15
This commit is contained in:
39
vg/sql_monitor.sql
Normal file
39
vg/sql_monitor.sql
Normal file
@@ -0,0 +1,39 @@
|
||||
@@header
|
||||
|
||||
/*
|
||||
*
|
||||
* Author : Vishal Gupta
|
||||
* Purpose : Display SQL Monitor Report
|
||||
* Parameters : 1 - SQL_ID
|
||||
* 2 - type (text, html, active, xml)
|
||||
*
|
||||
*
|
||||
* Revision History:
|
||||
* ===================
|
||||
* Date Author Description
|
||||
* --------- ------------ -----------------------------------------
|
||||
* 16-Mar-12 Vishal Gupta Intial version
|
||||
* 09-Oct-12 Vishal Gupta Set the default value of type='text'
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
DEFINE sqlid="&&1"
|
||||
DEFINE type="&&2"
|
||||
|
||||
|
||||
set pages 0
|
||||
set linesize 1000
|
||||
set long 1000000
|
||||
set longchunksize 1000000
|
||||
|
||||
select dbms_sqltune.report_sql_monitor(
|
||||
sql_id=>'&sqlid'
|
||||
,inst_id=> null
|
||||
,report_level=> 'ALL +PLAN_HISTOGRAM'
|
||||
,type=>CASE WHEN '&&type' = '' OR '&&type' IS NULL THEN 'text' ELSE '&&type' END)
|
||||
from dual;
|
||||
|
||||
|
||||
@@footer
|
||||
Reference in New Issue
Block a user