Close Connections

  • Code below quickly closes all connections to database.
USE master
ALTER DATABASE DBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE 
 
-- your code 
 
ALTER DATABASE DBname SET MULTI_USER
programming/mssql/closeconnections.txt · Last modified: 2018-06-21 19:48 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0