Home  >  Article  >  Database  >  查看哪些对象被lock

查看哪些对象被lock

WBOY
WBOYOriginal
2016-06-07 14:55:111370browse

Oracle数据库 无 SELECT /*+ rule */ s.username, 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.terminal, s.machine, s.program, s.osuser FROM v$session s, v$

Oracle数据库
SELECT /*+ rule */
       s.username,
       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.terminal, s.machine, s.program, s.osuser
  FROM v$session s, v$lock l, dba_objects o
 WHERE l.SID = s.SID AND l.id1 = o.object_id(+) AND s.username IS NOT NULL
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn