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

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

再修改为多用户模式

posted @ 2013-11-29 23:45  94cool  阅读(827)  评论(0编辑  收藏  举报