Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

A. Appendix > Installing an SQL Server database

Installing an SQL Server database

In some samples of the book, we use an SQL Server database. To install an SQL Server database, we can either attach the SQL Server MDF file to SQL Server or execute an SQL query file, which contains the commands to create the database, its tables, and columns.

Attaching an MDF file

The simplest way to install a database is attaching the database into the SQL Server instance. To do so, follow the next steps:

  1. Open SQL Server Management Studio and connect to the database engine (most of the time, this instance is called localhost).
  2. Within the Object Explorer, right-click on the Databases node and select Attach.
  3. In the Attach Databases dialog, click on the Add button and browse to the location of the MDF file that contains the database. Click OK; SQL Server will now attach the database to the SQL Server instance.

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial