Close existing connections on SQL Server database

1157135 pts.
Tags:
SQL Server
SQL Server database
I'm trying to close all of my existing connections to SQL Server - I have to do a complete restore for my database. Here's what I tried so far:
alter database YourDb 
set single_user with rollback immediate
But I keep getting this message: Connection was not closed. What should I do?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Thanks for coming to ITKE. I did a web search of your question
and found many sites that have information that would assist you. Here is a
link to one of them: http://www.sqlservercentral.com/Forums/Topic1063979-1237-1.aspx

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    I've done it this way.

    sp_who

    Find you connections then get the ID#
    Then run 

    KILL ID# 
    136,240 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: