1
Vote

AdventureWorks Databases – 2012, 2008R2 and 2008

description

Hello,
 
I uploaded AdventureWorks databases for 2012, 2008R2 and 2008 to http://msftdbprodsamples.codeplex.com/releases/view/93587. This release consolidates AdventureWorks databases for SQL Server 2012, 2008R2 and 2008 versions to one page. Each zip file contains an mdf database file and ldf log file. This should make it easier for you to find, download, and attach the AdventureWorks databases. There are no database schema changes.

comments

brendataylor wrote Sep 10, 2012 at 1:30 PM

Hi
I downloaded the AdventureWorks 2012 DB and tried to attach it to my SQL management Studio 2012 running on the RTM Win 8 OS and it says :


The database 'AdventureWorksLT2012' cannot be opened because it is version 706. This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database 'AdventureWorksLT2012'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)

The version of SQL Management Studio I have is
Microsoft SQL Server Management Studio 11.0.2100.60
Microsoft Data Access Components (MDAC) 6.2.9200.16384
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 9.10.9200.16384
Microsoft .NET Framework 4.0.30319.17929
Operating System 6.2.9200


Any ideas why this should happen, I sort of expected the latest release of adventureworks to work with the latest version of SQL man studio. I have checked for a later release of SQL Man. studio and there doesn't seem to be one.

Brenda

DerrickVMSFT wrote Oct 17, 2012 at 3:49 PM

Sorry, I just read your question. We are investigating this issue, and I will respond back in a few days. (I'm not at my office right now where I can test your issue; otherwise, I would test it today :-)
Thanks,
Derrick VanArnam

DerrickVMSFT wrote Oct 23, 2012 at 3:14 AM

Hi Brenda,

I will not be able to respond to this issue for about a week. Are you blocked from doing something else by not having more info?

Thanks,
Derrick

aj_career30 wrote Nov 13, 2012 at 7:22 PM

Hi, i am having same problem Brenda has with same OS.

I downloaded Adventure Works LT 2008 not 2008R2 and I was able to attach it but it showed only as READ ONLY access in 2012 Express.

So i downloaded the AdventureWorksLT.msi which was used in a video for SQL Server 2005. I installed in the ...\Data subdirectory under Microsoft Sql Server.

I tried Access Control List to add NT Service\SQLSERVEREXPRESS as having full control but same read-only error!

I get this error with the .msi application:

TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'DEVTRA-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1846+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Database 'AdventureWorksLT' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery. (Microsoft SQL Server, Error: 3415)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=3415&LinkId=20476

BUTTONS:

OK

chrisbell86 wrote Nov 20, 2012 at 4:00 PM

I get a read only error as well. Looks like this issue is not being investigated at this point?

DerrickVMSFT wrote Nov 21, 2012 at 2:08 PM

Hello,

We are investigating this issue. Thank you for reporting this error.

mvtaylor0487 wrote May 14, 2013 at 7:14 PM

I have downloaded all of the available version for AdventureWorks 2008. When I try to attach the database I get an error that states that I need version 612. I am not sure how to get 612. I have 661 and 655. Any help would be appreciated.

spelluru wrote May 14, 2013 at 8:11 PM

Version 661 is SQL Server 2008 and 612 is SQL Server 2005 SP2. Please make sure that you downloaded the right package. You may have multiple SQL Server instances on your computer, so make sure that you are running against the right SQL instance.

Here is a short list of version for the major SQL Server versions I compiled:
SQL Server Version Compatibility Level Internal Database Version Build
SQL Server 2012 RTM 110 706 11.0.2100.60
SQL Server 2008 R2 100 665 10.50.xxxx
SQL Server 2008 100 661 10.00.xxxx
SQL Server 2005  SP2 90 612 9.00.xxxx
SQL Server 2005 90 611 9.00.xxxx
SQL Server 2000 80 539 8.00.xxx(x)

Run this query to confirm the version installed on your computer:
SELECT @@Version,
SERVERPROPERTY('productversion') as [Product version],
SERVERPROPERTY ('productlevel') as [Product level] ,
SERVERPROPERTY ('edition') as [Edition],
DATABASEPROPERTYEX((select DB_Name()),'Version') as [Internal Version Number],
DATABASEPROPERTY((select DB_Name()),'Version') as [Internal Version Number--Deprecated],
(select DB_Name()) as DBName,
(SELECT COMPATIBILITY_LEVEL FROM SYS.DATABASES WHERE NAME = (select DB_Name())) as compatibilityLevel

bliss2007 wrote Mar 20 at 5:15 PM

I also got the read-only access once I attached the database using Management Studio.
What I did was :
-copy the directory with the files to:
C:\Program Files (x86)\Microsoft SQL Server\AdventureWorks2012_Database
-make sure you change property of folder to full control for users.
and then attach the database using Management Studio.

It works for me.

eugeneandres wrote Apr 26 at 8:15 PM

Like bliss2007, I have experienced a Read-Only Database resulting from this CREATE DATABASE script:

CREATE DATABASE AdventureWorks2012 ON PRIMARY
(FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\AdventureWorks2012_Data.mdf'), 
(FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\AdventureWorks2012_Log.ldf') 
FOR ATTACH;
The problem seems to be that Windows file and folder permissions are restricted (by the SQL Server install) in C:\Program Files\Microsoft SQL Server\, and below. When you copy your downloaded .mdf and .ldf files to this "System" file tree, your effective rights become Read and Read/Execute, not Full Control.

When you Attach these files residing in the "System" area, SQL Server thinks you have READ_ONLY privileges to the Database it creates, so even though you are Owner, you are not permitted to change anything, such as the isreadonly bit.

In retrospect, it would have been better to Attach the files from Users...\Downloads, because my Effective Rights in that folder were Full Control.

Could Microsoft enhance the Download instructions at http://msftdbprodsamples.codeplex.com/releases/view/93587 to include a cautionary note on the physical location of the files to be Attached? It would likely build good will with the product's lifelong learners !

(:-)