April 23, 2008 at 2:08 am
Hi experts,
I just want to know how can i kill all the processes of a database
if the database have more than 100 connections.This is for the purpose of restoring a database.
April 23, 2008 at 2:34 am
The best way would be to put the database in Single User Mode using sp_dboptions (which would not allow further connections) and kill the existing ones.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
April 23, 2008 at 5:30 am
you can use a script like this http://www.sqlservercentral.com/scripts/Maintenance+and+Management/31830/
to kill all connections to a database
April 24, 2008 at 7:08 am
Or, to be just a little more dramatic, detach the database. One of the options is to drop all connections. Then, you can simply re-attach the database.
April 24, 2008 at 9:10 am
You can select detach database, use the close all connections option, and cancel the detach, and it leaves the database up, yet kills all the connections.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply