Select a.sid,a.serial#,a.username,A.LOCKWAIT,a.status,a.program,b.name from v$session a,audit_actions b where a.command=b.action AND STATUS='ACTIVE';Select sid, serial#, object_name, row_wait_block#, row_wait_row#, row_wait_file# from all_objects, v$session where row_wait_obj#=object_id and type='USER' and lockwait is not null ;Select sl.username, sl.sid, sl.serial# from v_$lock l1, v$session s1 where exists (select * from v_$lock l2, v$session s2 where l2.sid=s2.sid and l2.id1=l1 and s2.lockwait=l2.kaddr and request=0 and l1.sid=s1.sid) ;
from v$session a,audit_actions b
where a.command=b.action
AND STATUS='ACTIVE';Select sid, serial#, object_name, row_wait_block#,
row_wait_row#, row_wait_file#
from all_objects, v$session
where row_wait_obj#=object_id and type='USER'
and lockwait is not null ;Select sl.username, sl.sid, sl.serial#
from v_$lock l1, v$session s1
where exists (select * from v_$lock l2, v$session s2
where l2.sid=s2.sid and l2.id1=l1
and s2.lockwait=l2.kaddr
and request=0
and l1.sid=s1.sid) ;
这样会解掉本会话所有锁
to gaobh(^_^)
然后呢?