December 1, 2008 at 6:11 am
I have loaded the Adventureworks database into SQLExpress via sqlcmd, but I am unable to load its tables, etc in SQL Server Management or by using sqlcmd. The following error occurs when I click on the Adventureworks database icon in SQL Server Management :
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf". Operating system error 32: "32(error not found)". (.Net SqlClient Data Provider)
When I try and run a query using sqlcmd I get:
Msg 945, Level 14, State 2, Server EVANS_LAPTOP\SQLEXPRESS, Line 1
Database 'AdventureWorks' cannot be opened due to inaccessible files or insufficient
memory or disk space. See the SQL Server errorlog for details.
In the log file there is the following entry:
Starting up database 'AdventureWorks'.
Error: 17207, Severity: 16, State: 1.
FCB::Open: Operating system error 32(error not found) occurred while creating or opening file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf'. Diagnose and correct the operating system error, and retry the operation.
Error: 17204, Severity: 16, State: 1.
FCB::Open failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf for file number 1. OS error: 32(error not found).
However, I am able to gain access to it using Visual Studio and load up its tables, etc and run queries on it quite happily.
Does anyone have any ideas why it's playing up?
I am running Vista Premium.
December 3, 2008 at 10:26 am
Fixed this issue by using Management Studio.
I removed the AdventureWorks database off my machine and re-installed it using the AdventureWorksDBCI.msi
I then did not bother attaching the database using sqlcmd, but did it in Management Studio itself.
A strange one....
Visual Studio 2005 had no problem using it.
Hey ho! Its resolved now.
😀
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply