标签 锁表 下的文章

分类: Oracle

Oracle查看当前session

查看当前不为空的连接select * from v$session where username is not null查看不同用户的连接数select username,count(username) from v$session where username is not null group by username连接数select count(*) from v$session并发连...

阅读全文 »

分类: MySQL

MySql锁等待Lock wait timeout exceeded锁表处理

现象A.数据更新或新增后数据经常自动回滚。B.表操作总报 Lock wait timeout exceeded 并长时间无反应解决方法A.应急方法:show full processlist; kill掉出现问题的进程B.根治方法:select * from innodb_trx;查看有是哪些事务占据了表资源。建议方法:设置MySQL锁等待超时SET GLOBAL innodb_lock_w...

阅读全文 »