Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Tag: Restore

Kill All User Processes Connections For A Database

14 June, 2012 | SQL Server, T-SQL | By: Michael Merrell

When performing some actions in SQL Server against an existing database, like restore or take offline, it will fail if there are currently any users or processes accessing the database. The problem with this is that even on SQL Server 2008 Management Studio there is no easy way to just drop existing connections. A lot of times these process connections that keep you from performing your desired action are actually inactive as a process can sit inactive on SQL Server for a good deal of time. The Easiest way to accomplish the goal that I have found is with the [Read More…]