39 lines
789 B
SQL
39 lines
789 B
SQL
@@header
|
|
|
|
/*
|
|
*
|
|
* Author : Vishal Gupta
|
|
* Purpose : Display SQL Monitor Report
|
|
* Parameters : 1 - SQL_ID
|
|
*
|
|
*
|
|
* Revision History:
|
|
* ===================
|
|
* Date Author Description
|
|
* --------- ------------ -----------------------------------------
|
|
* 16-Mar-12 Vishal Gupta Intial version
|
|
*
|
|
*
|
|
*/
|
|
|
|
|
|
DEFINE sqlid="&&1"
|
|
|
|
|
|
set pages 0
|
|
set linesize 1000
|
|
set long 1000000
|
|
set longchunksize 1000000
|
|
|
|
set term off
|
|
spool C:\temp\sql_monitor_&sqlid..htm
|
|
select dbms_sqltune.report_sql_monitor(sql_id=>'&sqlid',inst_id=> null,report_level=> 'ALL +PLAN_HISTOGRAM', type=>'active') from dual;
|
|
spool off
|
|
set term on
|
|
|
|
PROMPT Report available at C:\temp\sql_monitor_&sqlid..htm
|
|
|
|
host C:\temp\sql_monitor_&sqlid..htm
|
|
|
|
@@footer
|