select session_id from v$locked_object;
4491
SET LINESIZE 100
SET PAGESIZE 50000
COL USERNAME FOR A10
COL machine FOR A15
COL sql_text FOR A50
select
substr(s.username,1,18) username,
s.sid,s.serial#,s.machine,y.sql_text
from v$session s,v$process p,v$transaction t,v$rollstat r,v$rollname n,v$sql y
where s.paddr = p.addr
and s.taddr = t.addr (+)
and t.xidusn = r.usn (+)
and r.usn = n.usn (+)
and 2 3 4 5 6 7 8 9 s.username is not null
and s.sql_address=y.address
and s.sid=4491
order by s.sid,s.serial#,s.username,s.status;
https://www.cndba.cn/hbhe0316/article/5028
版权声明:本文为博主原创文章,未经博主允许不得转载。文章来源:https://www.toymoban.com/news/detail-451485.html
oracle,linux文章来源地址https://www.toymoban.com/news/detail-451485.html
到了这里,关于Oracle通过sid查看正在执行的SQL的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!