INF: Page Locks of Large Insert Trans Not Promote Table LockID: Q112347
|
More than 200 page locks held by a large insert transaction may not be promoted to a table lock if the transaction has a while loop.
The following is an example:
/* create a table */
create table test_tab
(RecNum int,
txt1 char(40),
txt2 char(40),
txt3 char(40),
txt4 char(40),
txt5 char(40),
txt6 char(40),
txt7 char(40) )
go
declare @count int
select @count = 0
set nocount on
begin tran big_insert
while (@count < 5000)
begin
select @count = @count+1
insert into test_tab
values ( @count, 'A', 'B', 'C', 'D', 'E', 'F', 'G')
end
commit tran big_insert
go
- select * from t1 holdlock order by col1 desc
- select * from t1 holdlock
- update t1 set col1=col1
- delete from t1
- insert into t1 select * from t1
- insert into t1 select * from t2
begin transaction
insert into t1 values("test data")
go
insert into t1 values("test data")
go
<repeat several hundred times>
commit transaction
Additional query words: 4.2930824 Windows NT
Keywords : kbprg SSrvProg SSrvWinNT
Version : 4.2 | 4.2
Platform : OS/2 WINDOWS
Issue type :
Last Reviewed: March 18, 1999