Skip navigation

Why can't I BCP a Unix file into SQL Server? I get UNEXPECTED EOF messages.

A. This is because UNIX files use just a linefeed (LF, 0x0A) as a record terminator. NT used a carriage return plus linefeed (CR+LF, 0x0D0A). The BCP \N character resolves to CR+LF.

You have to reformat the file using a tool like AWK/SED/PERL to convert the reformat the 0x0D character to 0x0D0A


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish