SQL Server 2005 Express - only one connection



Hi, all,

I have SQL Server 2005 Express and Visual Studio 2005 installed on the same
machine. I created a database using Management Studio Express, and a C#
application to access the database. Here's the problem:

I can connect to the database via either the C# application or the
Management Studio, but not both. If I connect first via Management Studio,
when I then open Visual Studio and the the Server Explorer, the database
name has a red X next to it and I can't establish a connection.

If I connect first via my C# application, I can't even open the database in
Management Studio. There, the database does not have the plus sign to its
left, so it can't be expanded to show tables, etc. If I right click on the
db name and click Properties, I get a dialog with the following messages:
"Cannot show requested dialog.(Microsoft.SqlServer.Express.SqlMgmt)
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
Database 'Name' cannot be opened due to inaccessible files or insufficient
memory or disk space. See the SQL Server errorlog for details. (Microsoft
SQL Server, Error: 945)"

Within Management Studio, all of the logs that I can find are empty, so
there's no help there. In the system event log I see this:
"FCB::Open: Operating system error 32(The process cannot access the file
because it is being used by another process.) occurred while creating or
opening file 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\MutualFunds.mdf'. Diagnose and correct the
operating system error, and retry the operation."

Based on that message, it looks like a file sharing problem, but I can't see
any setting to change to allow multiple connections to the database file.
The fix is probably something simple, so if someone could slap me upside the
head I'd really appreciate it.

Once I've connected with one method, the only way to connect with the other
method is to reboot the system.

The system is running XP Pro with SP2, in case that's important.

Thanks,
Dennis


.



Relevant Pages

  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Create a Connection object and pass in a ConnectionString to ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Thanks for posting it. ... Hitchhiker's Guide to Visual Studio and SQL Server ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Visual Studio but not to VS 2003. ... Create a Connection object and pass in a ConnectionString to address ... manage the database table you reference. ... Yep, my latest book can help too, but mostly if you're targeting SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS Access DAO -> ADO.NET Migration
    ... full SQL Server and I see the logic you explained in a multi user ... allow two users to access the same database file Read/Write at any given ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS Access DAO -> ADO.NET Migration
    ... The SQLCe engine requires the 2.0 Framework. ... Hitchhiker's Guide to Visual Studio and SQL Server ... However, it does build the SSCE database, just some of the definitions are ...
    (microsoft.public.dotnet.framework.adonet)

Loading