Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sql server restoring back up error

I have backed up a database I had created on an other machine running SQL server 2012 express edition and I wanted to restore it on my machine, which is running the same. I have ticked the checkbox overwriting existing one, and got this error:

Backup mediaset is not complete. Files: D:\question.bak. Family count:2. Missing family sequence number:1    
like image 578
danarj Avatar asked Apr 08 '13 21:04

danarj


People also ask

How do I restore a SQL Server database backup?

Open Microsoft SQL Server Management Studio. In the left navigation bar, right-click on Databases and then click Restore Database. In the Source section, select Device and click the button with three dots. In the pop up window that opens, click Add and browse for your backup file.

How do I fix database in restoring state?

If you receive an error that the database is in use, try to set the user to single user mode: USE master; GO ALTER DATABASE Database_name SET SINGLE_USER WITH ROLLBACK IMMEDIATE; Then try the restore with recovery command again. Also, make sure you are on the latest service pack or cumulative update.


2 Answers

This happens if, when you made the backup, you had multiple files listed in the backup destination textbox. Go back to your source server and create the backup again; this time, make sure there's only one destination file listed.

If you had more than one file listed as the backup destination, the backup is striped across them; you'll need all the files to perform the restore.

You can verify this by performing a RESTORE LABELONLY against the single file you copied to your destination server.

like image 195
SWalters Avatar answered Sep 21 '22 09:09

SWalters


Sandra Walter's Answer provides an accurate description of what has happened, but I found the answer a bit lacking.

To make a backup which isn't striped (which is what has occurred in this situation), go back to the window where you setup the backup of your database. At the bottom is a list of paths where the different stripes will go to.

Go to each of the listed paths and delete the stripe of the backup.

Then remove all but one of the paths from the list in the window. And click the "OK" button. Your unstriped backup will be created at that one path.

Hope that helps.

like image 35
ArtOfWarfare Avatar answered Sep 19 '22 09:09

ArtOfWarfare