Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restoring backup requires Single User
Message
From
22/11/2021 11:04:52
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Backups
Title:
Restoring backup requires Single User
Miscellaneous
Thread ID:
01682769
Message ID:
01682769
Views:
27
Since recently, I started to have difficulties restoring a backup of the database. I always had this database is in used. The only way I have found to be able to restore is to add a Single User approach :
USE Master
GO

ALTER DATABASE DatabaseName
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
GO

RESTORE DATABASE DatabaseName FROM DISK = N'D:\Data\DatabasePath\DatabaseName.bak'
Anyone would know why I have to do this now?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform