SQLSERVER2008R2 MDF file Restore Database

Source: Internet
Author: User

Accidentally encountered to use MDF file restore database, tried for 2 hours to get out, Baidu found out I tried to not very good, or I did not understand.

Here is a record of my use, in case I forget.

Tools: SQL Server 2008R2

Steps:

1. Create a database with the same name as the MDF file

2. The newly created database is down (detach),

3. Find the corresponding database corpus and corresponding log corpus in the database file, delete.

4. Copy the files that need to be restored to the corresponding directory.

5. Attach the file to the database.

6, OK.

SQLSERVER2008R2 MDF file Restore Database

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.