Results 1 to 8 of 8
  1. #1
    Join Date
    May 2003
    Posts
    60

    Unanswered: Snaphot replication error number 22001 & S1000

    When the distribution agent runs it fails and returns the following detail errors.

    String data, right truncation
    (Source: STAGESQL00 (ODBC); Error number: 22001)
    ---------------------------------------------------------------------------------------------------------------
    String data, right truncation
    (Source: ODBC SQL Server Driver (ODBC); Error number: 22001)
    ---------------------------------------------------------------------------------------------------------------
    Unexpected EOF encountered in BCP data-file
    (Source: ODBC SQL Server Driver (ODBC); Error number: S1000)

    The tables have the following structure at both the source and destination.

    CREATE TABLE [dbo].[pages] (
    [colid] [int] IDENTITY (1, 1) NOT NULL ,
    [col1] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    [col2] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    [col3] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    [col4] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    [col5] [int] NOT NULL ,
    [col6] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    [col7] [bit] NOT NULL ,
    [col8] [bit] NOT NULL ,
    [col9] [bit] NOT NULL ,
    [col10] [bit] NOT NULL ,
    [col11] [bit] NOT NULL ,
    [col12] [bit] NOT NULL ,
    [col13] [bit] NOT NULL ,
    [col14] [bit] NOT NULL ,
    [col15] [timestamp] NOT NULL ,
    [col16] [bit] NOT NULL ,
    [col17] [bit] NOT NULL ,
    [col18] [bit] NOT NULL ,
    [col19] [bit] NOT NULL ,
    [col20] [int] NULL ,
    [col21_id] [int] NOT NULL ,
    [col22_id] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    [col23_id] [int] NOT NULL ,
    [col24] [bit] NOT NULL
    ) ON [PRIMARY]
    GO


    Replication does insert the first two rows of data for this table and then throws the error.

    col15 timestamp has binary data generated for it by a front end app.
    I suspect this column as the problem but as of yet have not proved it is the source of the error.

    Any suggestions are welcome,
    Mike

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to this KBA.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    May 2003
    Posts
    60
    Thanks for replying so soon, however, after reading the article I miss the conection as to how this solves my problem

    My fault possibly for being so vague. I'm am replicating between two SQL2000 servers both running SP3.

    So I'm a bit confused as to how the article Q239458 (previously published under Q239458 ) applies to my situation. This article is talking about, "Replication: Problems Mapping Characters to DB2 OLEDB Subscribers." My subscriber is a SQL 2000 Server not DB2.

    All columns defined as NOT NULL on the publisher are NOT NULL on the subscriber. All varchar columns on the publisher are varchar on the subscriber. All bit columns on the publisher are the same on the subscriber in fact the two tables are identical.

    May be I'm being dense but I don't see the relation between the article and my problem. May be you could elaborate a bit more.

    Again thanks for helping,
    Mike

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Make sure that either the schema of table does match the data or
    vice versa. Typically the data is either wider than the field or there is an
    offset in the data.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    Sep 2003
    Posts
    2

    Did you find any fix for this problem

    Hi ,
    Now I am facing the same problem.
    This happens for only one table which has varchar(1000).
    If any one who knows the fix for this please let me know.

  6. #6
    Join Date
    May 2003
    Posts
    60
    In my case it was a mapping problem. Satya was right. I was mapping one column of data type varchar to a binary data type. I simply over-looked it the first time. May be you have too.

    Wish I had more help
    Mike

  7. #7
    Join Date
    Sep 2003
    Posts
    2
    In my case I have selected Drop and Recreate Table option in the publisher for this table. So there is no problem because of Mapping.
    Any other possiblities for this error msg??

  8. #8
    Join Date
    May 2003
    Posts
    60
    The only other thing I can come up with is that one of the rows has a field that exceeds the limit of the datatype you have choosen. Such as your column is set to a datatype of varchar(100) and one row's field has exceded the 100 character limit. Granted if your using the replication wizard this shouldn't happen but, hey I've seen wierder things.

    If I should think of anything else in the next couple of days I will post again.

    Warm regards,
    Mike

Posting Permissions

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