When restoring a backup, how do I disconnect all active connections?
You want to set your db to single user mode, do the restore, then set it back to multiuser: ALTER DATABASE YourDB SET SINGLE_USER WITH ROLLBACK AFTER 60 –this will give your current connections 60 seconds to complete –Do Actual Restore RESTORE DATABASE YourDB FROM DISK = ‘D:\BackUp\YourBaackUpFile.bak’ WITH MOVE ‘YourMDFLogicalName’ TO ‘D:\Data\YourMDFFile.mdf’, MOVE ‘YourLDFLogicalName’ … Read more