Kill all Connections

There are times you want to kill all the connections in a database. This would do that trick. This can be very useful when you replace a database regularly and some connections still exist so your automated restore fails. You can issue this command to kill all the connections before issuing a restore command.

2002-04-17

2,421 reads

Blogs

Daily Coping 8 Jul 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

Don’t be afraid of No

By

How many times have you been afraid to hear “No”? We have all been...

Spark .NET - Spark ML TF-IDF

By

Spark ML in .NET for Apache Spark Spark is awesome, .NET is awesome, machine...

Read the latest Blogs

Forums

DBCC CHECKDB output

By stevec883

I ran a DBCC on a database and it found some anomalies. Just looking...

Why is sys.master_files showing the size of RBS files as 0?

By hurricaneDBA

Dear Everyone I hope you are all safe in these strange times. I am...

In where condition use column value which contains column name

By rohit.kumar.barik

Hi Team, Greetings! I have below table. let table name =Emp I need to...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers