All,

I have two queries like below.

declare c1 cursor...

open c1

fetch c1 into ...

while @@sql_status ..

begin

BEGIN TRAN

insert t1
insert t2
insert t3
update t4

COMMIT

fetch c1 into ...

END

close ...
deallocate

The same query is used and the location of BEGIN TRAN is
changed now.

#2)

BEGIN TRAN

declare c1 cursor...

open c1

fetch c1 into ...

while @@sql_status ..

begin


insert t1
insert t2
insert t3
update t4


fetch c1 into ...

END

close ...
deallocate

COMMIT


which one is good to have? how to measure the usage of
tranaction size for the second one? which one is good if i
have
2000000 records processed within the cursor ?