无法独占锁定数据库以执行操作。 [英] The database could not be exclusively locked to perform the operation.
本文介绍了无法独占锁定数据库以执行操作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿伙计,
我想更新我的数据库'AKARAT_ERP'
和将排序规则设置为'ARABIC_CI_AS'
我收到此错误
数据库无法完全锁定以执行操作。
任何想法?
Hey Guys,
i'am trying to update my database 'AKARAT_ERP'
and set the collation to 'ARABIC_CI_AS'
and i am getting this ERROR
The database could not be exclusively locked to perform the operation.
Any Ideas?
推荐答案
使用以下命令
use following commands
ALTER DATABASE AKARAT_ERP SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE AKARAT_ERP COLLATE ARABIC_CI_AS
ALTER DATABASE AKARAT_ERP SET MULTI_USER
当数据库在某处使用时,通常会发生此错误。将数据库设置为单用户模式,进行更改并将模式设置为原始模式
This error normally occurs when the Database is in use somewhere. Set the database to Single User Mode, do the changes & set the mode to its original
USE master;
GO
ALTER DATABASE AdventureWorks2012
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE AdventureWorks2012
SET MULTI_USER;
GO
这篇关于无法独占锁定数据库以执行操作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文