oracle查看被锁的表和被锁的进程以及杀掉这个进程
--1.查看被锁的表
SELECTp.spid,a.serial#,c.object_name,b.session_id,b.oracle_username,b.os_user_name FROMv$processp,v$sessiona,v$locked_objectb,all_objectsc WHEREp.addr=a.paddr ANDa.process=b.process ANDc.object_id=b.object_id
--2.查看是哪个进程锁的
SELECTsid,serial#,username,status,osuserFROMv$sessionwhereserial#='5002' SELECTsid,serial#,username,status,osuserFROMv$sessionwhereserial#='3789'
--3.杀掉这个进程
altersystemkillsession'sid,serial#'; altersystemkillsession'269,3789'; altersystemkillsession'34,4661'; altersystemkillsession'265,5002'; altersystemkillsession'289,1688'; altersystemkillsession'282,5799';