What version of SQL Server?
ALTER DATABASE <databasename> SET single_user WITH ROLLBACK IMMEDIATE
For 7.0, you will need to run a cursor against the spids in sysprocesses,
and use dynamic SQL to exec kill commands against each of them...
"Mircea Berghia" <berghiaioanmircea> wrote in message
news:#wJc6q7RDHA.1552TK2MSFTNGP10.phx.gbl...> Hi ,
> How can I break up all sql connections?
> I need this in order to restore a database after that.