If you install SQL Server 2005 simply by using the defaults,
you’ll notice that the AdventureWorks database is not
installed. Since many of the tutorials and examples rely on it, it’s important
that you find and install the AdventureWorks
database. This article explains where to obtain this database and how to
install it.
Obtain and install AdventureWorks
First, go to Microsoft’s site to download
a copy of AdventureWorksdb.msi, the program that
installs AdventureWorks. Then copy this file to your
computer, as well as the related file, AdventureWorksBI.msi
(BI stands for Business Intelligence).
Running these installation files places the two databases on
your hard disk, but it does not actually install them. There are two ways to
install the databases: You could use the new sqlcmd
utility, which looks a lot like a DOS window; or, you could use the graphical
interface. We’ll look at both techniques.
Method #1
- Run
SQL Server Management Studio. - Open a
sqlcmd window by clicking on the toolbar button
that is the eighth one from the right (it’s got a picture of a grid with a
red exclamation point over it). - Enter the command in Listing A.
Note: You may
have to adjust the specific file locations if your installation differs from
the default.
Method #2
This method attaches databases via the graphical interface.
Besides saving you all that typing, the graphical interface lets you attach
more than one database in a single action. To do this, follow these steps:
- Select
the Databases node in the Object Explorer. - Right-click
the mouse and select Attach on the tear-off menu, which opens the Attach
Database dialog box. - Click
the Add button, and then navigate to the location of the database file(s)
you wish to add. (You may select as many databases as you wish and attach
them all at once.)
A final note about attaching databases
Although the file structure has changed in SQL Server 2005,
you can still attach SQL Server 2000 databases if you wish. However, you won’t
get all the fancy new features unless you convert the databases to the new
format, but you can administer them.
Miss a column?
Check out the SQL Server archive, and catch up on the most recent editions of Arthur Fuller’s column.
TechRepublic’s free SQL Server newsletter, delivered each Tuesday, contains hands-on tips that will help you become more adept with this powerful relational database management system. Automatically subscribe today!