select a.sid,a.serial#,a.username,a.program, c.owner, c.object_name ,a.MACHINE,a.TERMINAL from v$session a, v$locked_object b, all_objects c where a.sid=b.session_id and c.object_id = b.object_id
select * from v$locked_object a,user_objects b where a.object_id=b.object_id and b.object_type like 'PRO%'
select b.sql_text text,a.sid sid ,a.serial# sria#,a.username username, c.type type,a.machine machine from v$session a ,v$sqltext b ,v$access c where c.object=upper('&1') and c.type in ('TABLE','PACKAGE','PROCEDURE','FUNCTION') and a.sid=c.sid and b.address = a.sql_address and b.hash_value = a.sql_hash_value order by a.sid,a.serial#,b.piece; 输入包的名字即可,查出哪些session锁住了
c.owner, c.object_name ,a.MACHINE,a.TERMINAL
from v$session a, v$locked_object b, all_objects c
where a.sid=b.session_id and
c.object_id = b.object_id
where a.object_id=b.object_id and b.object_type like 'PRO%'
from v$session a ,v$sqltext b ,v$access c
where c.object=upper('&1')
and c.type in ('TABLE','PACKAGE','PROCEDURE','FUNCTION')
and a.sid=c.sid
and b.address = a.sql_address
and b.hash_value = a.sql_hash_value
order by a.sid,a.serial#,b.piece;
输入包的名字即可,查出哪些session锁住了