哪里可以下载AdventureWorks2008.msi? [英] Where to download AdventureWorks2008.msi?
问题描述
我想安装 AdventureWorks2008 (我只安装SQL Server 2008 R2 Express)。
I'd like to install AdventureWorks2008 (I just install SQL Server 2008 R2 Express).
每次下载推荐版本从CodePlex,我得到的只是一个 AdventureWorks2008.mdf
文件。我不仅不能从SQL Server Management Studio附加文件,而且不能直接将文件复制/粘贴到数据库中。
Each time I download the recommended version from CodePlex, all I get is a AdventureWorks2008.mdf
file. Not only I cannot attach the file from SQL Server Management Studio, but I cannot copy/paste the file directly into the the database.
我已经在多个地方阅读过需要使用 AdventureWorks2008.msi
的内容,但是我找不到在哪里
I've read in several places that I need to use AdventureWorks2008.msi
, but I cannot find where to download it.
我只是不知道如何安装AdventureWorks2008
I just cannot figure out how to install AdventureWorks2008
感谢您的帮助
推荐答案
没有用于Adventureworks的.msi文件,尽管您会在过时的文档和书籍中找到它。并非只有您会发现这个令人困惑的地方-似乎每次我需要安装这些数据库时,Microsoft提供的用于安装这些数据库的网站,文件和步骤都会更改。
There isn't an .msi file for adventureworks, even though you'll find it mentioned in outdated documentation and books. You aren't alone in finding this confusing -- it seems the web site, files and steps Microsoft provides for installing these databases changes every time I need to install them.
您需要创建数据库并附加.mdf文件,该文件是说明中提到的数据文件。 (。mdf =主要数据文件,.ldf =日志文件,.ndf =辅助数据文件)
You need to create the database and attach the .mdf file, which is the "data file" referred to in the instructions. (.mdf = primary data file, .ldf = log file, .ndf = secondary data file)
为了附加文件,您需要确保您仔细遵循此处的步骤: http://social.technet.microsoft.com/wiki/contents/articles/3735.sql-server-samples-readme-en-us.aspx#Readme_for_Adventure_Works_Sample_Databases
In order to attach the file, you need to make sure you carefully follow the steps here: http://social.technet.microsoft.com/wiki/contents/articles/3735.sql-server-samples-readme-en-us.aspx#Readme_for_Adventure_Works_Sample_Databases
2008R2的说明:
Instructions for 2008R2:
要安装AdventureWorks2008R2 OLTP数据库
To install AdventureWorks2008R2 OLTP database
-
下载AdventureWorks2008R2数据文件。
Download the AdventureWorks2008R2 Data File.
从文件下载中,单击保存并浏览到以下位置您的本地
服务器。
From File Download, click Save and browse to a location on your local server.
从SQL Server Management Studio中,执行以下代码:
From SQL Server Management Studio, execute the following code:
不区分大小写的数据库
CREATE DATABASE AdventureWorks2008R2
ON (FILENAME = '{drive}:\{file path}\AdventureWorks2008R2_Data.mdf')
FOR ATTACH_REBUILD_LOG;
作为步骤3的替代方法,您可以使用SQL
Server Management Studio用户界面。有关
的更多详细信息,请参见附加数据库(SQL Server Management Studio)。
注意:必须从要附加的文件列表中删除日志文件。
这将导致操作重建日志。
Note: You must remove the log file from the list of files to attach. This will cause the operation to rebuild the log.
从亚伦·伯特兰德省下来的头痛提示:
您应将mdf文件放在普通数据文件夹中-SQL Server
将已经具有适当的权限。您可以使用
You should place the mdf file in your normal data folder - SQL Server will already have the proper permissions. You can get this path using
选择顶部(1)物理名称来自master.sys.database_files;
SELECT TOP (1) physical_name FROM master.sys.database_files;
这篇关于哪里可以下载AdventureWorks2008.msi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!