Friday, February 15, 2008

The media set has 2 media families but only 1 are provided.

      You get this error while restoring the database backup file in SQL Server 2005. This is because when you took the backup your backup file is divided in more than one part and at the time of restoring the database you have not added all the parts.

       Lets do this practically so that you can have better idea. Take the backup of any database you have. To take the backup right click on database and select the task and click on backup. 

         Once you click on Backup you have to select the location for .back file on database. If there are two paths in path selection box as shown in image below, the backup file is generated in two parts and saved at two different locations.

        So in this case, we have two backup files generated for selected database. Now at the time of restoring if you are assigning only one file and try to restore the database, you will get "The media set has 2 media families but only 1 are provided." error.

        To solve this issue you have to add all the files (in our case two files) in file selection box. Once you select all the backup files and click on restore, the database will restore successfully.

For more detail check here.

Happy Programming !!

1 comment:

G said...

what if i have only one file, i guess it is asking for log file..