1. See which objects are locked
Select S.username, decode (l.type, ' TM ', ' TABLE lock ', ' TX ', ' ROW lock ', NULL) lock_level, O.owner, O.object_name, o.object_type, s.sid, s.serial#, s.terminal, s.machine , S.program, S.osuser from v$session S, v$lock l, dba_objects o where s.sid = L.sid and o.object_id = l.id1
and s.username is not null;
2. The following statement is used to kill a process:
Alter system kill session ' 33,456 '; ---33,456 of them are sid,serial# of the above query.
3, once again query the currently locked objects, if found that the above method can not unlock the table, the following methods:
(1) Execute the following statement to get the process (thread) Number:
Select spid, Osuser, S.program from V$session S, v$process p where s.paddr = P.addr and S.SID =;---33 is the SID above
(2) Kill the process on the OS
Linux:
Kill-9 3333 (3333 for process number)
Windows (Unix also applies) kills threads with Orakill, Orakill is an executable command provided by Oracle, syntax: Orakill SID thread
Sid: Indicates the instance name of the process to be killed thread : The number of threads to be killed, that is, the SPID that is queried in step 3rd.
Cases:
C:>orakill ORCL 3333
Oracle unlock, Oracle lock table processing