How can I generate real-time SQL monitor active reports?

Oracle:

set trimspool on
set trim on
set pages 0
set linesize 1000
set long 1000000
set longchunksize 1000000
spool sqlmon_active.html
select dbms_sqltune.report_sql_monitor(type=>'active') from dual;
spool off

The resulting file sqlmon_active.html must be edited to remove the header (first line in the file) and the last line (the spool off). The resulting html file can then be viewed in any browser. The browser must have connectivity to OTN to load the active report code.

select dbms_sqltune.report_sql_monitor('7gt07ajarpda4') from dual;

More:

http://www.oracle.com/technetwork/database/manageability/sqlmonitor-084401.html#A1

你可能感兴趣的:(sql,Monitor)