Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there anyway to restart one database in SQL Server instead of restarting the entire server? I have a task in perpetual rollback on one of my databases. I'd like to restart it without turning off / on the other DBs

share|improve this question

migrated from Sep 5 '12 at 13:34

This question came from our site for professional and enthusiast programmers.

What do you mean 'restart' a database? – Arran Sep 5 '12 at 13:34

You can try taking it offline, and then online again:

use master

alter database YourDatabase
set offline
with rollback immediate

alter database YourDatabase
set online

As per BOL:

OFFLINE : The database is closed, shut down cleanly, and marked offline. The database cannot be modified while it is offline.

share|improve this answer
+1 but not sure if this can fix perpetual rollbacks – Andomar Sep 5 '12 at 13:41
@Andomar To be honest, neither am I. I'd have to run a test to verify. But that'd be my next step. – Thomas Stringer Sep 5 '12 at 13:55
up vote 0 down vote accepted

I tried to take the DB offline, but because of the perpetual rollback wasn't able to do so. Had to eventually restart the server

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.