Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Surfer513
Starting Member
29 Posts |
Posted - 2010-11-26 : 20:44:17
|
I am a .NET developer, and I'm currently writing an application using SQL Server 2008 Express. When I run my web application, I terminate all open connections to SQL Server, but even after I quit the web application I cannot use SSMS to gain access to the database. I used Process Explorer, and there are no handles on the .MDF or .LDF files. Also, in Activity Monitor there are no handles. Anyways, when I have this database on a full scale SQL Server 2008 (not Express) this is no problem. I can be on SSMS as well as users on the database. It's only when I use a localhost version of SQL Server 2008 Express that this is a problem. The Remote Access is set to MULTI_USER, so I don't think that's the problem. I just get access denied.Any ideas? |
|
chadmat
The Chadinator
1974 Posts |
Posted - 2010-11-27 : 04:19:44
|
Is Auto_Close on?-Chad |
 |
|
Surfer513
Starting Member
29 Posts |
Posted - 2010-11-27 : 20:22:50
|
I ran this:select databasepropertyex('C:\ASP_NET\TESTSITE\APP_DATA\ASPNETDB.MDF', 'isAutoClose')And it returned 1. So I'm guessing that it means that Auto_Close is on. What else could cause this? |
 |
|
chadmat
The Chadinator
1974 Posts |
Posted - 2010-11-29 : 14:56:38
|
Turn it off.-Chad |
 |
|
Surfer513
Starting Member
29 Posts |
Posted - 2010-12-01 : 21:26:11
|
I turned it off and when auto close is off, I get this runtime error when trying to connect to the database: "Cannot open user default database. Login failed. Login failed for user 'XX-PC\XX'" When I turn auto close back on, I do not get this error. Any ideas why turning auto close off would cause this?? |
 |
|
|
|
|