Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to install the adventureworks2008 database and I a large number of people having the same problem.

If attach the database, I get this error message:
Unable to open the physical file blah blah mssql\data\documents....
Could not open new database 'AdventureWorks2008'. CREATE DATABASE is aborted.


on the other hand, I get error message 'access denied' if I run this query:
SQL
USE [master] 
GO 
CREATE DATABASE [AdventureWorks2008] ON  
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AdventureWorks2008_Data.mdf' ), 
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AdventureWorks2008_Log.ldf' ), 
FILEGROUP [PRIMARY] CONTAINS FILESTREAM DEFAULT  
( NAME = N'Documents', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\Documents' ) 
FOR ATTACH 
GO 

Let me know if you have dealt with this. Any feedback is greatly appreciated. Thx.
Posted
Updated 6-Sep-12 6:13am
v2
Comments
Richard MacCutchan 6-Sep-12 9:37am    
Looks like permission problems on your disk, are you running as administrator?
lesponce 6-Sep-12 9:49am    
Yes, I am running as admin.
Richard MacCutchan 6-Sep-12 9:54am    
Well there must be some other reason that you are getting denied access to that path, but it's impossible to guess what that reason may be.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900