February 17, 2006 at 3:21 pm
Hi all,
somehow, I got one of my database is set as single user mode... on E. manager, it says like :
database_name(Single USer)
and I can not do anything with this database.. cant open the table, backup, add user, etc.
seems like there is some process that locking this database..
Please advise how to make things normal again
i mean, to remove the single user mode.
Thanks Guys,
Best regards
February 17, 2006 at 3:35 pm
February 17, 2006 at 3:57 pm
It does not work
I got this 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.
sp_dboption command failed."
How to solve it?
seems like we need to clear the user connection, please advise on this issue.
thanks
February 17, 2006 at 4:01 pm
Use EM to find out who is connected to that database. I imagine it is your EM session. Shut down your EM and try the QA command again.
February 17, 2006 at 4:11 pm
EM was closed when I run that query..
however, when I check it using EM, the datbase is locked, by its user database.. the status is sleeping... awaiting command..
and when I try to kill this process, it won't removed.. it still there
please advise
February 17, 2006 at 4:24 pm
When you say the database is locked by its user database, what does that mean? Doesn't it give you a user name? Do you recognize the host name?
Right-click on the database and select 'Detach'. When the Detach database window comes up, clear the database connection. Then click cancel. You do not want to detach it, just clear the connection. Then open QA and run the command I gave you.
February 17, 2006 at 4:34 pm
Thanks so Much
it works
July 4, 2006 at 1:05 am
Check your terminal connection too.
It may be that you are having two session on it.One running and one disconnected by earlier session.
Logged of the disconnected session and run
sp_dboption '<your DB name>', 'SINGLE_USER', false
It works perfectly.
Cheers......!
Pawan kumar
August 3, 2007 at 10:44 am
This was a big help... especially going into detach mode to drop the attached user. Thanks.
Kurt W. Zimmerman
SR DBA
Lefrak Organization
New York, NY
http://www.linkedin.com/in/kurtwzimmerman
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply