there under million nodes in object graph, disconnected, need imported in bulk.
the keys server-generated. there several levels of relations, after each batch inserted correct identity keys need retrieved use foreign key values in next batch.
what simplest way this? there output bulk insert?
or work adjust current incremental id value on table make room number of rows we're inserting, assign ids on client side these numbers, , bulk copy identity insert? e.g. if next incremental id 120,001 , there 600,000 rows insert, set next id 720,001 , manually use numbers 120,001 720,000 ids before inserts?
declare @lastid int, @newlastid int; begin tran set @lastid = ident_current('dbo.strains'); set @newlastid = @lastid + 1000; dbcc checkident('dbo.strains', reseed, @newlastid); commit select @lastid + 1;
Comments
Post a Comment