Showing posts with label imactually. Show all posts
Showing posts with label imactually. Show all posts

Wednesday, March 21, 2012

how close all current connections to server?

How do you give users/current connections "the boot" in SQL Server (I'm
actually using MSDE2000).
I want to close all current connections to a database (before
deleting/changing it) - is there a way to close all current connections to a
specified database?
thanks in advance,
Rua Haszard Morris.
Try
ALTER DATABASE MyDatabase
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
Hope this helps.
Dan Guzman
SQL Server MVP
"Rua Haszard Morris" <RuaHaszardMorris@.discussions.microsoft.com> wrote in
message news:F15B6DB3-5213-4D75-8A37-75E406EEE5B5@.microsoft.com...
> How do you give users/current connections "the boot" in SQL Server (I'm
> actually using MSDE2000).
> I want to close all current connections to a database (before
> deleting/changing it) - is there a way to close all current connections to
> a
> specified database?
> thanks in advance,
> Rua Haszard Morris.