Database Attach failed Error 5172

Source: Internet
Author: User

Share a very common error today, database attach failed, error 5172

Wrong operation to delete SQL database, (no backup)

Use the hard drive data recovery tool software to retrieve the data document Htaidata_log from the hard drive. MDF and Htaidata_log. LDF document and resume.

Htaidata_log the data document. MDF and Htaidata_log. LDF Copy to C:

Attach the database in Enterprise Manager and select Htaidata_log. The LDF error message appears as follows:
Server: Msg 5172

File ' C:\HTaiData_log. The file header for LDF is not a valid database file header Pageaudit property is incorrect.
Data recovery was unsuccessful. :

Solution Solutions

(1). Delete log files

(2), and then attach the database

Enterprise Manager--database--Right-click Database--All tasks--attaching a database this time only MDF is attached

Database Attach failed Error 5172

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.