520 B
520 B
#Oracle #Lock
SELECT C.id1, username, osuser, lockwait, a.status, machine, program, 'ALTER SYSTEM KILL SESSION ' ||''''||A.SID|| ','|| A.serial#||'''' ||';', (select OBJECT_NAME from dba_objects where object_id = c.id1 and owner = a.username ) as obj FROM v$session A, v$lock c WHERE A.SID= c.SID AND c.TYPE= 'TM' and c.id1 not in ( '87463' , '92646') order by A.SID, A. serial#
select object_id, OBJECT_NAME from dba_objects where owner in ('ERPMAN','TERASEN','WMES','WOUT','POPMAN') and object_id = '87463'