183 reputation
6
bio website gaffigan.info
location Indiana
age 23
visits member for 1 year, 10 months
seen Aug 27 at 6:04
I code, its my life.

Sep
9
awarded  Popular Question
Sep
23
answered how to create backup for update tables structures in existing DB?
Jul
9
awarded  Supporter
Jul
9
accepted Lock hints on preconditions
Jul
9
comment Lock hints on preconditions
Despite being a single statement, my understanding is that SQL Server will still only take an shared lock on the Entities during the select. Is there some hidden magic I am unaware of? If this pattern is extended for an insert on EntityTypes, we would end up with the other side taking a shared lock on EntityTypes followed by an Exclusive lock on Entities. Since this would go in the opposite order (S on Entities, X on EntityTypes vs S on EntityTypes, X on Entities) it would still deadlock. Furthermore, this does not carry the side-effects of the example.
Jul
9
asked Lock hints on preconditions
Feb
11
asked Commit Insert but Hold Lock
Dec
30
awarded  Scholar
Dec
30
accepted SQL Server Leaked Transactions
Dec
25
awarded  Teacher
Dec
25
answered SQL Server Leaked Transactions
Dec
25
awarded  Autobiographer
Dec
25
awarded  Student
Dec
24
asked SQL Server Leaked Transactions