Database Reference
In-Depth Information
Hands-on
steps
for
attaching
the
sample
database
1. Download, and in case of a default database instance, save the database
( .mdf ) file to C:\Program
Files\Microsoft
SQL
Serv-
er\MSSQL11.MSSQLSERVER\MSSQL\DATA .
2. From Microsoft SQL Server Management Studio , connect to the SQL
Server instance.
3. Right-click on Databases .
4. Click on Attach .
5. Click on the Add button.
6. Locate the AdventureWorksDW2012_Data.mdf file in C:\Program
Files\Microsoft
SQL
Serv-
er\MSSQL11.MSSQLSERVER\MSSQL\DATA .
7. Click on the OK button on the Locate Database Files dialog window.
Tip
Since the download package only contains the .mdf file, we need to re-
move the reference to the log file. Follow the next step to remove it.
8. On the database details, click on the AdventureWorksDW2012_log.ldf
file, and choose to remove it; a new file will be created when the database is
attached.
9. Click on the OK button on the Attach Databases dialog window to attach the
database.
Search WWH ::




Custom Search