广告
返回顶部
首页 > 资讯 > 数据库 >[Oracle Script] Lock
  • 946
分享到

[Oracle Script] Lock

2024-04-02 19:04:59 946人浏览 安东尼
摘要

col spid fORMat a10 col inst_id format a7 col owner format a15 col object_name format a20 col Machine


col spid fORMat a10
col inst_id format a7
col owner format a15
col object_name format a20
col Machine format a30
col program format a20
select pr.spid,se.inst_id,se.sid,se.serial#,ob.owner,ob.object_name,se.osuser,se.machine,se.terminal,se.program
,gvl1.ctime,(select count(*)-1 from gv$lock  where inst_id=gvl2.inst_id and id1=gvl2.id1) as blocking_session,
trunc(gvl2.id1/power(2,16)) xidusn,bitand(gvl2.id1,to_number('ffff','xxxx')) xidslot,gvl2.id2 xidsqn
from gv$lock gvl1,gv$session se,dba_objects ob ,gv$process pr,
(select * from gv$lock where block=1) gvl2
where gvl1.inst_id=gvl2.inst_id and gvl1.sid=gvl2.sid and gvl1.type='TM'
and gvl1.inst_id=se.inst_id and gvl1.sid=se.sid and gvl1.id1=ob.object_id
and se.paddr=pr.addr;

您可能感兴趣的文档:

--结束END--

本文标题: [Oracle Script] Lock

本文链接: https://www.lsjlt.com/news/47476.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作