Learn two methods for installing the AdventureWorks database in SQL Server 2005
Takeaway: If your installation of SQL Server 2005 is missing the AdventureWorks database, then follow the steps in this article to discover how to obtain and install this database.
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!
White Papers, Webcasts, and Downloads
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now
- VMware Infrastructure: A Guide to Bottom-Line Benefits VMware Frustrated by the high cost of maintaining or building ever-larger data centers? Get the facts you need to formulate your Virtualization Action Plan. Download Now
- Building the Virtualized Enterprise with VMware Infrastructure VMware This paper explains how adopting a virtual infrastructure -- comprised of server, storage, and networking virtualization technologies -- can help your organization build a sustainable competitive ... Download Now
- The Scalable Enterprise: VMware ESX Server on the Dell PowerEdge 6650 Dell This paper introduces the server virtualization software, VMware ESX ... Download Now
- Five Steps to Determine When to Virtualize YourServers VMware Thinking of virtualizing the servers at your company? Use this step-by-step guide to determine when's the best time to make your big move. Download Now
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET

