Logged and Nonlogged Operations

Bulk-copy operations can occur in two modes: logged and nonlogged (also known as slow and fast bcp, respectively). The ideal situation is to operate in nonlogged mode because this arrangement dramatically decreases the load time and consumption of other system resources, such as memory, processor use, and disk access. However, the default runs the load in logged mode, which causes the log to grow rapidly for large volumes of data.

To achieve a nonlogged operation, the target table must not be replicated (the replication log reader needs the log records to relay the changes made). The database holding the target table must also have its SELECT INTO/BULK COPY option set, and finally, the TABLOCK hint must be specified. ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.