Sql Server 2012 prompts "no backup set to restore" solution when restoring database

 

Today, I backed up a database file on the server, and when I restore it locally based on the device, it always prompts "The backup set to be restored is not selected". As shown below:



 

 

By normal logic, when the correct backup file is specified for the device. The source database will be loaded with the database that needs to be restored by default, and the default backup set to be restored will also be selected. However, the landlord did not follow the normal logic... The error is as shown in the figure above.
So all kinds of Baidu, google....

1. Run the following sql command to check whether the database backup file is correct.

restore headeronly from disk='[backup file name]'  
   
--> Return to the result set,  
-- The DatabaseName field is the original database name.  
-- The DatabaseVersion field is the original database version.

 2. Run the command of the first step, but another error "The structure of the media family is incorrect. SQL Server cannot process the secondary media family".

I don't know what that is, but there is a great god on Baidu who suggested to check "whether the database instances are the same"?

 

The local database has two database instances by default. The first is a 2008 instance and the second is a 2012 instance. Because the server installed 2012, restore the 2012 backup file with the 2008 database

 

3. Let's switch the database instance and try it with 2012..

 

Run the sql command provided in the first step, and it is successful, as shown in the following figure:

 
There are two backup records, DatabaseName is the backup database name, and DatabaseVersion is the backup version.
Continue to restore the database: database -> restore database -> device -> add backup media (that is, backup files) -> OK. There is another error "The restore plan cannot be created because the LSN link is broken. (Microsoft.SqlServer.SmoExtended)" as shown below:

 
The database to be restored is out (finally one step closer to success) , but the backup set to be restored is still Is it empty? The OK button can't be used, what should I do?
4. Is it caused by multiple backups in the backup set? I decided to try the method of "restore files and filegroups"
Right click on "Restore files and filegroups"


 
Next, select the source device and specify the backup file to restore

 
Finally, select or set the target database name, select the backup set to restore from, and then OK.

 
ok, just like that, you're really done!
 
 

Guess you like

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