解决sql2005单个用户问题

运营中的一个系统突然出现了数据库名(单个用户),不能打开,不能做操作了,提示“数据库xx已打开,并且一次只能有一个用户”,错误:924。

搜索发现错误924是这么解释:

Error 924

Severity Level 14
Message Text

Database '%.*ls' is already open and can only have one user at a time.

Explanation

This error occurs when trying to access a database that is already in use by another user or session. Microsoft® SQL Server™ detected an attempt to access a database that is in single-user mode.

Action

Verify that the database in question is actually in single-user mode by executing this query (substitute your database name for <database>).

sp_helpdb <database>
GO

If the database is truly in single-user mode, the status result set column heading will list single user as the access mode.

To see what login is accessing the database, execute sp_who and scan the dbname result set column heading for the specified database.

If single-user mode privilege is a problem, contact your system administrator and ask to have the single-user mode database option set to multiuser. The system administrator can do so by executing sp_dboption from the master database, as shown here:

sp_dboption database, 'single user', false

根据提示执行sp_dboption 数据库名, 'single user', false
显示还是不能操作,看来必须找出占用数据库的用户,关掉进程才行,于是打开sql2005的管理--活动监视器,
结束占用进程,然后执行sp_dboption 数据库名, 'single user', false
刷新,单个用户的提示已经去掉啦


文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: sql2005 单个用户 error924
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.