oracle查看被锁的表和被锁的进程以及杀掉这个进程
-- 1. 查看被锁的表
SELECT p.spid, a.serial#, c.object_name, b.session_id, b.oracle_username,b.os_user_name FROM v$process p, v$session a, v$locked_object b, all_objects c WHERE p.addr = a.paddr AND a.process = b.process AND c.object_id = b.object_id
-- 2. 查看是哪个进程锁的
SELECT sid, serial#, username, status, osuser FROM v$session where serial# = '5002' SELECT sid, serial#, username, status, osuser FROM v$session where serial# = '3789'
-- 3. 杀掉这个进程
alter system kill session 'sid,serial#'; alter system kill session '269,3789'; alter system kill session '34,4661'; alter system kill session '265,5002'; alter system kill session '289,1688'; alter system kill session '282,5799';
相关推荐
oraclemch 2020-11-06
solarspot 2020-07-28
houmenghu 2020-11-17
我心似明月 2020-11-09
ltd00 2020-09-12
康慧欣 2020-09-10
waveclouds 2020-09-04
蓝色深海 2020-09-15
jincheng 2020-09-01
思君夜未眠 2020-08-25
取个好名字真难 2020-08-06
歆萌 2020-08-03
阳光之吻 2020-08-03
婷婷小屋 2020-07-28
MLXY 2020-07-26
dxbjfu0 2020-07-26
songbinxu 2020-07-19
83520298 2020-07-06