简要咨询咨询QQ网站导航网站搜索手机站点联系我们设为首页加入收藏 

ORACLE查锁语句

来源:易贤网   阅读:640 次  日期:2014-10-17 10:12:05

温馨提示:易贤网小编为您整理了“ORACLE查锁语句”,方便广大网友查阅!

SELECT substr(v$lock.sid,1,4) "SID",

substr(username,1,12) "UserName",

substr(object_name,1,25) "ObjectName",

v$lock.type "LockType",

decode(rtrim(substr(lmode,1,4)),

'2','Row-S (SS)','3','Row-X (SX)',

'4','Share', '5','S/Row-X (SSX)',

'6','Exclusive', 'Other' ) "LockMode",

substr(v$session.program,1,25) "ProgramName"

FROM V$LOCK,SYS.DBA_OBJECTS,V$SESSION

WHERE (OBJECT_ID = v$lock.id1

AND v$lock.sid = v$session.sid

AND username IS NOT NULL

AND username NOT IN ('SYS','SYSTEM')

AND SERIAL# != 1);

select a.sid, a.SERIAL#, b.spid, a.status, a.PROGRAM

from v$session a, V$PROCESS b

where a.paddr=b.ADDR

order by a.sid;

alter system kill session '200,68' immediate;

更多信息请查看IT技术专栏

更多信息请查看数据库
点此处就本文及相关问题在本站进行非正式的简要咨询(便捷快速)】     【点此处查询各地各类考试咨询QQ号码及交流群
上一篇:oracleCONNECTBYPRIOR叶子节点查找根节点
下一篇:高效快速删除Oracle表中重复记录
易贤网手机网站地址:ORACLE查锁语句
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!