Home > Database > Mysql Tutorial > 由于无法在数据库 'TestNonContainedDB' 上放置锁 ALTER

由于无法在数据库 'TestNonContainedDB' 上放置锁 ALTER

WBOY
Release: 2016-06-07 15:10:54
Original
2083 people have browsed it

Error: 消息5601,级别16,状态1,第1行,由于无法在数据库 'TestNonContainedDB' 上放置锁,ALTER DATABASE 失败。请稍后再试。消息5069,级别16,状态1,第一行ALTER DATABASE 语句失败。 对应的英文信息是:Msg 5061, Level 16, State 1, Line 1 ALTER DAT

Error:

消息5601,级别16,状态1,第1行,由于无法在数据库 'TestNonContainedDB' 上放置锁,ALTER DATABASE 失败。请稍后再试。消息5069,级别16,状态1,第一行ALTER DATABASE 语句失败。

对应的英文信息是:Msg 5061, Level 16, State 1, Line 1 ALTER DATABASE failed because a lock could not be placed on database 'TestNonContainedDB'. Try again later. Msg 5069, Level 16, State 1, Line 1 ALTER DATABASE statement failed.

 

Solution:

declare @kill varchar(8000) = '';
select @kill=@kill+'kill '+convert(varchar(5),spid)+';'
from master..sysprocesses
where dbid=db_id('WSS_Content_81');
exec (@kill);

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