Wednesday, January 4, 2012

Kill All Active Connections To A Database

use master

ALTER DATABASE [Northwind] SET SINGLE_USER WITH ROLLBACK IMMEDIATE

ALTER DATABASE [Northwind] SET MULTI_USER

Thanks to:
http://goo.gl/QqmX2
http://goo.gl/xNM2m

No comments: