Bulk Copy Program

From Wikipedia, the free encyclopedia

Bulk Copy Program (BCP) is a command-line tool used to import or export data from a Structured Query Language (SQL) Database. The tool is often more efficient than more recent gui-based applications, such as DTS, to import and extract data.

It has many switches that can be passed to alter its behavior. Switching end of line (EOL) characters as well as row terminators is trivial. More custom conversions are done using format files that define column re-mapping or skipping, for instance. The raw speed of BCP to get the data in quick is always nice, but more refined data operations are best served by database vendor specific code.

Some common uses of BCP are:

  1. Stage a raw text file in a table for further data scrubbing.
  2. Create a delimited or fixed-width file for exchange with another party.
  3. Backup data from a database vendor specific format, to a common text format.

If you have the bcp.exe executable installed on your computer, usage instructions can be received on the command-line with a help switch like so.

bcp /?