"Oracle Series-lock table and unlock solution (Big recruit version)"
--1 Viewing a locked table
Select B.owner,b.object_name,a.session_id,a.locked_mode from V$locked_object a,dba_objects b where b.object_id = a.object_id;
--2 look at that user, that process is a deadlock.
Select B.username,b.sid,b.serial#,logon_time from V$locked_object a,v$session b where a.session_id = B.sid ORDER by B.logo N_time;
--3 viewing a connected process
SELECT SID, Serial#, username, osuser from v$session;
--4 Common Kill recruit List-------------------------------
SELECT ' alter system kill session ' | | Ta.sid | | ', ' | | ta.serial# | | ‘‘‘;‘,
' ALTER system disconnect session ' | | Ta.sid | | ', ' | | ta.serial# | | "' immediate; ',
' Host Orakill ' | | Tc.instance_name | | "| | Tb.spid,
' Kill-9 ' | | Tb.spid,
Tb.spid,
Ta.osuser,
Tb.program,
Ta.terminal,
Ta.program
From V$session TA, v$process TB, v$instance TC
WHERE tb.addr = ta.paddr
and Ta.sid = &yoursid;
--5 Kill Process sid,serial# (normal kill)
Alter system kill session ' 15,245 ';
--6 forced interrupt process (buff kill)-very easy to use (cause the card machine no response-directly)
Alter system disconnect session ' 137,212 ' immediate;
--7 Ultimate Kill (big strokes Kill)
--CD to system root c:/xxx
--orakill Oracle_sid Os_thread;
--demo C:/orakill ORCL 245;
PS: To solve the problem is the kingly way.
http://www.cnblogs.com/gushi9908/
Oracle Series-Lock table and Unlock solution (fencing version)