[Oracle] handle lock table

Queries lock table

select object_name,machine,s.sid,s.serial# 
from v$locked_object l,dba_objects o ,v$session s
where l.object_id = o.object_id and l.session_id=s.sid ;


Table kill (within the program kill)
ALTER the kill the session System '543,9206';

 

If you can not kill this investigation to get the spid (spid to have acquired rights to the network administrator, he will give you kill. This program belongs to kill outside, finished killing the PL / SQL necessary to re-log in)
the SELECT A .spid, b.sid, b.serial #, b.username 
from V $ Process A, V B $ the session 
WHERE a.addr = b.paddr 
and b.status = 'KILLED';


Sid the above query validation query is correct spid
SELECT b.spid, a.osuser, b.program 
  from the session V $ A, $ V Process B 
 WHERE a.paddr = b.addr 
   and a.sid = 543    

Guess you like

Origin www.cnblogs.com/xiangtunmizu/p/11846228.html
Recommended