I am brand spanking new to SQL Server and SQL Server 2008 Express Edition ... I installed Advanced Services flavor (Select All) so I could install AdventureWorks ... Microsoft Update updated me to SP1 ... I installed AdventureWorks All ... all complete and successful ... I can make the initial connection to instance SQLExpress and explore objects in SQL Server Management Studio ... when I try to attach to any of the AdventureWorks databases I get the following (the file name changes accordingly):
"CREATE FILE encountered operating system 5(failed to retrieve text for the error. Reason:15105) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\MSSQL.10.SQLEXPRESS\MSSQL\Data\AdventureWorks_Data.mdf.' (Microsoft SQL Server Error: 5123)"
I have just made an embarrassing discovery - I am already attached. I have been trying to follow the instructions in Chapter 3 of SQL Server 2005 Express Edition Start Now! after following installation instructions from Beginning SQL Server 2008 Express for Developers. I quote ...
To attach to the AdventureWorks database, follow the steps below:
1. In Object Explorer, right-click the Databases folder and select Attach. The Attach Databases dialog box displays ... 2. Click Add. The Locate Database Files dialog box displays the data folder associated with your SQL Server instance and applies a filter to show only database files that have the file extension mdf. 3. In the Locate Database Files dialog box, select AdventureWorks_Data.mdf and click OK.
It was at this point I got my error message.
After I posted I tried again - only this time the Object Explorer Details were on and when I right-clicked Databases there they were.
Now I must assume that AdventureWorks for 2008 installs and attaches where AdventureWorks for 2005 only installed.