He backup set holds a backup of a database other than the existing - what should I do?
I'm trying to restore my production .bak file to a new local instance using the belowscript but I still get this error:
The backup set holds a backup of a database other than the existing MyDatabase database.
I'm using SQL Server 2019.
USE [master]
RESTORE DATABASE [MyDatabase]
FROM DISK = 'C:MyDatabase.bak'
WITH
MOVE 'MyDatabase' TO 'C:MyDatabase.mdf',
MOVE 'MyDatabase_log' TO 'C:MyDatabase_log.ldf',
REPLACE
GO