When you specify the -e error_file option with copy in, bcp stores the rows that it cannot copy in to Adaptive Server in the specified error file.
If the file name specified after -e already exists, bcp overwrites the existing file.
If bcp does not encounter any errors, it does not create the file.
Data conversion errors
Errors in building the row – for example, attempts to insert a NULL into columns that do not accept null values or to use invalid data formats, such as a 3-byte integer
The copy in process displays error messages on your monitor.
bcp pubs2..publishers in newpubs -epub_err
bcp stores rows in an error file only when the bcp program itself detects the error.
bcp continues to copy rows until bcp encounters the maximum number of error rows, at which point bcp stops the copy.
bcp sends rows to the SAP ASE server in batches, so bcp cannot save copies of rows that are rejected by the SAP ASE server, for example, a duplicate row for a table that has a unique index.
The SAP ASE server generates error messages on a batch-by-batch basis, instead of row-by-row, and rejects the entire batch if it finds an error.
It is not considered an error for the SAP ASE server to reject duplicate rows if either allow_dup_row or ignore_dup_key was set when a table’s index was created. The copy proceeds normally, but the duplicate rows are neither stored in the table nor in the bcp error file.