扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:佚名 来源:Oracle技术网 2007年10月22日
关键字: ORACLE
在本页阅读全文(共5页)
select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds from v$session where username = 'HR'
SID SERIAL# SQL_TRAC SQL_T SQL_T ---------- ---------- -------- ----- ----- 196 60946 DISABLED FALSE FALSE
begin dbms_monitor.session_trace_enable ( session_id => 196, serial_num => 60960, waits => true, binds => false ); end; /
select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds from v$session where username = 'HR'
SID SERIAL# SQL_TRAC SQL_T SQL_T ---------- ---------- -------- ----- ----- 196 60960 ENABLED TRUE FALSE
SELECT * FROM (SELECT SID, 'SESSION_TRACE' trace_type FROM v$session WHERE sql_trace = 'ENABLED') UNION (SELECT SID, t.trace_type FROM v$session s, dba_enabled_traces t WHERE t.trace_type = 'CLIENT_ID' AND s.client_identifier = t.primary_id) UNION (SELECT SID, t.trace_type FROM v$session s, dba_enabled_traces t, v$instance i WHERE t.trace_type = 'SERVICE' AND s.service_name = t.primary_id AND (t.instance_name IS NULL OR t.instance_name = i.instance_name)) UNION (SELECT SID, t.trace_type FROM v$session s, dba_enabled_traces t, v$instance i WHERE t.trace_type = 'SERVICE_MODULE' AND s.service_name = t.primary_id AND s.module = t.qualifier_id1 AND (t.instance_name IS NULL OR t.instance_name = i.instance_name)) UNION (SELECT SID, t.trace_type FROM v$session s, dba_enabled_traces t, v$instance i WHERE t.trace_type = 'SERVICE_MODULE_ACTION' AND s.service_name = t.primary_id AND s.module = t.qualifier_id1 AND s.action = t.qualifier_id2 AND (t.instance_name IS NULL OR t.instance_name = i.instance_name)) UNION (SELECT SID, t.trace_type FROM v$session s, dba_enabled_traces t, v$instance i WHERE t.trace_type = 'DATABASE' AND (t.instance_name IS NULL OR t.instance_name = i.instance_name))
SID TRACE_TYPE ---------- --------------------- 136 SERVICE_MODULE 136 SERVICE_MODULE_ACTION
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者