In Chapter 3, “Using bcp to Transfer Data to and from Adaptive Server,” the subsection titled “Using parallel bulk copy to copy data into a specific partition” in the section titled “bcp performance,” contains the following note:
When using parallel bulk copy to copy data out, you cannot specify which partitions bcp should use.
This note is incomplete, and should be replaced with the following:
bcp out and partitioned tables
bcp does not support parallel sessions of bcp out from a table that is partitioned across I/O devices. For this reason, you cannot specify which partitions bcp should use when you use parallel bulk copy to copy out data. If you perform a bcp out when a table is partitioned, bcp may create duplicate records. To ensure data integrity, you must unpartition a table before attempting to bcp out of it.
The following sequence of bcp commands, issued against a partitioned table called customer in the pubs2 database, risks the duplication of data that is copied out.
bcp pubs2..customer out customer.dat1 -Uuser -Ppwd -c -F1 -L500 & bcp pubs2..customer out customer.dat2 -Uuser -Ppwd -c -F501 -L1000 & bcp pubs2..customer out customer.dat3 -Uuser -Ppwd -c -F1001 &
What does work correctly is a single process of bcp out that is running against a partitioned table. The following does not generate duplicate records:
bcp pubs2..customer out customer.dat -Uuser -Ppwd -c &