zl程序教程

您现在的位置是:首页 >  其他

当前栏目

mssql 中文乱码 字库集 问题解决方法

中文方法 解决 乱码 问题
2023-09-11 14:15:05 时间

The database could not be exclusively locked to perform the operation(SQL Server 5030错误解决办法)

 

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.然后alter database wlfx collate Chinese_PRC_CI_AS

3.执行SQL ALTER DATABASE db_database SET MULTI_USER

再修改为多用户模式