Attaching Sample Databases
I have been trying to attach the Sample Databases (which evidentially are now supplied by CODEX instead of Microsoft. I notice that many of the sample files said they could not be used on the SQL Server 2005 Express. However, I did not see that restriction on the first download selection, so that is the file I downloaded.
I am a complete novice to SQL although I have been a database programmer using Access for years. When I downloaded the above file it installed automatically, Then when I tried to attach (which I think is the right thing to do) I received this message ....
Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf" . Operating system error 5: "5(Access is denied.)".
DOES THAT MEAN I CANNOT USE THE FILES ON THE SQL SERVER 2005 EXPRESS?? If so, are there any other sample files for the Adventure Works I can use that are compatible with the SQL Server 2005 Express.
Please Help ... anyone! And, if this sample DB should attach please let me know if I have not been typing in the right code?
exec sp_attach_db @dbname = N'AdventureWorks', @filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf' , @filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'
I have verified that the files did install into the correct folder, and that folder is where my master.db is. And, when I installed my SQL 2005 Express I did install a default instance.
CAN ANYONE HELP ME? Codex does not support this, and I have not gotten any responses on their discussion forum.
|