How to fix "The backup of the database in the backup set is different from the existing database" when restoring a database in SQL Server 2008



bak is a backup file, which is a file format extension.


How to fix "The backup of the database in the backup set is different from the existing database" when restoring a database in SQL Server 2008


    introduction

        I'm working on a project now. Since everyone is divided into modules, everyone's test data is not synchronized, which leads to a long-term error due to different data filled in by others. So I still restore a database myself and fill in my own data.

   report an error

         There are no problems with restoring many databases before. This time, I followed the previous steps to create a target database first, and then select the source file to restore. Finally reported this error:


Solution

 1. First of all, we should establish a target database before restoring the database, otherwise the system cannot find the target database error.

 

 2. Right click - restore database

 

3. Select the target database and source device.

 

4. Check the backup set to restore and click Options to go to the Options page

 

5. Check Overwrite existing database.


6. The database is restored successfully!


Summarize

        When I was working on a project these days, I always thought it was my code or logic because I didn’t produce the data. Later, I found out that the data was messed up by everyone, so it couldn’t match or come out. In fact, calm down. Think about it, your logic will be much clearer, and you can come up with many other possible reasons. Doing things many times does not mean that you have completely mastered it. Doing it over and over again and succeeding over and over again can only say that you are familiar with it, and you can flexibly avoid difficulties, etc., but it does not mean that the way to do it is There's nothing wrong with it, you just haven't met it yet. Therefore, we are still accumulating more of these basic knowledge now. When encountering problems, solving them is the most important thing! fight! ! ! !





    introduction

        I'm working on a project now. Since everyone is divided into modules, everyone's test data is not synchronized, which leads to a long-term error due to different data filled in by others. So I still restore a database myself and fill in my own data.

   report an error

         There are no problems with restoring many databases before. This time, I followed the previous steps to create a target database first, and then select the source file to restore. Finally reported this error:


Solution

 1. First of all, we should establish a target database before restoring the database, otherwise the system cannot find the target database error.

 

 2. Right click - restore database

 

3. Select the target database and source device.

 

4. Check the backup set to restore and click Options to go to the Options page

 

5. Check Overwrite existing database.


6. The database is restored successfully!


Summarize

        When I was working on a project these days, I always thought it was my code or logic because I didn’t produce the data. Later, I found out that the data was messed up by everyone, so it couldn’t match or come out. In fact, calm down. Think about it, your logic will be much clearer, and you can come up with many other possible reasons. Doing things many times does not mean that you have completely mastered it. Doing it over and over again and succeeding over and over again can only say that you are familiar with it, and you can flexibly avoid difficulties, etc., but it does not mean that the way to do it is There's nothing wrong with it, you just haven't met it yet. Therefore, we are still accumulating more of these basic knowledge now. When encountering problems, solving them is the most important thing! fight! ! ! !




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325592535&siteId=291194637