Home  >  Article  >  Database  >  Oracle中查询被锁定的表

Oracle中查询被锁定的表

WBOY
WBOYOriginal
2016-06-07 17:04:571197browse

Oracle中查询被锁定的表 select --l.*,o.owner object_owner, o.object_Name,mac.status,mac.oSUSEr,mac.machine trunc(l.

Oracle中查询被锁定的表

select --l.*,o.owner object_owner, o.object_Name,mac.status,mac.oSUSEr,mac.machine
       trunc(l.ctime/60,0) mm,(l.ctime/60-trunc(l.ctime/60,0))*60 ss,
       l.sid,mac.SERIAL# serial,l.type,mac.osuser,mac.machine,mac.USERNAME user_, o.object_Name,mac.status,mac.logon_time,mac.program
       --,mac.*,o.*
from (select l.* from v$lock l where l.type = 'TM') l,
     sys.all_objects o, sys.v_$session mac
where  l.id1 = o.object_id
and    l.sid  = mac.sid
--and    o.object_name = 'SHOP_BACK_ARRANGE_TAB'
order by mac.machine,mm*60+ss;

linux

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