Skip to content

Instantly share code, notes, and snippets.

@oraculix
Last active August 29, 2015 14:05
Show Gist options
  • Save oraculix/1b261a26b6b7cd77ae3a to your computer and use it in GitHub Desktop.
Save oraculix/1b261a26b6b7cd77ae3a to your computer and use it in GitHub Desktop.
Snippets for manual execution of Oracle's SQL MONITOR
---------------
-- SQL-Monitor
---------------
-- Welche Reports stehen zur Verfügung?
-- Ggf. auf INST_ID oder SQL_ID einschränken.
select DBMS_SQLTUNE.REPORT_SQL_MONITOR_LIST(
INST_ID => NULL
, active_since_date => sysdate-1/48
, report_level => 'BASIC'
-- , SQL_ID => 'dqbzzupk4xuz5'
)
from dual;
-- Text-Report für eine SQL_ID
-- Alternative TYPEs: HTML, EM (Flash)
select DBMS_SQLTUNE.REPORT_SQL_MONITOR(
TYPE => 'TEXT'
, SQL_ID => 'dqbzzupk4xuz5'
, SQL_EXEC_ID => NULL -- bei mehreren Reports pro sql_id
, INST_ID => NULL) from dual;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment