Solved

Database stuck in single user mode and can't kill System SPID

Posted on 2011-09-14
5
1,284 Views
Last Modified: 2012-05-12
Hi,

I have a database on SQL server 2008 that's stuck in single user mode. I put it in that mode to do a restore. But the restore failed because it could not obtain exclusive access. When I go in to kill the SPID, I see that it's a system process spid < 20. There are multiple system spid's that are blocking each other and won't let me access the database. I tried to take the database offline, detach it, delete it. All of those failed. Is there any other way for me to gain access back into the database?

Thank you!
0
Comment
Question by:LV_DBA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Assisted Solution

by:LIONKING
LIONKING earned 125 total points
ID: 36539748
Have you tried stopping the sql service and then starting it again?
0
 
LVL 25

Assisted Solution

by:TempDBA
TempDBA earned 125 total points
ID: 36541074
What the system spid says? Try running checkpoint and  running the following command let see what it has to say:-

ALTER DATABASE <dbname> SET MULTI_USER
0
 
LVL 10

Assisted Solution

by:Ramesh Babu Vavilla
Ramesh Babu Vavilla earned 125 total points
ID: 36541226
      alter database <dbname> set multi_user with rollback immediate
----------------------or------------
       alter database <dbname> set multi_user with no_wait
0
 
LVL 5

Accepted Solution

by:
VENKAT KOKULLA earned 125 total points
ID: 36547572
Try this command:

1) ALTER DATABASE MyDatabaseName SET MULTI_USER WITH ROLLBACK IMMEDIATE

2) If not, try the ADMIN:ServerName and it should open an emergency admin session

Then you can go into the SQL Server to ALTER DATABASE [name] SET MULTI_USER

3) If both of above points won't workout then restart the SQL Services and then run the command mentioned in the first point will surely resolve the issue.

0
 

Author Comment

by:LV_DBA
ID: 37160314
Thanks Everyone! I am sorry for not responding earlier. I had to restart SQL services and then run the ALTER DATABASE [name] SET MULTI_USER. I had to restart and run the command a couple of times before it would take.
 
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question