时间:2021-07-01 10:21:17 帮助过:2人阅读
--查用户名,查客户端机器 SELECT distinct s.username,s.MACHINE, s.sid||‘,‘||s.serial# FROM gv$session s, gv$lock l, dba_objects o WHERE l.sid = s.sid AND l.id1 = o.object_id(+) AND s.username is NOT NULL and s.MACHINE = ‘WORKGROUP\PC-201301201414‘ --这个SQL可以查看哪个用户用什么方式锁住了哪些表,使用的哪个Session。 SELECT s.username,S.MACHINE,s.SQL_EXEC_START, decode(l.type, ‘TM‘, ‘TABLE LOCK‘, ‘TX‘, ‘ROW LOCK‘, NULL) LOCK_LEVEL, o.owner, o.object_name, o.object_type, s.sid, s.serial#, s.sid||‘,‘||s.serial# FROM gv$session s, gv$lock l, dba_objects o WHERE l.sid = s.sid AND l.id1 = o.object_id(+) AND s.username is NOT NULL AND (s.username=‘‘ or s.username = ‘TPSC_TEST‘ or s.username = ‘‘) --‘TPSC‘ TPSC_TEST --必须要大写
oracle 死锁
标签:acl ble code height bsp col where ssi 机器