Monday, April 6, 2015

sql server close all connections to current database database in use error

use master
ALTER DATABASE mwa SET SINGLE_USER WITH ROLLBACK IMMEDIATE

--do you stuff here

ALTER DATABASE mwa SET MULTI_USER

No comments:

Post a Comment