Restoring database from .mdf and .ldf files of SQL Server 2008

前端 未结 6 1655
天涯浪人
天涯浪人 2020-11-30 23:51

For some reason I have to uninstall SQL Server 2008 R2 but before that I copied two files (.mdf and .ldf) of my database from

<
6条回答
  •  孤城傲影
    2020-12-01 00:48

    Yes, it is possible. The steps are:

    1. First Put the .mdf and .ldf file in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\ folder

    2. Then go to sql software , Right-click “Databases” and click the “Attach” option to open the Attach Databases dialog box

    3. Click the “Add” button to open and Locate Database Files From C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\folder

    4. Click the "OK" button. SQL Server Management Studio loads the database from the .MDF file.

提交回复
热议问题