SQL Server 5030错误解决办法

今天在使用SQL Server时,由于之前创建数据库忘记了设置Collocation,数据库中插入中文字符都是乱码,于是到DataBase的Options中修改Collocation,出现了The database could not be exclusively locked to perform the operation这个错误,无法修改字符集为Chinese_PRC_90_CI_AS。

解决办法找了很久才找到,如下:

1.执行SQL ALTER DATABASE db_database SET SINGLE_USER WITH ROLLBACK IMMEDIATE

修改为单用户模式

2.然后关闭所有的查询窗口,修改Options的Collocation属性为Chinese_PRC_90_CI_AS

3.执行SQL ALTER DATABASE db_database SET MULTI_USER

再修改为多用户模式

相关文章:

  • 2021-05-15
  • 2022-01-12
  • 2021-09-11
  • 2021-10-08
  • 2021-12-11
  • 2022-12-23
  • 2021-05-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-10-16
相关资源
相似解决方案