1. 首页
  2. 操作系统
  3. Windows Server
  4. 查看Sql Server被锁的表以及解锁

查看Sql Server被锁的表以及解锁

上传者: 2020-12-17 08:34:50上传 PDF文件 17KB 热度 28次
查看被锁表: select spId from master..SysProcesses where db_Name(dbID) = '数据库名称' and spId <> @@SpId and dbID <> 0 解除锁: exec ('Kill '+cast(@spid as varchar)) 查看被锁表: select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sy
下载地址
用户评论