Installing SQL Server Express Manager and the Sample Databases

A. Download and install SQL Server Express Manager (XM)

Installing SQL Server Express Manager requires prior installation of SQL Server 2005 Express or Developer Edition or higher. If you've installed SQL Server Developer Edition, you can skip this step and use Microsoft SQL Server Management Studio (MSSMS).

1. Go to the SQL Server 2005 Express Edition page at
http://lab.msdn.microsoft.com/express/sql/ and click the Download SQL Server 2005 Express Manager link.

2. Download ExpressManager.msi to a temporary folder and execute it to install XM.

B. Download and install the Northwind and, optionally, pubs sample databases

1. Go to the SQL Server 2005 Express Edition page at
http://lab.msdn.microsoft.com/express/sql/ and click the Books Online, Samples, and Sample Databases link to open the SQL Server 2005 Express Documentation and Samples page.

2. Click the Northwind and Pubs Sample Databases link to open the eponymous page. Download SQL2000SampleDb.msi (646 MB) to a temporary folder.

3. Run SQL2000SampleDb.msi to create a \Program Files\Microsoft SQL Server 2000 Sample Database Scripts folder containing instnwnd.sql and instpubs.sql scripts.

Note: If you want to use osql.exe to install the scripts, open the ReadMe_SQL2000SampleDbScripts.htm page and follow the instructions.

4. Start XM or MSSMS, type .\SQLEXPRESS in the Connect To Server dialog's Server Instance text box, and click Connect.

5. In XM, choose File, Open Query and open instnwd.sql in the Query window. If you're using MSSMS, chose File, Open, File, select SQL Server Files (*.sql) in the Open File dialog's Files of Type list, open instnwd.sql, and reconnect to .\SQLEXPRESS.

6. Click the Execute button to run the script, which takes a few seconds on a fast machine.

7. Right click the Databases node, choose refresh, and then expand the node to confirm installation. 

Note: Databases install in SQL Server Express (SQLX) Shutdown mode by default. The SQL Server (SQLEXPRESS) instance automatically shuts down when its last connection closes.

8. Optionally, repeat steps 5, 6, and 7 with the instpubs.sql script.

C. Optionally, download and install the Adventure Works (OLTP) Database

1. Go to the SQL Server 2005 Express Edition page at
http://lab.msdn.microsoft.com/express/sql/ and click the Books Online, Samples, and Sample Databases link to open the SQL Server 2005 Express Documentation and Samples page.

2. Scroll to the bottom of the page and click the AdventureWorksDb.msi link.

3. Save the installer file in a temporary folder, and execute it to create a \Program Files\Microsoft SQL Server 2005 AdventureWorks Sample Database Scripts folder with awasdb (Analysis Services), awdb (OLTP), and awdwdb (Data Warehouse) folders.

4. Open the ...\awdb\instawdb.sql script in an XM or MSSMS query page and click execute to run the script, which takes a few seconds (see Figure 4). You can ignore the "DBCC SHRINKDATABASE: File ID 1 of database ID 7 was skipped because because the file does not have enough free space to reclaim." message.

5. Right-click the Databases node and choose Refresh to confirm installation.


