Viewing 7 posts - 1 through 7 (of 7 total)
@scottpletcher I stand corrected, and you're right about the Read Committed....However, I still can't understand how the update is locking on key values specified that don't exist. That...
November 6, 2020 at 5:49 pm
@ScottPetcher
This is a READ COMMITTED transaction. The lock should only be held for the duration of the statement, not the entire transaction. So that doesn't seem to answer why the...
November 6, 2020 at 4:47 pm
Again, how exactly do you lock a record that doesn't exist? And even if it was possible, why would SQL Server throw a key lock out there for record it...
November 5, 2020 at 9:02 pm
You should see it different, because that row in the update DOESN'T EXIST. How can there be a lock on a non-existent row? On an insert, the row exists....big difference.
November 5, 2020 at 8:16 pm
So you're ok with this breaking every rule of ACID in which SQL Server says a record doesn't exist but won't let another transaction insert it?
November 5, 2020 at 7:18 pm
That was done on purpose to show that right after the update to the record that doesn't exist, the open transaction has a key lock on a record that doesn't...
November 5, 2020 at 7:08 pm
The best of all worlds:
use [msdb]
Declare @weekDay Table
(
mask int
, maskValue varchar(32)
);
Insert Into @weekDay
Select...
July 19, 2017 at 8:04 am
Viewing 7 posts - 1 through 7 (of 7 total)