18.104.22.168 Bulk Load BCP
Describes the format of bulk-loaded data through the "INSERT BULK" T-SQL statement. The format is a COLMETADATA token (section 22.214.171.124) describing the data being sent, followed by multiple ROW tokens (section 126.96.36.199), ending with a DONE token (section 188.8.131.52). The stream is equivalent to that produced by the server if it were sending the same rowset on output.
Packet header type is 0x07.
This message sent to the server contains bulk data to be inserted. The client MUST have previously notified the server where this data is to be inserted. For more information about the INSERT BULK syntax, see [MSDN-INSERT].
A sample BulkLoadBCP message is in section 4.12.
BulkLoad_METADATA = COLMETADATA BulkLoad_ROW = ROW BulkLoad_DONE = DONE
BulkLoadBCP = BulkLoad_METADATA *BulkLoad_ROW BulkLoad_DONE
Note that for INSERT BULK operations, XMLTYPE is to be sent as NVARCHAR(N) or NVARCHAR(MAX) data type. An error is produced if XMLTYPE is specified.
INSERT BULK operations for data type UDTTYPE is not supported. Use VARBINARYTYPE to insert instances of User Defined Types.
INSERT BULK operations do not support type specifications of DECIMALTYPE and NUMERICTYPE. To insert these data types, use DECIMALNTYPE and NUMERICNTYPE.