bcp out and bcp in

  • I have a table having some 80,00,000 records when i performed bcp out i have extracted all rows and when i perform bcp in on the same table some 4 lakh records are missing and no error file has been generated.

    can any one tell me the reason for this?

    can any one help me how can i retrive those 4 lakh records.

    thanks in advance.

  • Did you try BCP out to a text file then BULK INSERT to a table?

    "-=Still Learning=-"

    Lester Policarpio

  • n.yarramreddy (8/4/2008)


    I have a table having some 80,00,000 records when i performed bcp out i have extracted all rows and when i perform bcp in on the same table some 4 lakh records are missing and no error file has been generated.

    can any one tell me the reason for this?

    can any one help me how can i retrive those 4 lakh records.

    thanks in advance.

    Not without seeing the BCP command you used... sans any passwords, of course. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • These two processes (Bcp in/out) work the same. One's in, one's out. It's possible to you had errors, PK violation, etc. on the in.

    Did these go to different instances?

  • Uh huh... that's why I wanted to see the commands. And, I'd like to see the DDL for the source and destination tables, as well.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • You might also try adding the following parameters to your bcp command:

    -m maxerrors -e errfile

    where maxerrors is 5 for your posed question and errfile is where any rows in error will reside that are not bcp'd in. each row in errfile will have the complete row and on the following line an @ sign will indicate the first erroneous/invalid column encountered for that row.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • 1 lakh = [font="Courier New"]10 exp 5[/font]

    1 crore = [font="Courier New"]10 exp 7[/font]

    so, 4 lakh is 400,000.

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

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