Vuoi impostare il tuo db in modalità utente singolo, eseguire il ripristino, quindi reimpostarlo su multiutente:
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' TO 'D:\Data\YourLDFFile.ldf'
/*If there is no error in statement before database will be in multiuser
mode. If error occurs please execute following command it will convert
database in multi user.*/
ALTER DATABASE YourDB SET MULTI_USER
GO
Riferimento:Pinal Dave (http://blog.SQLAuthority.com )
Riferimento ufficiale:https://msdn.microsoft.com/en-us/ libreria/ms345598.aspx