stratoblue

This is my first time to open a database with Database Explorer. When I try to connect to Northwind, I get this error message

Unable to open the physical file "C:\SQL Server 2000 Sample Databases\NORTHWIND.MDF". Operating System error 5: "5(Access is denied.)"

An attemp to attach an auto-named database for the file C:\SQL Server 2000 Sample Databases\NORTHWIND.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on a UNC share.

Any ideas



Re: Visual C# 2008 (Pre-release) Cannot connect to Northwind with Database Explorer

ben2004uk

Is the database MDF already attached to a running server - SQL 2005 / SQL Express Might be locking the file.

Are the NTFS Security permissions correct Haven't become corrupted...






Re: Visual C# 2008 (Pre-release) Cannot connect to Northwind with Database Explorer

stratoblue

I still cannot connect. But I know what is happening but do not know why it's happening.

When I attempt to connect, it gets attached to SQL Server management Studio which then prevents Database Exporer to perform a connection. Any ideas

My environment

- Vista Home Premium

- SQL2005 Developer Edition





Re: Visual C# 2008 (Pre-release) Cannot connect to Northwind with Database Explorer

ben2004uk

Which version of Orcas are you using If it is Express, see my post in the other section as Express cannot connect to SQL 2005, only SQL Express.




Re: Visual C# 2008 (Pre-release) Cannot connect to Northwind with Database Explorer

stratoblue

>>If it is Express, see my post in the other section as Express cannot connect to SQL 2005, only SQL Express.

oh So I guess I will have to un-install SQL Server and replace it with SQL Express. Does anyone know of other options





Re: Visual C# 2008 (Pre-release) Cannot connect to Northwind with Database Explorer

ben2004uk

They run happily side by side, you would have a 2005 instance (if it default you connect using your machine name) and a Express instance which is named and you connect using <YOUR_HOSTNAME>\SQLExpress.

2005 Client Tools, ie - Management Studio, should also be able to connect to SQLExpress instances, however not much point if Orcas Express can only connect via the database file. Does mean you can run SQL Profiler on the database (I haven't tried it yet, but I think so).

So, Side by Side is your best option.

Hope this helps,

Ben






Re: Visual C# 2008 (Pre-release) Cannot connect to Northwind with Database Explorer

stratoblue

Thanks. I will download SQL Express 2005 and try your side by side suggestion.



Re: Visual C# 2008 (Pre-release) Cannot connect to Northwind with Database Explorer

stratoblue

Ben, I tried your side by side suggestion and it worked. Thanks.