• well so far, i haven't been able to get a duplicate in my limited testing;

    i was thinking that maybe a developer had a transaction open, went to lunch, and then committed it later, but i didn't get any duplicates; even when hammering it with million row transactions.

    are there any triggers ont he table?

    CREATE SEQUENCE [dbo].[IntegrationQueueSEQ]

    AS [bigint]

    START WITH 1

    INCREMENT BY 1

    MINVALUE 0

    MAXVALUE 9223372036854775807

    CYCLE

    CACHE 50

    CREATE TABLE IntegrationQueue( IntegrationQueueID bigint,SomeData varchar(50) )

    --The default constraint for the primary key on the table is defined as:

    ALTER TABLE [dbo].[IntegrationQueue] ADD CONSTRAINT [DF_IntegrationQueue_IntegrationQueueID] DEFAULT (NEXT VALUE FOR [dbo].[IntegrationQueueSEQ]) FOR [IntegrationQueueID]

    --repeated multiple times

    insert into IntegrationQueue(SomeData) select 'IL:' + CONVERT(VARCHAR,GETDATE(),112) + '-' + CONVERT(VARCHAR,GETDATE(),114) from sys.tables T1 CROSS APPLY sys.tables T2

    --in another window, in a transaction, i did this at various intervals

    insert into IntegrationQueue(SomeData) select 'TX:' + CONVERT(VARCHAR,GETDATE(),112) + '-' + CONVERT(VARCHAR,GETDATE(),114) from sys.tables CROSS APPLY sys.tables T2

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!