sql-server-2008 – 在哪里下载AdventureWorks2008.msi?

前端之家收集整理的这篇文章主要介绍了sql-server-2008 – 在哪里下载AdventureWorks2008.msi?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想安装AdventureWorks2008(我只是安装sql Server 2008 R2 Express).

每次我从CodePlex下载推荐的版本时,我得到的只是一个AdventureWorks2008.mdf文件.我不仅无法从sql Server Management Studio附加文件,而且无法将文件直接复制/粘贴到数据库中.

我在几个地方读过我需要使用AdventureWorks2008.msi,但我找不到下载它的位置.

我只是想不通如何安装AdventureWorks2008

谢谢你的帮助

解决方法

冒险工作没有.msi文件,即使你会在过时的文档和书籍中找到它.您并不是唯一一个发现这种混淆的人 – 似乎每次我需要安装这些数据库时,Microsoft为安装这些数据库提供的网站,文件和步骤都会发生变化.

您需要创建数据库并附加.mdf文件,该文件是说明中提到的“数据文件”. (.mdf =主数据文件,.ldf =日志文件,.ndf =辅助数据文件)

要附加文件,您需要确保仔细按照此处的步骤操作:http://social.technet.microsoft.com/wiki/contents/articles/3735.sql-server-samples-readme-en-us.aspx#Readme_for_Adventure_Works_Sample_Databases

2008R2的说明:

To install AdventureWorks2008R2 OLTP database

  1. Download the AdventureWorks2008R2 Data File.

  2. From File Download,click Save and browse to a location on your local
    server.

  3. From sql Server Management Studio,execute the following code:

Case-insensitive Database

CREATE DATABASE AdventureWorks2008R2 
ON (FILENAME = '{drive}:\{file path}\AdventureWorks2008R2_Data.mdf') 
FOR ATTACH_REBUILD_LOG;

As an alternative to step 3,you can attach the database using the sql
Server Management Studio user interface. For more detailed
information,see 07001.

Note: You must remove the log file from the list of files to attach.
This will cause the operation to rebuild the log.

Aaron Bertrand的头痛保护技巧:

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

SELECT TOP(1)physical_name FROM master.sys.database_files;

原文链接:https://www.f2er.com/mssql/77779.html

猜你在找的MsSQL相关文章