School Commit Init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
create or alter procedure write_and_rollback
|
||||
as
|
||||
begin
|
||||
begin tran
|
||||
update Cards set name = 'Test Dirty Reads' where hmy = 1
|
||||
waitfor delay '00:00:05'
|
||||
rollback tran
|
||||
end
|
||||
go
|
||||
|
||||
create or alter procedure read_multiple_times
|
||||
as
|
||||
begin
|
||||
begin tran
|
||||
select * from Cards where hmy = 1
|
||||
waitfor delay '00:00:05'
|
||||
select * from Cards where hmy = 1
|
||||
waitfor delay '00:00:05'
|
||||
select * from Cards where hmy = 1
|
||||
commit tran
|
||||
end
|
||||
go
|
||||
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
exec read_multiple_times
|
||||
Reference in New Issue
Block a user