Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    2

    Unhappy Unanswered: weird replication bug. Bulk data stream was incorrectly specified as sorted.

    before anyone even says it, i checked the collation order on everything and it's the same. i get the error when the snapshot is trying to be bulk copied to the subscriber.

    i'm on sql2k sp4, server and db collations are SQL_Latin1_General_SP1_CI_AS. here's a repro. 1st, run this in a blank db:

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Event_Transactions]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[Event_Transactions]
    GO

    CREATE TABLE [dbo].[Event_Transactions] (
    [EventTransactionId] [int] IDENTITY (1, 1) NOT NULL ,
    [OrphanedFlag] [bit] NOT NULL ,
    [ProcessedFlag] [bit] NOT NULL ,
    [ProcessedTimeStamp] [datetime] NULL ,
    [EventTimeStamp] [datetime] NOT NULL
    ) ON [PRIMARY]
    GO

    CREATE CLUSTERED INDEX [EventTransactions_IDX_ProcessedOrphanedEventTimeSt amp] ON [Event_Transactions] (
    [ProcessedFlag],
    [OrphanedFlag],
    [EventTimeStamp]
    ) ON [PRIMARY]
    GO

    ALTER TABLE [dbo].[Event_Transactions] ADD
    CONSTRAINT [PK_Event_Transactions] PRIMARY KEY NONCLUSTERED
    (
    [EventTransactionId]
    ) ON [PRIMARY]
    GO

    insert into Event_Transactions (
    OrphanedFlag
    ,ProcessedFlag
    ,ProcessedTimeStamp
    ,EventTimeStamp
    )
    values (
    1
    ,0
    ,NULL
    ,'2004-05-07 15:15:24.000'
    )

    insert into Event_Transactions (
    OrphanedFlag
    ,ProcessedFlag
    ,ProcessedTimeStamp
    ,EventTimeStamp
    )
    values (
    0
    ,1
    ,'2004-07-08 13:04:01.513'
    ,'2004-07-07 16:52:08.000'
    )

    Now, use transactional replication to replicate it to another db taking all the defaults. when the distribution agent tries to apply the snapshot, it fails with the message mentioned in the title..

    Has anyone ever seen this? It's keeping us from considering MS replication for one of our major products. Thanks.

  2. #2
    Join Date
    Dec 2004
    Posts
    2
    figured it out enough. clustered indexes on bit fields seem to give sql server a headache. changed bit fields to tinyint and all is well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •