Install SQL Server 2005 AdventureWorks

Source: Internet
Author: User
Tags microsoft sql server mssql management studio sql server management sql server management studio

When you install SQL Server 2005, if you select the default installation, the AdventureWorks database is not installed. Because many tutorials and examples require the use of AdventureWorks databases, it is necessary to install the AdventureWorks database. This article will discuss how to obtain and install this database.

Download and install AdventureWorks

First, go to the Microsoft Official website Download Adventureworksdb.msi, this is the AdventureWorks installation program. Then copy the file and related files to your computer. Adventureworksbi.msi (BI is the abbreviation for Business Intelligence).

Run the installation files so that the two databases are installed on your computer. However, the database installation is not fully completed. There are two ways to complete the installer: You can use SQLCMD, which looks like a DOS window. Or use a graphical interface to install. The following is a description of the two methods.

Method 1

Run SQL Server Management Studio. Click the Eighth button on the right of the toolbar to open the Sqlcmd window (the icon is a red exclamation mark). Enter the directive in listing a.

execsp_attach_db @dbname=N'AdventureWorks',
@filename1=N'C:\Program Files\Microsoft sql server
mssql.1\mssql\Data\AdventureWorks_Data.mdf',
?@filename2=N'C:\Program Files
Microsoft sql server
mssql.1\mssql\Data\AdventureWorks_log.ldf'

Tip: If you do not select a default installation, you must enter the correct path to the file.

Method 2

This method connects to the database through a graphical interface. In addition to saving the input, the graphical interface can connect multiple databases in the simplest way. The steps are as follows:

1. In Object Explorer (Project Explorer), select the database schema.

2, click the right mouse button, choose to connect to the Tear-off menu, open the Database Connection dialog box.

3, click the Add button, and then determine the database location to increase (you can also join multiple databases at one time).

Considerations for connecting to a database

Although the structure of the files in SQL Server 2005 has changed, you can still connect to the SQL Server 2000 database. But only by selecting a new format for the database to experience the new features of SQL Server 2005, you can choose one way at a random.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.