Yesterday I received a database backup from my client and he told me to restore it to current database. I asked him how much time I have. Being from non-technical background, he said you 1 full day to do this and I was so happy. I was quite sure that, restoring database backup is of 5 minutes job using SQL Server Management Studio.
So needless to stay, whole day I was in table tennis room. It was only half an hour remaining for end of day, I came to desk and tried to restore the backup and I received following error –
TITLE: Microsoft SQL Server Management Studio
Restore failed for Server 'MySQLServerName. (Microsoft.SqlServer.SmoExtended)
System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'MyDBName' database. (Microsoft.SqlServer.Smo)
Error Id -3154
I was trying to restore my backup from SSMS only and I received this error every time I tried to restore.bak file.
Solution –There are two ways by which you can restore .bak file in SQL Server 2008