USE [master]
ALTER DATABASE [DB Name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE DB Name FROM DISK = N'\\File Path' WITH FILE = 1
, NOUNLOAD, REPLACE, STATS = 5
ALTER DATABASE DB Name SET MULTI_USER
GO
ALTER DATABASE [DB Name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE DB Name FROM DISK = N'\\File Path' WITH FILE = 1
, NOUNLOAD, REPLACE, STATS = 5
ALTER DATABASE DB Name SET MULTI_USER
GO