Friday, February 24, 2012

How to close all concurrent connections to a database?

Hi all,
I'm wondering how to detect and close all concurent connection to a database
in SQL Server 2000. Could anyone give me a solution, plz?
Thanks!Hi,
You can execute:
ALTER DATABASE MyDatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE
and after the task u can set the database to multi user
ALTER DATABASE MyDatabase SET MULTI_USER
Thanks
Hari
SQL Server MVP
"Le Hoang Anh" <mr_khas@.yahoo.com> wrote in message
news:uDKfdv5xEHA.3624@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> I'm wondering how to detect and close all concurent connection to a
> database in SQL Server 2000. Could anyone give me a solution, plz?
> Thanks!
>

No comments:

Post a Comment