467,149 Members | 1,269 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,149 developers. It's quick & easy.

Select Insert Deadlock

Lets say we select from TableA that joins to TableB

TableB also gets data inserted into into it via another query.

So I guess SQL server places a shared lock on Table A and Table B.
and the insert will try and put an exclusive lock on the table.

We then get a deadlock. What I am trying to get my head around is why?
I would have thought that the Insert query would wait until the lock
was released on table B. Ok the select query does take a long time,
but I would have thought the insert would time out.

I know there is something I am missing in my logic. I am just trying
to figure out how the tables become deadlocked in this situation.


Sep 11 '08 #1
  • viewed: 2122

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by jtwright@tycovalves.com | last post: by
3 posts views Thread by Nigel Robbins | last post: by
1 post views Thread by Philippe Lang | last post: by
2 posts views Thread by jw_guildford@yahoo.co.uk | last post: by
4 posts views Thread by pike | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.