Where do I get a AdventureWorks mdf & ldf?
-
vendredi 10 février 2012 00:34
Hi,
I went to http://msftdbprodsamples.codeplex.com/releases/view/55926, and downloaded the AdventureWorks2008R2_SR1.exe, but the databaseinstaller.exe constantly crashes without any error message. It is a Windows 7 home premium 64 bit. I have a SQL Server 2008 R2 Developer installed and running OK. I have tried to restart the PC.
To work around it, where can I download a mdf and ldf file and direct attach it?
Thanks!
- Modifié silly_dude vendredi 10 février 2012 00:35
Toutes les réponses
-
vendredi 10 février 2012 01:14
Hi,
Take a look here: http://sqlserversamples.codeplex.com/
[]'s
Erickson Ricci
Microsoft MCITP 2008 Admin, MCTS SQL Server 2005, 2008
Visite o meu blog: http://ericksonricci.wordpress.com
Me siga no twitter: @EricksonRicci
LinkedIN: http://br.linkedin.com/in/ericksonricci
e-mail: ericksonfabricio@gmail.com
**Ajude a melhorar o sistema de busca do fórum.Marque a(s) resposta(s) que foram úteis**
**Se esta resposta solucionou a questão, então, por favor, marque-a como resposta.** -
vendredi 10 février 2012 01:26
Hi Erickson,
The link that I posted in the original post, was from this site. I downloaded the database installer, but it crashes all the time. That's why I was asking: "where do I get a MDF and LDF and attach it?"
-
vendredi 10 février 2012 02:20
Also tried following link
and downloaded the AdventureWorks2008R2_Data.mdf. But when I tried to attach it, I got this error message:
The header for file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Data.mdf' is not a valid database file header. The FILE SIZE property is incorrect.
In conclusion - nothing works.
-
vendredi 17 février 2012 06:21Modérateur
Can you please look in the Application Log on your computer for entries made by the installer. This should provide details of what's gone wrong.Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
MC ID: Microsoft Transcript
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker- Marqué comme réponse silly_dude vendredi 17 février 2012 06:54
-
vendredi 17 février 2012 06:25Modérateur
Also tried following link
and downloaded the AdventureWorks2008R2_Data.mdf. But when I tried to attach it, I got this error message:
The header for file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Data.mdf' is not a valid database file header. The FILE SIZE property is incorrect.
In conclusion - nothing works.
Please have a read of the following http://msftdbprodsamples.codeplex.com/releases/view/59211Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
MC ID: Microsoft Transcript
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker- Marqué comme réponse silly_dude vendredi 17 février 2012 06:54
-
lundi 20 février 2012 04:17
Hi,
When I ran the DatabaseInstaller.exe, it threw following exception:
The type initializer for 'System.Windows.Media.FontFamily' threw an exception
Where can I download the mdf data file for AdventureWorksDW2008? I have got AdventureWorks2008R2 but I need the data warehouse version.
Thanks.
- Modifié silly_dude lundi 20 février 2012 04:18
-
lundi 20 février 2012 04:25Modérateur
Hi,
When I ran the DatabaseInstaller.exe, it threw following exception:
The type initializer for 'System.Windows.Media.FontFamily' threw an exception
Where can I download the mdf data file for AdventureWorksDW2008? I have got AdventureWorks2008R2 but I need the data warehouse version.
Thanks.
As far as I know you can't download those files anywhere.
I visited the links and can't find any file called DatabaseInstaller.exe. All I see is AdventureWorks2008R2_SR1.exe Have you tried running AdventureWorks2008R2_SR1.exe as an Administrator i.e. right click on the file and select Run as Administrator?
Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
MC ID: Microsoft Transcript
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker -
lundi 20 février 2012 04:29
I did everything I could think of including running as admin. I first tried to run what your suggested, AdventureWorks2008R2_SR1.exe, it crashed, so I extracted it, and found DatabaseInstaller.exe, and it still crashes, throwing the exception I posted.
Are you sure we can't download the MDF file for the data warehousing version? I can download the MDF for the normal version.
-
lundi 20 février 2012 04:39Modérateur
I haven't seen them anywhere.
There's a discussion here regarding the same error message: http://connect.microsoft.com/VisualStudio/feedback/details/522003/precreatedefaultfamilycollection-fails-on-application-startup
Could you please check the type of the "windir" registry key under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
and make sure its REG_EXPAND_SZ.Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
MC ID: Microsoft Transcript
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker -
lundi 20 février 2012 04:51
Thanks I had a look and unfortunately this is not the cause - the windir entry is of type REG_EXPAND_SZ.
Could you somehow just post the MDF somewhere? I am following a walk through regarding SSIS and it is based on the data warehouse version of AdventureWorks. I need to go to client site tomorrow.
-
lundi 20 février 2012 05:33Modérateur
Sorry, but I cannot post the database somewhere as that would be in breach of Microsoft policy.
I was able to get the database to install by following the manual installation instructions here http://msftdbprodsamples.codeplex.com/wikipage?title=Database%20Installer%20Help%20for%20SQL%20Server%202008R2&referringTitle=Installing%20SQL%20Server%202008R2%20Databases
Just remember that SqlSamplesDatabasePath is where you want the database created and SqlSamplesSourceDataPath is where the CSV files for the database are located i.e.
I extracted the contents of AdventureWorks2008R2_SR1.exe to D:\Temp\AdventureWorks2008R2_SR1 therefore SqlSamplesSourceDataPath would be
:setvar SqlSamplesSourceDataPath "D:\Temp\AdventureWorks2008R2_SR1\"
SqlSamplesDatabasePath can be any location but I used
:setvar SqlSamplesDatabasePath "C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Data\"
Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
MC ID: Microsoft Transcript
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker- Proposé comme réponse tooleyrose mardi 28 février 2012 01:45
-
mardi 21 février 2012 05:24Modérateur
Sorry, but I cannot post the database somewhere as that would be in breach of Microsoft policy.
I was able to get the database to install by following the manual installation instructions here http://msftdbprodsamples.codeplex.com/wikipage?title=Database%20Installer%20Help%20for%20SQL%20Server%202008R2&referringTitle=Installing%20SQL%20Server%202008R2%20Databases
Just remember that SqlSamplesDatabasePath is where you want the database created and SqlSamplesSourceDataPath is where the CSV files for the database are located i.e.
I extracted the contents of AdventureWorks2008R2_SR1.exe to D:\Temp\AdventureWorks2008R2_SR1 therefore SqlSamplesSourceDataPath would be
:setvar SqlSamplesSourceDataPath "D:\Temp\AdventureWorks2008R2_SR1\"
SqlSamplesDatabasePath can be any location but I used
:setvar SqlSamplesDatabasePath "C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Data\"
Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
MC ID: Microsoft Transcript
Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker
How did you go with this?Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
MC ID: Microsoft Transcript
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer- Marqué comme réponse silly_dude mardi 28 février 2012 11:09
-
mardi 3 avril 2012 22:27Modérateur
We uploaded an AdventureWorks 2008 R2 OLTP database and script to CodePlex (http://msftdbprodsamples.codeplex.com/releases/view/59211). Or http://msftdbprodsamples.codeplex.com and click on the SQL Server 2008 R2 OLTP tile.
Hopefully, this version is easier to attach and use.
As long as you copy the database to C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\DATA, you should be able to attach the AdventureWorks2008R2_Data.mdf database. You will need to remove the transaction log reference.Or you can run the setup script. Follow these steps to install the sample database from the script:
- Download AdventureWorks 2008 R2 OLTP Script.zip (http://msftdbprodsamples.codeplex.com/releases/view/59211)
- Copy the DDL script files to any path such {SQL Server Path}\Tools\Samples\AdventureWorks 2008 OLTP Script.
Note The default SQL Server 2008 R2 path is C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\.
- Open {SQL Server Path}\Tools\Samples\AdventureWorks 2008 OLTP\instawdb.sql in SQL Server Management Studio.
- Update the script path variables.
- If necessary, change the :setvar SqlSamplesDatabasePath variable to your SQL Server 2008 R2 path. The default path is C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA.
- Change the :setvar SqlSamplesSourceDataPath variable to the path containing the .csv files.
- Uncomment each :setvar variable.
- On the Querymenu, click SQLCMD Mode.
- On the Standardtoolbar, click the Executebutton to run the script.
- Modifié Derrick VanArnam [MSFT]Microsoft Employee, Moderator mardi 3 avril 2012 22:47
- Marqué comme réponse silly_dude mercredi 4 avril 2012 00:25
-
mardi 3 avril 2012 22:41Modérateur
The link to Mr. Wharty's response to remove the transaction log reference is at http://social.msdn.microsoft.com/Forums/en-US/sqlserversamples/thread/f1f31f94-aff5-4d40-83a9-264f5a7bcb1d?prof=required
- Marqué comme réponse silly_dude mercredi 4 avril 2012 00:25
-
mercredi 15 août 2012 05:57
Attaching a database (without a log file - .LDF)
Read more: http://sqlsolace.blogspot.com/2012/06/attaching-database-without-log-file-ldf.html#ixzz23akBDIioCREATE DATABASE [AdventureWorksDW2012] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.SS2012EXP\MSSQL\DATA\AdventureWorksDW2012_Data.mdf' )
FOR ATTACH_REBUILD_LOG
GO -
mercredi 29 août 2012 21:46Modérateur
Hello,
I uploaded AdventureWorks databases for 2012, 2008R2 and 2008. Each download zip file contains an mdf database file and ldf log file. This consolidates AdventureWorks databases for several SQL Server versions to one page. Please let me know what you think.
AdventureWorks Databases – 2012, 2008R2 and 2008
http://msftdbprodsamples.codeplex.com/releases/view/93587
- Marqué comme réponse Mr. WhartyMicrosoft Community Contributor, Moderator mercredi 29 août 2012 21:57

