BCP issues ...

  • We have a BCP job that exports few tables to a bcp file and is archied to a file share.
    It is picked up form there and un archivned and the bcp files are imported to another copy of the database .

    WE are trying to migrate the database to SQL 2012 version form sql 2005.
    When we do this BCP job for few tables We get this error .

    SQLState = 22001 , NativeError=0
    Error = [Micorsoft] [SQL Server Native Client 10.0] String data , right truncation
    SQLState = 22008 sql Server , NativeError = 0
    Error = [Microsfot] [SQL Server Native Client 10.0] Invalid time format

    Any help is appreciated.

  • dvprao - Thursday, January 12, 2017 12:40 PM

    We have a BCP job that exports few tables to a bcp file and is archied to a file share.
    It is picked up form there and un archivned and the bcp files are imported to another copy of the database .

    WE are trying to migrate the database to SQL 2012 version form sql 2005.
    When we do this BCP job for few tables We get this error .

    SQLState = 22001 , NativeError=0
    Error = [Micorsoft] [SQL Server Native Client 10.0] String data , right truncation
    SQLState = 22008 sql Server , NativeError = 0
    Error = [Microsfot] [SQL Server Native Client 10.0] Invalid time format

    Any help is appreciated.

    Are some of the table structured different in the 2012 database than the 2005 database?

  • dvprao - Thursday, January 12, 2017 12:40 PM

    We have a BCP job that exports few tables to a bcp file and is archied to a file share.
    It is picked up form there and un archivned and the bcp files are imported to another copy of the database .

    WE are trying to migrate the database to SQL 2012 version form sql 2005.
    When we do this BCP job for few tables We get this error .

    SQLState = 22001 , NativeError=0
    Error = [Micorsoft] [SQL Server Native Client 10.0] String data , right truncation
    SQLState = 22008 sql Server , NativeError = 0
    Error = [Microsfot] [SQL Server Native Client 10.0] Invalid time format

    Any help is appreciated.

  • dvprao - Thursday, January 12, 2017 2:06 PM

    dvprao - Thursday, January 12, 2017 12:40 PM

    We have a BCP job that exports few tables to a bcp file and is archied to a file share.
    It is picked up form there and un archivned and the bcp files are imported to another copy of the database .

    WE are trying to migrate the database to SQL 2012 version form sql 2005.
    When we do this BCP job for few tables We get this error .

    SQLState = 22001 , NativeError=0
    Error = [Micorsoft] [SQL Server Native Client 10.0] String data , right truncation
    SQLState = 22008 sql Server , NativeError = 0
    Error = [Microsfot] [SQL Server Native Client 10.0] Invalid time format

    Any help is appreciated.

    No . It is identical copy  of the sql 2005 database.
    We do not have problems with BC P v 9.0 ( sql 2005) but only with SQL 2008 Version . that too with few tables ( 2 or 3) with this error.
    When I manually export the table to a file and then I am bale to import the same file to another table of the same structure . with out errors.
    However , when try to import the file ( generated by the Stored procedure)  to a table I get this error.

  • dvprao - Thursday, January 12, 2017 2:09 PM

    dvprao - Thursday, January 12, 2017 2:06 PM

    dvprao - Thursday, January 12, 2017 12:40 PM

    We have a BCP job that exports few tables to a bcp file and is archied to a file share.
    It is picked up form there and un archivned and the bcp files are imported to another copy of the database .

    WE are trying to migrate the database to SQL 2012 version form sql 2005.
    When we do this BCP job for few tables We get this error .

    SQLState = 22001 , NativeError=0
    Error = [Micorsoft] [SQL Server Native Client 10.0] String data , right truncation
    SQLState = 22008 sql Server , NativeError = 0
    Error = [Microsfot] [SQL Server Native Client 10.0] Invalid time format

    Any help is appreciated.

    No . It is identical copy  of the sql 2005 database.
    We do not have problems with BC P v 9.0 ( sql 2005) but only with SQL 2008 Version . that too with few tables ( 2 or 3) with this error.
    When I manually export the table to a file and then I am bale to import the same file to another table of the same structure . with out errors.
    However , when try to import the file ( generated by the Stored procedure)  to a table I get this error.

    What command are you running manually vs what the SP is doing?

  • SQL 2005 doesn't have a time data type.  It looks like one of your columns in SQL 2012 is time.  That may cause a conversion problem unless you explicitly adjust the column value; for example, if possible, convert the SQL 2005 datetime/smalldatetime to time,

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 6 posts - 1 through 5 (of 5 total)

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