【整合】ORACLE、MYSQL出现锁表,手动kill掉进程
程序员文章站
2024-01-14 17:18:40
...
ORACLE、MYSQL出现锁表,手动kill掉
1、ORACLE查出哪些是锁表的sql
select t2.username,t2,sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2 where t1.session_id=t2.sid order by t2.logon_time```
2、ORACLEkill锁表进程
例:alter system kill session '300,10291'
3、MYSQL查进程
show processlist
4、MYSQL手动挑出锁住的进程并杀掉
例:kill 12345