For my production website, SQL Server 2008 R2 Standard (version 10.50.1600.1), and for my localhost database, SQL Server Express edition with Advanced Services (version 10.50.1600.1).
A few days ago, my SQL Server crashed, necessitating the installation of a fresh 2008 R2 Express copy on my localhost. The prior versions I restored from the Express edition worked just fine, but when I try to restore the database from the production server's.bak file, I get the following error:
Error: Specified cast is not valid. (SqlManagerUI)
When I try to restore the database using the command:
Use Master
Go
RESTORE DATABASE Publications
FROM DISK = 'C:\Publications.bak'
WITH MOVE 'Publications' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS2008R2\MSSQL\DATA\Publications.mdf',--adjust path
MOVE 'AlPublications_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS2008R2\MSSQL\DATA\Publications.ldf'
This makes different errors:
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing 'Publications' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
The versions have all been cross-checked. I think they all match, as evidenced by the picture below. Prior to today, I could successfully restore a database from the standard edition to the express edition. I attempted to reconstruct the database after deleting it. That also fails.
I'm unsure of what I'm doing incorrectly. Regarding, I would appreciate the assistance. As it appeared, the problem was solved. The backup file was damaged. It worked when I tried it with a different file.
Can someone please help me with this?