Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 15264

SELECT statement leaving open transaction causes blocking

$
0
0

Hi all,

I'll be interested to see if I get any responses on this at all, but here goes.

I have a user that runs a very simple statement from SSMS:

select  ContactID, AddressID, * from dbo.Contact where ContactID in (1152257893,1239910365)
select * from dbo.[Address]where ADDRESSID in (114371741, 114371741)
select * from dbo.HistoryDetail where Contact_ID in ('1152257893','1239910365')

They run it every day and most 95% of the time everything is fine.  Once every couple of weeks though, i start to see blocking of other users caused, apparently, by this particular session (according to Idera SQLdm).  Idera claims there is still an open transaction, although when I run dbcc opentran it returns no open transactions.  We do see some timeout errors from our front-end application as a result of the blocking, so it's not just idera getting things wrong, there really is some kind of blocking occurring. 

This ONLY happens for this one user - they are the only one that cause this. When it happens they can tell because that code takes a long time to execute.

I'm really quite perplexed because there are no begin tran... commits in the statement, and they are select statements so unless i'm mistaken they shouldn't be taking any kind of non-shared lock anyway, so why would they cause blocking.

Does anybody have any suggestions?

Thanks,

Reinis


Viewing all articles
Browse latest Browse all 15264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>