You are on page 1of 6

C s d liu NorthWind L c s d liu mu rt quen thuc vi nhng ngi lp trnh trong Microsoft Access.

C s d liu ny qun l thng tin ca vic mua bn hng bao gm cc bng d liu : hng ha (products), khch hng (customers), nh cung cp (suppliers), Cc bc ci t c s d liu NorthWind Bc 1: Ti v file Zip c cha cc file di y. Gii nn cc file v t trong mt folder trong my tnh ca bn v nh ni bn t chng. Vi mi bc thc hin bn cn c nhng file di y trong my ca bn: NORTHWND.MDF NORTHWND.LDF PUBS.LDF PUBS.MDF Bc 2: Ti Start menu, vo Programs, vo Microsoft SQL Server 2005, kch chn SQL Server Management Studio Express. SQL Server Management Studio khi ng v xut hin the ca s Connect to Server:

Hnh 1. Ca s Connect to Server in vo nhng Server name tn my bn v Authentication nh hnh trn v kch Connect.

SQL Server Management Studio Express opens the Object Explorer with the server's databases displayed. Step 3: Right-click the Databases folder and then click Attach, as shown in Figure 2.

Figure 2. The Object Explorer window Step 4: In the Attach Databases window, click Add.... The system prompts you for the proper *.mdf file using the Locate Database File window, as shown below in Figure 3.

Figure 3. The Locate Database File window Step 5: Locate and click on the NORTHWND.MDF file, and then click OK. The right pane of the Attach Databases window will look as shown in Figure 4.

Figure 4. The right pane of the Attach Databases window after adding the Northwind database Step 6: Repeat steps 4 and 5 for the PUBS.MDF file. When you're done, and if you did the proper actions, the right pane of the Attach Databases window should look as displayed in Figure 5.

Figure 5. The right pane of the Attach Databases window after adding the Pubs database Step 7: In the Attach Databases window, click OK.

Step 8: To check that everything was successful, in the Object Explorer window, click the plus sign to open the Databases folder. The Northwind and Pubs databases will be displayed, as shown in Figure 6.

Figure 6. The Object Explorer after importing the Northwind and Pubs databases