Results 1 to 5 of 5

Thread: BCP out failed

  1. #1
    Join Date
    Oct 2002
    Posts
    2

    Unhappy Unanswered: BCP out failed

    Hi,

    I'm trying to BCP out a large amont of data (18 million rows) and the "BCP out" keeps failing after 9591439 rows. I used the -c and -b 5000 options and the database has "select into/bulkcopy/pllsort" so I don't know what the problem could be. Of course I have enough disk space as well.


    The end of the output looks like this:

    -------------------------------------------------------------
    9589000 rows successfully bulk-copied to host-file.
    9590000 rows successfully bulk-copied to host-file.
    9591000 rows successfully bulk-copied to host-file.
    Error: Writing BCP file (0)!
    bcp copy out partially failed

    9591439 rows copied.
    ------------------------------------------------------------



    Any help is Greatly appreciated.

    TIA

    Mark
    Last edited by MAR10103; 10-29-02 at 12:16.

  2. #2
    Join Date
    Aug 2002
    Location
    Madrid, Spain
    Posts
    97
    Check the size of the result file. It's probably
    at the OS limit (often, 2 GB).

    I've never tried, but you could use a pipe.
    IIRC, Sybase issued a recent Tech Doc
    about large files and bcp, and they suggested
    using pipes.

    Regards,
    Mariano Corral

  3. #3
    Join Date
    Oct 2002
    Posts
    2

    Thanks

    Originally posted by corral
    Check the size of the result file. It's probably
    at the OS limit (often, 2 GB).

    I've never tried, but you could use a pipe.
    IIRC, Sybase issued a recent Tech Doc
    about large files and bcp, and they suggested
    using pipes.

    Regards,
    Mariano Corral


    You were right. The file reached the OS's limit.

    I finally got all the data out with the "-F" and "-L", and using 3 files for the bcp "output"

    Thanks for the help

    Mark

  4. #4
    Join Date
    Oct 2002
    Location
    Washington DC
    Posts
    3

    Re: BCP out failed

    could you inform the command you are using to BCP out? are you doing it in UNix?







    Originally posted by MAR10103
    Hi,

    I'm trying to BCP out a large amont of data (18 million rows) and the "BCP out" keeps failing after 9591439 rows. I used the -c and -b 5000 options and the database has "select into/bulkcopy/pllsort" so I don't know what the problem could be. Of course I have enough disk space as well.


    The end of the output looks like this:

    -------------------------------------------------------------
    9589000 rows successfully bulk-copied to host-file.
    9590000 rows successfully bulk-copied to host-file.
    9591000 rows successfully bulk-copied to host-file.
    Error: Writing BCP file (0)!
    bcp copy out partially failed

    9591439 rows copied.
    ------------------------------------------------------------



    Any help is Greatly appreciated.

    TIA

    Mark

  5. #5
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    Hiya Coral,

    I'm not quite sure, who posted this. But here's is a useful workaround that was posted on one of these newsgroup. Applies only on UNIX though.

    Cheers
    Willy

    "There is a workaround to this problem, as shown on Sybase solved case #10837512. I think you need to setup mySybase correctly to see solved cases resolutions.

    Here's the scoop:

    Use the FIFO pipes to create file greater than 2GB. For eg:
    >
    > For bcp out:
    >
    > #create a pipe
    > mkfifo bcppipe
    > #run bcp in background
    > bcp dbname..tablename out bcppipe -Uusername -Ppassword -c &
    > #cat pipe to a file
    > cat bcppipe > bcp.data
    >
    > For bcp in:
    >
    > #create a pipe
    > mkfifo bcppipe
    > # cat file to a pipe
    > cat bcppipe < bcp.data &
    > #run bcp in background
    > bcp dbname..tablename in bcppipe -Uusername -Ppassword -c &"

Posting Permissions

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