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 |
swensor
Starting Member
4 Posts |
Posted - 2009-07-29 : 13:30:11
|
hey all,i am trying to ascertain what the problem is. basically, i see that there are about 4000 locks on our production database, at any given time, some are as old as 24 hours, and are Lock Type DB, Mode S. They were created by a connection performing a select statement. Why are they still locked? Is this a programmatic error? Also, does this amount of locks slow down my server? They are all being created by an ASP.Net function. Any input would be helpful. Thanks!!Swensor |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
swensor
Starting Member
4 Posts |
Posted - 2009-07-29 : 15:07:41
|
hey,thanks for your info. so how do i tell if the spid has an open transaction? i know that the simplest select statement for one row of data creates a lock that stays there for quite a while, far after script execution. is there a way to tell (in enterprise manager, or via query?) on a specific spid if it has an open one? thanks againriley |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-07-31 : 14:52:39
|
DBCC opentran. |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-07-31 : 15:11:10
|
quote: Originally posted by swensor Lock Type DB, Mode S
This is a shared lock so the database cannot be dropped while user is still connected.All this means is that the user session is still connected. You can kill the spid if it bothers you |
|
|
|
|
|
|
|