Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Process Locking Database

Status
Not open for further replies.

faust13

Programmer
Aug 7, 2001
176
US
Does anyone know what process locks the ASPNETDB file in the production environment (i.e. IIS).

I am trying to make changes to the database after it's been live using SQL Management Studio. The DB was created using VWD 2005.

Any Suggestions?


Thanks,

faust13
Because Han Shoots First
 
I'm using SQL Management Studio on the production box to attach the DB. However when I try to attach, it says that a process has the file locked and won't let me attach.

I shut down all the services taht would likely be the culprits, but the file is still showing as locked.

If there's a better way of making changes to ASPNETDBs on the production box, please let me know.


Thanks,

faust13
Because Han Shoots First
 
I'm using SQL Management Studio on the production box to attach the DB
Are you saying you are connecting to a database that is not on your db server?
 
The web app and the db are on the same server. I'm using SQL Management Studio (on the server) to attach to the ASPNETDB, so I can manually make my updates on the production box.

I cannot remotely access (with VWD or SQLMS) the production box becuase of security.


Thanks,

faust13
Because Han Shoots First
 
I am not sure what you mean by attach. Attach has a specific meaning in SQL Server. Do you mean "Connect"?

You connect to that DB as you would any other db. If you are getting an error, then you should really post in the SQL Server forum: forum183
 
In SQLMS, you attach databases. Normally it's not a problem, but for some reason with the ASPNETDB it is. I suspect there's some background ASP.Net process that's locking it.

Thant's why I haven't posted it on the the SQL forums, as they're more SQL Server centric, most of the guys over there don't use the default ASPNETDBs. Everytime I post regarding that, I get told to convert it to a traditional SQL Server DB, which isn't an option because of my security constraints. This seems to be a no man's land, SQL Server DBAs don't know anything about them (ASPNETDB), and .Net guys don't have the security constraints that prohibit them connecting via VS or VWD.


Thanks,

faust13
Because Han Shoots First
 
If I stop the site and wait long enough, I can attach, but I can't wait 30 minutes to make a 30 second change. There must be a single process holding the DB open, and I'm just trying to figure what it is. It must be a .Net process, by process of elimination.


Thanks,

faust13
Because Han Shoots First
 
Rhys666,

That may be it. I'm confident I didn't programatically close all my connections.

I just want to be sure what you're saying. If I don't programatically close all connnections in my .Net code, it will leave an open process that is connected to my db, which prevents SQLMS from attaching?


Thanks,

faust13
Because Han Shoots First
 
Yes, have a look at the SQL Profiler and you will see any open connections.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top