Sql 2008 Error :The backup set holds a backup of a database other than the existing database.

by daz 7/29/2010 11:31:00 PM

An expert is a person who has special skill or knowledge in some particular field; definition from most dictionaries.

Well, i believe an expert is not more than someone who is able to reproduce a solution to a problem or situation given by others.

In other word EXPERT is mmaybe sonmeone who have seen what you haven't yet seen in the programing languages. I alway encourage each programmer have google in his priority friends list.
Well , yesterday a from the State collegue run into a problem (creating) restoring a DB in Viisual studio 2008
He reported the error :The backup set holds a backup of a database other than the existing database and i believe the error number Error 3154;
Well through my year of experience in asp.net and MSSQL i have seen this at least once and as always i log my errors and solution in a my log bloc not.
the solution to this problem is just a line of code

RESTORE  DATABASE  MyNewDB

} }}

FROM 

 

DISK = 'C:\myBackupDB.bak' WITH REPLACE


That s all you need ..
Hopefully the above code will help you that is reading this..
again
1) Use WITH REPLACE while using the RESTORE command.
2) Delete the older database which is conflicting and restore again using RESTORE command.
those 2 steps is the solution to ya problem..remember , i am not an expert..I have seen it before you

 

 

About the author

Name of author
DavidZ
.Net Programmer
E-mail me Send mail
aspdotnetstorefront hosting

Partners

Repertoire canada

Recent comments

Archive

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012

Sign in