Microsoft® SQL Server 2012 Unleashed
by Ray Rankins, Paul T. Bertucci, Chris Gallelli, Alex T. Silverstein
Batches
By default, bcp puts all the rows that are inserted into the target table into a single transaction. bcp calls this a batch. This arrangement reduces the amount of work the log must deal with; however, it locks down the transaction log by keeping a large part of it active, which can make truncating or backing up the transaction log impossible or unproductive. By using the bcp batch (–b) switch, you can control the number of rows in each batch (or, effectively, each transaction). This switch controls the frequency of commits; although it can increase the activity in the log, it enables you to trim the size of the transaction log. You should tune the batch size in relation to the size of the data rows, transaction log size, and total number ...