SET SERVEROUT ON SIZE UNL;
REM 生成SQL_MONITOR报告
PRO 生成SQL_MONITOR报告
SET TERM ON;
SET VERIFY OFF;
SET LONG 1000000;
SET LONGCHUNKSIZE 1000000;
SET LINESIZE 1000;
SET PAGESIZE 0;
SET TRIM ON;
SET TRIMSPOOL ON;
SET ECHO OFF;
SET FEEDBACK OFF;
SELECT DBMS_SQLTUNE.report_sql_monitor(
sql_id => '&sql_id',
type => 'TEXT',
report_level => 'ALL') AS report
FROM dual;
undefine sql_id