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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock Question - Should I delete them all????

Status
Not open for further replies.

net123

Programmer
Oct 18, 2002
167
US
I have SQL Server 2000 and ASP.NET applications running. It was brought to my attention that some of my applications hitting one of my databases was Timing Out. After a little bit of troubleshooting, I found out it was due to some Locks that existed on my database. I have since then 'Killed Process' and everything seems to be working.

What I did was go to Enterprise Manager, picked the Server --> Management --> Current Activity --> Locks/Object and then found 2 IDs that needed to be killed.

Since then there aren't any hang-ups, but I have noticed under Locks/Objects there are many Process IDs in there. Is it good to Kill all of them? How dangerous is this? All of these processes have the following attributes:

Lock Type = DB
Mode = S
Status = GRANT
Ownder = Sess
[/red]
I have read BOL and other literature, but can't seem to get the answer I am looking for. And who the heck is Sess?

Your assistance will be greatly appreciated.
 
I suspect there is a problem with the ASP code and it is holding connections. The entries you are seeing are probbaly just old connections that should have been droppped.

You would usually execute a SP and drop the connection immediately, relying on connection pooling to cope with the reconnection resourse usage.

Try running a single query through your app and waiting to see if the connection is dropped - you are probbaly holding a reference somewhere.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top