[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1797
  • Last Modified:

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

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
LV_DBA
Asked:
LV_DBA
4 Solutions
 
LIONKINGCommented:
Have you tried stopping the sql service and then starting it again?
0
 
TempDBACommented:
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
 
Ramesh Babu VavillaCommented:
      alter database <dbname> set multi_user with rollback immediate
----------------------or------------
       alter database <dbname> set multi_user with no_wait
0
 
VENKAT KOKULLASQL Server DBACommented:
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
 
LV_DBAAuthor Commented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now