Home Forums SQL Server 2008 SQL Server 2008 Administration Kill All Spid(s) according to Database Name RE: Kill All Spid(s) according to Database Name
Daxesh Patel
Hall of Fame
Points: 3208
More actions
June 14, 2012 at 7:44 am
#1501008
Following works fine with me in scheduled restore.
ALTER DATABASE DatabseName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
--DO restore
SET MULTI_USER