--sql查询  所有被锁定的表

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

spid   锁表进程 
tableName   被锁表名
 
解锁:
 
declare @spid  int 
Set @spid  = 57 --锁表进程
declare @sql varchar(1000)
set @sql='kill '+cast(@spid  as varchar)
exec(@sql)

最新文章

  1. myeclipse给项目改了名字,但部署tomcat的项目名还是原来的
  2. Hash函数及其应用
  3. C#委托学习
  4. 捉襟见肘之message sent to deallocated instance 0x16f62a70
  5. 初探Asp.net5
  6. ubuntu set host name
  7. split和join和pop和remove用法
  8. 把WCF服务部署服务器IIS异常(详细:处理程序“svc-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”)
  9. 兜转数年,老跳成了卖过软件开过店写过APP的电脑老师
  10. CSS3实现一束光划过图片、和文字特效
  11. C语言学习的第一章
  12. Andriod studio 目录结构
  13. linux的基本操作(NFS服务配置)
  14. jQuery 筛选器2
  15. SDN期末
  16. Windows 环境 cygwin 安装 SSH
  17. rpm 安装zabbix 注意
  18. JS冒泡排序的6种写法(武当雄风)
  19. 纪念第一次ak。。。
  20. python中的字符串和编码

热门文章

  1. Android 代码中文字在手机上显示乱码问题解决方法
  2. Github简明教程(转)
  3. asp.net操作xml
  4. mysql tinyint smallint mediumint int bigint
  5. 使用Aspose.Cell控件实现Excel高难度报表的生成(二)
  6. Apple Demo
  7. SQL Server Logical/Physical Reads
  8. dataguard集群搭建
  9. linux多个python版本下导致no request报错
  10. 微信开发教程 Yank.WeiXin.Robot