To drop all connections to a Microsoft SQL Server database use:

alter database [DATABASE_NAME]

set single_user

with rollback immediate

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.