oracle??(事?,?)(二)

2014-11-24 14:17:53 · 作者: · 浏览: 1
v$transaction
25 www.2cto.com
26 --查session
27 select v.* from v$session v where machine='xxx' and username='xxx' and status='INACTIVE' order by last_call_et desc
28
29 --查dba_objects对象
30 select * from dba_objects
31 where object_id = '14977'
32
33 --查锁定的表
34 select t2.username,t2.sid,t2.serial#,t3.object_name,t2.OSUSER,t2.MACHINE,t2.PROGRAM,t2.COMMAND,t2.LAST_CALL_ET
35 from v$locked_object t1,v$session t2 ,dba_objects t3
36 where t1.session_id=t2.sid and t1.object_id = t3.object_id
37 order by t2.logon_time;
作者 vinsonLu