December 27, 2007 at 3:36 pm
I downloaded the AdventureWorks database from codeplex. I am trying to attach it to SqlServer Express server and I keep getting the following error: Any ideas?
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
------------------------------
December 27, 2007 at 8:14 pm
Is that path correct?
If so, it sounds like you have a corrupt download. Get the real one from Microsoft.
December 28, 2007 at 3:23 am
is the mdf actually in that location on your computer?
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
December 28, 2007 at 5:59 am
I agree with colin Leversuch-Roberts
Make sure that the .mdf files is actually in that location on your computer?
or
You can browse to the location where your .mdf file is present.
December 28, 2007 at 2:31 pm
Do you have read/write permission on this directory? Try loggin into SSMS with an admin account to attach.
December 29, 2007 at 2:54 pm
When I click the add button in the attach files dialogue box,
it shows this path: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data under which you see AdventureWorks_Data.mdf along with the built in databases: master.mdf, model.mdf etc. So the path is correct, but when I click on AdventureWorks_Data.mdf, I get the error.
As far as permissions, I have full control over all files/folders in the path. I do not understand why the Vista OS will not let me attach the DB. I also have sysadmin privileges in Sql Server 2005 Express.
December 29, 2007 at 3:10 pm
I cannot find any Database Samples/Examples on MSDN only links to codeplex are on there. Do you know of a link where I can down load the AdventureWorks DB?
December 30, 2007 at 11:20 am
Apologies, looks like they've been moved to Codeplex (http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en).
Check permissions on that file. Be sure that the SQL Server service can access it. There could be permissions on that particular file.
It should work ok. This is some security or file issue. It could be corrupt. Have you tried downloading it again?
December 30, 2007 at 3:33 pm
No problem Steve, I changed the Authentication mode to "Windows Authentication" on the instance and I was able to attach the AdventureWorks DB. Are you aware of any links for sample stored procs that work against the AdventureWorks DB? If so please let me know. Thanks, JT.
December 30, 2007 at 5:28 pm
There are lots of stored procs in AdventureWorks. I know some authors use it as well on this site:
http://www.sqlservercentral.com/articles/Administration/2771/
http://www.sqlservercentral.com/articles/Product+Reviews/3050/
July 1, 2008 at 8:54 pm
Many Thanks, It working fine.
Viewing 11 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply