Incorrect media Family Structure

Source: Internet
Author: User

SQL server2005 database, the error"The media family structure on the device 'xxxxxx' is incorrect. SQL Server cannot process this media family."


Re-built database, force recovery and other methods after the failure, the scalp brute force, with a bit of the Forum (http://bbs.csdn.net/topics/210059893) to find the command:


Detach the database Geb that failed Restoration
Create the same database Geb first
Stop the server service and overwrite the new file with the old data file (as long as MDF is available ).
Start Server Service
Run the following command
Sp_configure 'allow', 1
Reconfigure with override
Update sysdatabases set status = 32768 where name = 'geb'
DBCC rebuild_log ('geb', 'd: \ database \ newlog. ldf ')
Update sysdatabases set status = 0 where name = 'geb'
Sp_configure 'allow', 0
Reconfigure with override
DBCC checkdb ('geb ')

If an error is found, you can check the error first.
DBCC checktable (sysobjects)
DBCC checktable (sysindexes)
DBCC checktable (syscolumns)
DBCC checktable (policypes)

It is enough to run out. It should be noted that the separate restoration does not seem to be necessary. After an error is reported, the system will directly display the "suspicious" status. You can directly perform operations on the master database. After executing the above command, you can find the original database, and then DBCC several master tables.


Reflection: It's too difficult to learn. Fortunately, it's just possible to get it done by directly inputting commands on the Internet. Without such materials, you can't write such commands on your own, although there are more systems in charge, it is important to strengthen learning and lay the basic skills well.

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.