BCP Errror while loading file

  • bcp.exe Testdatabase.dbo.test in 1.txt -S Anand -U kumar -P kumar -t "," -r "" -c'

    For the above bcp command to load a file into clustered SQLSERVER, the following error is shown

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Reply With Quote

  • Does 1.txt exist in the same directory as where you are running the command from? You'd be better off using a full path name or, if not on the server, a full UNC.

    --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)

  • Hi Sorry for the delayed response. I tried with the absolute path but i got the same error

    bcp.exe Testdatabase.dbo.test in C:/1.txt -S Anand -U kumar -P kumar -t "," -r "" -c'

    Please help

  • You need quotes around the path

    bcp.exe Testdatabase.dbo.test in "C:/1.txt" -S Anand -U kumar -P kumar -t "," -r "" -c'

Viewing 4 posts - 1 through 4 (of 4 total)

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