SELECT V $ Session.SID, V $ session.serial #, v $ process.spid, rtrim (object_type) Object_type, RTRIM (Owner) || '.' || Object_name Object_name, Decode (LMODE, 0, 'NONE', 1, 'NULL', 2, 'ROW-S', 3, 'ROW-X', 4, 'Share', 5, 'S / ROW-X', 6, 'Exclusive', 'UNKNOWN') LOCKMODE, Decode (Request, 0, 'None', 1, 'Null', 2, 'ROW-S', 3, 'ROW-X', 4, 'Share', 5, 'S / ROW-X', 6, 'Exclusive', 'Unknown') RequestMode, CTIME, Block B, V $ Session.username, Machine, Module, Action, Decode (a.type, 'mr', 'Media Recovery', 'RT', 'Redo Thread' , 'Un', 'user name', 'TX', 'Transaction', 'TM', 'DML', 'UL', 'PL / SQL USER LOCK', 'DX', 'Distributed XAction', 'CF' , 'Control File', 'INSTANCE', 'FS', 'File Set', 'IR', 'Instance Recovery', 'St', 'Disk Space Transaction', 'TS', 'Temp Segment ',' IV ',' Library Cache Invalida-Tion ',' LS ',' L OG Start Or Switch ',' RW ',' Row Wait ',' SQ ',' SEQUENCE NUMBER ',' TE ',' EXTEND TABLE ',' TT ',' TEMP TABLE ',' UNKNOWN ') LOCKTYPE FROM (SELECT * From V $ LOCK A, ALL_OBJECTS, V $ Session, V $ Process Where A.SID> 6 and Object_name <> 'OBJ $' and A.ID1 =
All_Objects.Object_id and a.sid = v $ session.sid and v $ process.addr = v $ session.paddralter system kill session 'SID, Serial #';