July 28, 2012 at 3:42 am
Trying to repair database from Backup file giving errors .
Restore failed for Server 'USER-PC\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)
The backup set holds a backup of a database other than the existing 'FLEX'
I am using the backup of the same daabse tried many metods. All failed
Server error messages as follows.
Restore failed for Server 'USER-PC\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)
at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()
System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'FLEX' database. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages)
at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
July 28, 2012 at 5:03 am
RESTORE ... WITH REPLACE
Just check that the backup does contain what you think it does (restore headeronly) as that message means exactly what it says.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 28, 2012 at 9:12 am
and in addition to restore headeronly you can also execute "restore filelistonly" to get a list of the database and log files that are contained in the backup set from which you are trying to restore.
Also discussion from the following URL may prove useful for you ( they are suggesting the same as what Gail suggested, namely the REPLACE option)
http://msdn.microsoft.com/en-us/library/aa238217(v=sql.80).aspx
http://blog.sqlauthority.com/2007/09/27/sql-server-fix-error-3154-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing-database/[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply