DTS Allowing Truncation- No Error Message

  • We are importing data from one SQL 2000 spk 3a server to another SQL 2000 Spk 3a server.

    The table schema on Server1 table1 is laid out as follows:

    Id int

    Col001 varchar (8000)

    Col002 varchar (8000)

    The table schema on Server2 table1 is laid out as follows:

    Id int

    Col001 varchar (100)

    Col002 varchar (100)

    The DTS package will export the data from server1.table1 to server2.table1 without any errors. However the data is now only 100 characters. If you try to do a manual insert in Query Analyzer it will fail with the 'String or binary data will be truncated" error. Didn't DTS used to behave in the same fashion...where it would give a string or binary truncation error if the destination column was smaller than the source column and the source data would not fit into the destination table.

  • This was removed by the editor as SPAM

  • I had the same problem last year. When using DTS data pump truncation occured in destination without raising any error. Until now I still don't know why.

     

    if you set ANSI_WARNINGS OFF in QA then your insert query will flow thru with data truncated and no error raised.

     

    char variables also have same behaviour.

    eg.

    declare @ch_1 varchar(3)

    select @ch_1 = '12345'

    The results of @ch_1 = '123'

     

    Perphaps someone else could explain...

     

    cheers,

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply