Sunday, March 11, 2012

change user mode

Hi group,
I have a db that I changed from multiple user to single user, and want to
change it back now. However, it keeps giving me the message below. I have
checked with EM and sysprocesses that there is no connection to it. Any
suggestion what I can do?
Thanks.
Quentin
message:
Server: Msg 5064, Level 16, State 1, Line 1
Changes to the state or options of database 'mydb' cannot be made at this
time. The database is in single-user mode, and a user is currently connected
to it.
Server: Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Try running the following script from Query Analyzer:
ALTER DATABASE mydb
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE mydb
SET MULTI_USER
Hope this helps.
Dan Guzman
SQL Server MVP
"Quentin Ran" <ab@.who.com> wrote in message
news:uiK0UuSPEHA.1340@.TK2MSFTNGP12.phx.gbl...
> Hi group,
> I have a db that I changed from multiple user to single user, and want to
> change it back now. However, it keeps giving me the message below. I
have
> checked with EM and sysprocesses that there is no connection to it. Any
> suggestion what I can do?
> Thanks.
> Quentin
>
> message:
> Server: Msg 5064, Level 16, State 1, Line 1
> Changes to the state or options of database 'mydb' cannot be made at this
> time. The database is in single-user mode, and a user is currently
connected
> to it.
> Server: Msg 5069, Level 16, State 1, Line 1
> ALTER DATABASE statement failed.
>
|||Thanks Dan. The error message war the result of the T-sql statement.
Quentin
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:e0yhhFTPEHA.632@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Try running the following script from Query Analyzer:
> ALTER DATABASE mydb
> SET SINGLE_USER WITH ROLLBACK IMMEDIATE
> ALTER DATABASE mydb
> SET MULTI_USER
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Quentin Ran" <ab@.who.com> wrote in message
> news:uiK0UuSPEHA.1340@.TK2MSFTNGP12.phx.gbl...
to[vbcol=seagreen]
> have
this
> connected
>

No comments:

Post a Comment