Home > Database > Mysql Tutorial > body text

已超过了锁请求超时时段。(MicrosoftSQLServer,错误:1222)

WBOY
Release: 2016-06-07 16:10:16
Original
3369 people have browsed it

操作SQLServer数据库时,遇到这样的问题:已超过了锁请求超时时段。 (Microsoft SQL Server,错误: 1222) 经过查找材料了解为资源抢占,照成死锁,杀死进程就OK了,具体操作如下: select spId from master..SysProcesses where db_Name(dbID) = 数据库名称 a

操作SQLServer数据库时,遇到这样的问题:已超过了锁请求超时时段。 (Microsoft SQL Server,错误: 1222)

经过查找材料了解为资源抢占,照成死锁,杀死进程就OK了,具体操作如下:

select spId
  from master..SysProcesses
 where db_Name(dbID) = '数据库名称'
   and spId <> @@SpId
   and dbID <> 0
Copy after login
上面语句是获取进程ID,下面就是根据ID杀死相应进程
exec (&#39;Kill &#39;+spId(进程ID))
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template