|
查询大事务以及对应的sql
col xid for a20
col schemaname for a20
col sql_text for a40
set linesize 150
set pagesize 100
select s.sid,s.serial#,s.status,t.start_time, t.xidusn||'.'||t.xidslot||'.'||t.xidsqn xid,
s.username,decode(s.sql_id,null,s.prev_sql_id,s.sql_id) sqlid
from v$transaction t, v$session s
where s.saddr = t.ses_addr
order by t.start_time;
select s.sid,s.serial#,s.status,t.start_time, t.xidusn||'.'||t.xidslot||'.'||t.xidsqn xid,
s.username,decode(s.sql_id,null,s.prev_sql_id,s.sql_id) sqlid,l.sql_text
from v$transaction t, v$session s,v$sql l
where s.saddr = t.ses_addr and l.sql_id=s.sql_id
order by t.start_time; |
|