2016. 5. 9. 10:31 오라클
12c Real-Time SQL Monitoring 조회
12c Real-Time SQL Monitoring 조회
dbms_sql_monitor package 이용
(전제조건 : Tuning Pack 사용이 가능하여야 함)
- REAL TIME SQL 조회
set trimspool on
set trim on
set pagesize 0
set linesize 32767
set long 1000000
set longchunksize 1000000
spool sqlmon_active.html
select dbms_sql_monitor.report_sql_monitor(type=>'active')
from dual;
spool off
- 특정 SQL_ID 로 조회
set trimspool on
set trim on
set pagesize 0
set linesize 32767
set long 1000000
set longchunksize 1000000
spool sqlmon_active.html
select dbms_sql_monitor.report_sql_monitor(
sql_id=>' 1n482vfrxw014', type=>'active')
from dual;
spool off