By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,766 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,766 IT Pros & Developers. It's quick & easy.

Select Insert Deadlock

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.