Possible to restart single database in SQL Server 2005?

Posted on 2011-10-12
Last Modified: 2012-05-12
Hello Experts,

     I have a SQL Server running about 3 databases.  1 is hit pretty hard from time to time by our data analysts.  Every now and then that single database begins to respond very slowly to queries that make it hard to work with.  When this happens a reboot of the server after hours will resolve the issue for them.  Is there a better way to handle this without rebooting the server or that won't affect the other databases?  
Question by:bobohost
    LVL 28

    Assisted Solution

    It sounds like there are long running queries, abandoned queries, or open connections. I would check for those and fix the root of the problem first. The next thing you can do is to take the database offline and the bring it back online (via right-click menu). That will probably do what you need it to.
    LVL 11

    Accepted Solution

    I agree with strickdd, it would be best to find the cause of the problems. Meantime, this is from, and may be helpful in the short term:

    I don't know if taking an individual DB offline and then putting it back online is equivalent to restarting the SQL service (from the DB's standpoint, at least - it's definitely not for the service), but it will "reset" the DB to the extent that it will close all existing connections and rollback any open transactions. If that's the effect you're after, then it might be sufficient, and it won't affect any other databases running on that SQL instance.

    From SSMS, you can use this SQL:

    -- 'rollback immediate' will disconnect existing users w/out
    -- waiting for transactions to finish.

    Here's the link to the forum:
    LVL 6

    Author Comment

    Where can I go to see if there are abandoned or running queries?  I'm not a SQL admin just trying to help out these guys until they find somebody.

    Assisted Solution

    SQL Managment Studio 2008R2 Express edition. After you have installed it look at the last icon on the toolbar menu called "Activity Monitor". That will show you all the information you want.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
    INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now