Skip to content

Instantly share code, notes, and snippets.

@umair-me
Last active January 19, 2016 16:07
Show Gist options
  • Save umair-me/da575870e8693e96df90 to your computer and use it in GitHub Desktop.
Save umair-me/da575870e8693e96df90 to your computer and use it in GitHub Desktop.
Close all connections SQL server database
USE master
GO
ALTER DATABASE YourDatabaseName
SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment