himani singla
himani singla

Reputation:

restoring database

I had to uninstall SQL Server 2005, because it was configured to be used only in windows authentication mode, and install it again in mixed mode. I had to take a backup of my only database there, and restore it again on installing the sql server back, though the backup was taken successfully but when am trying to restore it, it is giving me an error as

System.Data.SqlClient.SqlError: The media has 2 media families but only 1 are provided. All members must be provided. (Microsoft.SqlServer.Smo)

I am using SQL server management studio, and trying to restore the database by right clicking on the databases folder, selecting restore database option, and then providing a database name, in "destination for restore", and in "source for restore" am selecting from device option and then providing with the path of my .bak file(backup file of the database), but the thing is not working, saying that the restored has failed and giving the above mentioned description for the error.

Upvotes: 2

Views: 449

Answers (3)

DForck42
DForck42

Reputation: 20387

if you haven't already tried this: crate a blank database with the exact same name as the data base you're restoring from, with the files at the exact same location. right click the blank database and restore from your backup.

Upvotes: 0

D. Lambert
D. Lambert

Reputation: 1304

Is there any chance you backed up to two backup files (ie, striped backup), and you're only specifying one of them in the restore? The restore seems to be complaining that if can't find all the files it needs to start the restore.

Upvotes: 0

John Sansom
John Sansom

Reputation: 41889

I suggest that you do not use the SSMS GUI to perform your database RESTORE unless you are familiar with all of the various options and settings. Using the T-SQL RESTORE command you can define explicitly what you are looking to do.

I would suggest that you first verify your database backup file by using the RESTORE VERIFYONLY command.

See SQL Server Books online:

http://msdn.microsoft.com/en-us/library/ms188902.aspx

Upvotes: 1

Related Questions