sqlserver解决锁表问题:

select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName
from sys.dm_tran_locks where resource_type='OBJECT'

spid:进程Id;tableName :被锁表名; 解决:kill spid

mysql 中解决锁表问题:

查看哪些表被锁了:

show OPEN TABLES where In_use > 0;

查看锁表的进程

SELECT * FROM information_schema.innodb_trx;

查看所有进程

show processlist;

删出进程

kill 1085850;

相关文章:

  • 2021-10-10
  • 2021-11-02
  • 2021-05-23
  • 2021-07-30
  • 2022-12-23
  • 2021-11-13
  • 2021-11-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-08
  • 2021-12-10
  • 2022-12-23
  • 2021-12-06
  • 2022-01-27
相关资源
相似解决方案