查看当前oracle中正在执行的sql语句,存储过程

1  正在执行的sql

select a.program, b.spid, c.sql_text,c.SQL_ID
  from v$session a, v$process b, v$sqlarea c
 where a.paddr = b.addr
   and a.sql_hash_value = c.hash_value
   and a.username is not null;

2 正在执行的存储过程

select owner,name from v$db_object_cache where type like '%PROCE%' and locks >0 and
 pins >0;
发布了17 篇原创文章 · 获赞 7 · 访问量 5735

猜你喜欢

转载自blog.csdn.net/qq_29461579/article/details/101073350