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.
- First extract the LibraryDatabase file
- 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.
- Than run the sql server 2014 and connect the database.
- Right Click databases at Object Explorer toolbar.

- Then Click Attach…

7. Then Click Add Button…

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

- Select Library.mdf and Click OK button.
- You will see the database’s files at the bottom.(Library.mdf and library_log.ldf)

- When you click OK button the library database will be list in Object Explorer Toolbar / Databases.
- That is all. You can use the database right now.

[…] To attach the database you will use the library.mdf and library_log.ldf files. If you want to learn how to attach a database you can read the article. […]