Index > Microsoft SQL Server > How to Clear SQL Server Database Connections

Microsoft SQL Server:  SQL Server 2005 Express Edition

How to Clear SQL Server Database Connections

Clear SQL Server database connections with a simple one-line statement.

Added on 25 Feb 2009

General Solutions:

Solution Summary:
Execute the following statement (replacing "DBName" with the database name) to clear all active SQL connections to the database.
Solution Details:


While the database should "immediately" return to multi-user after killing the other connections, you may find that it does not; and now users are unable to connect.  Therefore, after executing this statement, you may need to execute another:

Was this solution useful? Yes No Added on 25 Feb 2009

Copyright 2017 © E-Centric, Inc. | Terms of Use