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