Translate

Friday, 16 June 2017

sql : drop database when it is used in another process

USE master;
GO
ALTER DATABASE dbSample SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE dbSample
GO

No comments:

Post a Comment