oracle 查询锁表SQL

来源:互联网 发布:美国软件中国代理 编辑:程序博客网 时间:2024/06/10 01:14
select logon_time,
       last_call_et "time inactive",
       nvl(s.username, 'ORACLE PROCESS') username,
       s.machine,
       s.program,
       s.sid session_id,
       s.status,
       sql_text,
       ss.value "CPU used",
       trunc(buffer_gets / (executions + 1)) "BUFF-EXEC",
       trunc(buffer_gets / (rows_processed + 1)) "BUFF-ROWS",
       first_load_time,
       executions,
       parse_calls,
       disk_reads,
       buffer_gets,
       rows_processed
  from v$session s, v$sesstat ss, v$statname sn, v$sqlarea sa
where s.sid = ss.sid
   and ss.statistic# = sn.statistic#
   and sn.name = 'CPU used by this session'
   and s.sql_address = sa.address
   and s.sql_hash_value = sa.hash_value
--   and last_call_et > 1000
order by machine, status, program, last_call_et asc;
0 0
原创粉丝点击