When restoring a database backup file, about the "System.Data.SqlClient.SqlError: Media set has 2 media families, but only 1 are available." All members must be provided with "how to handle

Source: Internet
Author: User

Long time no blog, recently in the completion of the Rights Management module, today, when restoring the database file, encountered the "System.Data.SqlClient.SqlError: Media set has 2 media families, but only 1 are provided." Must provide all members "This error, Baidu a bit, found the cause and solution.

Cause Analysis:
1. Backup, the old path is not deleted, I added a new path, inadvertently set to two backup path, SQL will be based on two backup paths to the backup file into two.
2. When restoring, the source data must be loaded on all two backup files.
3. The new path to the restore is manually modified to the Data folder path of the actual SQL.
4. If you have a database with the same name and need to overwrite it, modify the settings.


Workaround:

1. Only one backup path is retained during backup, resulting in a backup file ~

2. If you really want to recover, you can use the following example to complete
RESTORE DATABASE db from disk= ' C:\a.bak ', disk= ' C:\b.bak '
Multiple words, use multiple disk.

You want to be able to provide solutions to other people who are experiencing this problem.

When restoring a database backup file, about the "System.Data.SqlClient.SqlError: Media set has 2 media families, but only 1 are available." All members must be provided with "how to handle

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.