Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • bcp into syslogins

    5 answers - 657 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I'm trying to bcp into a 12.5 Sybase table in tempdb the syslogins file
    which was bcp'd out of another server. I keep getting the following
    error in regards to the password column -
    CSLIB Message: - L0//S0/N36/1/0:
    cs_convert: cslib user api layer: common library error: The result is
    truncated because the conversion/operation resulted in overflow.
    The bcp command I used is: bcp tempdbtmp_syslogins in syslogins.bcp.c
    -b1 -c -t'\t' -eerror2.out -S $DSQUERY -U sa -P $PASSWD
    The syslogins was bcp'd out with the -c and has tab-separated columns.
    Any suggestions?
    Patrick
  • No.1 | | 159 bytes | |

    if you're bcp'ing into a later version check that the number of columns
    in syslogins is the same on both source and destination
  • No.2 | | 347 bytes | |

    The source and target Sybase instances are both of the same version -
    12.5. Both have the same number and types of columns.

    We were wondering if it could be some type of library issue - some
    missing object library that converts a string to binary that is called
    by bcp. How could I check for that?

    Patrick

  • No.3 | | 1553 bytes | |

    questions:

    1. How did you define the tmp_syslogins table? I s it identical to the
    mastersyslogins table?

    2. Did you use the same command line parameters to bcp out the data as
    you are using to bcp in the data?

    I had no problem with loading a temporary table with the following
    method:

    (sybase)$ isql -Usa -Ppasswd
    1use tempdb
    2go
    1select * into tmp_syslogins from mastersyslogins where 1 = 2
    2go
    (0 rows affected)
    1quit
    aix2:/usr/local/sybase-12.5
    (sybase)$ bcp mastersyslogins out syslogins.bcp.c -b1 -c -t'\t'
    -eerror2.out -S $DSQUERY -U sa -P passwd

    Starting copy

    11 rows copied.
    Clock Time (ms.): total = 16 Avg = 1 (687.50 rows per sec.)
    aix2:/usr/local/sybase-12.5
    (sybase)$ bcp tempdbtmp_syslogins in syslogins.bcp.c -b1 -c -t'\t'
    -eerror2.out -S $DSQUERY -U sa -P passwd

    Starting copy
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.
    Batch successfully bulk-copied to SQL Server.

    11 rows copied.
    Clock Time (ms.): total = 76 Avg = 6 (144.74 rows per sec.)

  • No.4 | | 1326 bytes | |

    Sounds like a problem with the data in the bcp file either some
    invalid data, possibly a <tabembedded in your data (eg, fullname
    column), or possibly some corruption in the bcp file (eg, an erroneous
    <return>).

    What shows up in error2.out?

    Have you been able to zero in on a particular record giving you problems?

    NTE: If there is a problem with a non-unique record or field
    terminator the problem could be with an earlier record. In this case
    you'll want to make sure that for all records that *did* make into the
    target table that they contain the correct data for *all* columns.

    darkknight56 wrote:

    I'm trying to bcp into a 12.5 Sybase table in tempdb the syslogins file
    which was bcp'd out of another server. I keep getting the following
    error in regards to the password column -
    CSLIB Message: - L0//S0/N36/1/0:
    cs_convert: cslib user api layer: common library error: The result is
    truncated because the conversion/operation resulted in overflow.

    The bcp command I used is: bcp tempdbtmp_syslogins in syslogins.bcp.c
    -b1 -c -t'\t' -eerror2.out -S $DSQUERY -U sa -P $PASSWD

    The syslogins was bcp'd out with the -c and has tab-separated columns.
    Any suggestions?

    Patrick

  • No.5 | | 188 bytes | |

    What shows up in error2.out is that it can't convert column 11 which is
    the password. We tried a different delimiter (a comma) and that seems
    to work. Thanks.

Re: bcp into syslogins


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Databases"

EMSDN.COM