Attach Database In Sql Server 2014 Step By Step – Query Examples

Attach Database In Sql Server 2014 Step By Step

In this post we will learn how to attach a database in sql server 2014. We will use our library database for example. If you didn’t download the database you can download from here.

  1. First extract the LibraryDatabase file
  2. Copt the library.mdb and library_log.ldf files to C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA folder.If the program asks you for administrator permission, click the yes button.
  3. Than run the sql server 2014 and connect the database.
  4. Right Click databases at Object Explorer toolbar.

  1. Then Click Attach…

   7. Then Click Add Button…

  1. Make sure it is in the Data folder: C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA

  1. Select Library.mdf and Click OK button.
  2. You will see the database’s files at the bottom.(Library.mdf and library_log.ldf)
  3. When you click OK button the library database will be list in Object Explorer Toolbar / Databases.
  4. That is all. You can use the database right now.

About the author

Thomas Brown

1 Comment

Leave a Comment

%d bloggers like this: