Sorry if this is a silly question; I'm new to MS SQL Server...
In trying to simply copy a database an error occured (unfortunately I didn't
record the original error as it has happened before) resulting in the
original database instance remaining in Single User mode.
I've tried all the usual querys to place the db in multi-user mode only to
get the following message:
Msg 5064, Level 16, State 1, Line 1
Changes to the state or options of database 'Revision_SANDBOX' cannot be
made at this time. The database is in single-user mode, and a user is
currently connected to it.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
I can't even Detach or Take Offline the db now. I have a backup ready to
restore but I can't unlock the current instance to do anything.
Can someone please point me in a direction to be able to remove the locked
db instance so I can reload it with my backup?
Thanks so much...
Jonathan Psaila-Depasquale - 05 Sep 2007 09:31 GMT
Hi,
Run sp_who. One of the columns returned will be dbname. Record the
spid that is connected to the database in question. Then run the Kill
command using the spid you recorded earlier.
Jonathan
> Sorry if this is a silly question; I'm new to MS SQL Server...
>
[quoted text clipped - 19 lines]
>
> Thanks so much...