This download contains a version of the AdventureWorks2008R2 OLTP database without FILESTREAM properties. You do not need to have filestream enabled to attach this database. No additional schema or data changes have been made. To install the version of AdventureWorks2008R2 that includes filestream, use the SR1 installer available here. Prerequisites:Microsoft SQL Server 2008 R2 must be installed. Full-Text Search must be enabled. Installing the AdventureWorks2008R2 OLTP database:1. Click the AdventureWorks2008R2 Data File link above. 2. From the License Agreement, click I Agree. 3. From File Download, click Save and browse to a location on your local server. 4. From SQL Server Management Studio, execute the following code. Change the drive and file path location for your local server. The default path is C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data. CREATE DATABASE AdventureWorks2008R2
ON (FILENAME = '<drive>:\<file path>\AdventureWorks2008R2_Data.mdf') -- change the drive and file path
FOR ATTACH_REBUILD_LOG ;
5. As an alternative to step 4, you can attach the database using the SQL Server Management Studio user interface. See http://msdn.microsoft.com/en-us/library/ms190209.aspx for details. Note that you must remove the log file from the list of files to attach. This will cause the operation to rebuild the log.
|
三界功绩2012年2月15日 15:24:42
by
lin050620
on
Feb 15 at 7:24 AM
Doesn't work with the Developer version (10.3.5500), which errors out identifying the developer version as a server which "supports version 655 and earlier". DeepaRaveendran had the same issue last year.
by
bearle
on
Jan 23 at 6:45 PM
How do you restore this MDF file in SQL 2008? I'm using SQL 2008 R2 x64 Standard edition on a Windows 2008 R2 x64. Seems like this should work, but I just get this error:
The media family on device 'C:\Users\sharepointadmin\Desktop\AdventureWorks2008R2_Data.mdf' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Serve
by
steve02a
on
Jan 7 at 9:36 AM
Great Work. Initially I was getting error because I put the file in D drive. Then I put the mdf in C:\Program Files\Microsoft SQL Server\MSSQL10_50.KJ\MSSQL\DATA and it was successful
by
bhaskar_joardar
on
Sep 16 2011 at 1:15 PM
I don't see a mention anywhere that this database has a case sensitive collation!!!
by
MartinBell
on
Aug 24 2011 at 10:11 PM
In order for this to work for me as soon as the file was finished downloading I right-clicked the file and selected "Properties". Then I selected the "Unblock" button within the properties window. Then and only then was I able to attach it to my SQL Server 2008 R2 instance.
by
TimFromDallas
on
Jun 29 2011 at 11:02 PM
The AdventureWorks2008R2 database installed fine, is there a place where I can get the AdventureWorksDW2008R2 database without Filestream as well? I could not find it on the site. I'm using the 32 bit version of SQL Server 2008 R2 on a 64 bit Windows 7 machine so I cannot enable FILESTREAM
by
BrentKnorr
on
Jun 28 2011 at 3:20 AM
Works like charm. I used the SQL Server UI version to attach a database.
by
sudhirke
on
Jun 9 2011 at 6:05 PM
This is the simplest AdventureWorks download yet! Thanks, Gail!
by
nealgraves
on
May 18 2011 at 5:55 PM
Works like a charm, but then again I'm using SQL Server 2008R2 x64 Enterprise Edition. :)
by
tranpeter
on
Apr 22 2011 at 6:23 AM
The database 'AdventureWorks2008R2' cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported.
I get the above error when i try to attach this AdventureWorks2008R2_Data.mdf
Please provide me a solution
by
DeepaRaveendran
on
Apr 19 2011 at 9:43 PM
NOTE: Make sure you have FILESTREAM Enabled within your SQL Server 2008 instance. If you do not, this extraction and setup process will not create the databases in your SQL Server Object Explorer.
If you do not know how to enable FILESTREAM for your server, hit F1 (to open Help), and type in "Enable FILESTREAM". - I'd put it here, but I am limited to the number of characters.
by
PPicklesimer
on
Mar 1 2011 at 10:15 PM
Hmmm...the command fails:
Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA". Operating system error 5: "5(Access is denied.)".
Seems like SQL server should be allowed to access its own files, but just to make sure, I tried to give it full control. Windows rejects this despite the fact that I'm an admin?
by
brg5002
on
Feb 4 2011 at 10:33 PM
Hi Carl. Sorry that you're having problems. It may be that the file did not download cleanly. Download the file again and then try to attach. Also, if you have multiple versions of SQL Server installed, make sure you're connected to the 2008R2 instance.
Regards,
Gail Erickson SQL Server Documentation
by
Gaile
on
Jan 24 2011 at 4:49 AM
This is not working. I have Sql Server Express R2 (10.50.1600.1) on Windows 7. Full Text is running
This is what I get. Either with the script or through the UI to attach the DB.
The header for file 'C:\Program Files (x86)\...\AdventureWorks2008R2_Data.mdf' is not a valid database file header. The FILE SIZE property is incorrect.
What am I missing?
by
CarlCoutureYahoo
on
Jan 18 2011 at 3:44 AM