-- View database lock details select. sid, B. serial #, B. username, B. osuser, B. machine, B. program, C. object_name, D. spid, decode (. type, 'Mr ', 'Media recovery', 'rt ', 'redo thread', 'UN', 'user name', 'tx ', 'Transaction ', 'Tm ', 'dml', 'U', 'pl/SQL user lock', 'dx', 'distributed xaction', 'cf', 'control file ', 'Is ', 'instance State', 'fs', 'file set', 'ir', 'instance recovery ', 'st', 'disk space transaction ', 'ts', 'temp segment ', 'iv', 'library cache invalida-tion ', 'Ls', 'Log start or switch', 'rw ', 'row wait', 'sq ', 'sequence number', 'te', 'extend table', 'TT', 'temp table', 'unknown') locktype, decode (. lmode, 0, 'none', 1, 'null', 2, 'row-S', 3, 'row-x', 4, 'share', 5, 's/row-x', 6, 'clusive ', 'unknown') lockmode from V $ lock a, V $ session B, all_objects C, V $ process d Where. SID = B. sid and. type in ('TT', 'tx ') and C. object_id =. id1 and B. paddr = D. ADDR; -- kill the process -- alter system kill session 'sid, serial #';