Friday, February 24, 2012

cannot install AdventureWorks

I downloaded and installed SQL Server 2005 express Edition with advanced services.

My attempt to install the AdventureWorks from "Add or Remove Programs" failed for I was not able to see the "Documentation, Samples, and Sample Databases" node from "Feature Selection".

After reading a little bit I discovered that I had to download AdventureWorks from http://msdn2.microsoft.com/en-us/librry/ms144235.aspx

First I downoladed and installed SqlServerSamples.msi and then AdventureWorksDB.msi however I cannot find AdventureWorks.mdf to attach to my instance? Inside the folder C:\Program Files\Microsoft SQL Server\MSSQ.1\MSSQL\Data I have AdventureWorks_Data.mdf and AdventureWorks_Log

Can you please help?

thanks

Rick

Instead of installing AdventureWorksDB I installed AdventureWorksLT and I was able to attach the db at the first attempt.|||AdventureWorks_Data.mdf IS the AdventureWorks data file -the one to attach to your server. (And you will need the log file (*.ldf)|||

I had both files .mdf and .ldf but when I was trying to attch .mdf I was getting an error. I tried several times, I even uninstalled and re-installed a couple of times and this is the error that I got:

TITLE: Microsoft SQL Server Management Studio Express

Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476


ADDITIONAL INFORMATION:

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

CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf'. (Microsoft SQL Server, Error: 5123)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=5123&LinkId=20476


BUTTONS:

OK

|||Please verify that the two files are not READ ONLY.|||

nope, they are not.

By the way, I had the same problem on two separate PCs. One is running XP pro and the other one Vista. Both installation were fresh.

|||

Hi Rick,

Verify that your explicit user account has Full Control on both the data and log files. Permission via group membership is not enough, at least on Vista; if your name isn't on the file it fails to attach. Not sure what's happening on the XP system, but this will prevent things from working on Vista because of User Account Control.

Mike

|||Hi Rick,

I am not sure if you have solved the problem or not. But I ran into the same problem and found out that the problem was caused by permission to access the file.

When I installed SQL Server Express, I chose used both Windows Authentication and SQL Server's. I login using SQL Server authentication (sa). When I tried to run the attach database query, I ran into the same problem as yours. I then quit the database and re-login using Windows Authentication. Afterwards, I reran the query and succeeded.

Hope this helps.

Suparman Widjaja
DOOR3.COM
|||That worked!!! I was able to attach the AdventureWorks database by logging in to SqlServer Management Studio using Windows Authentication instead of "sa". Thanks.

No comments:

Post a Comment