6

I started SQL Profiler to catch actions that are doing on server, and among them I found one row where is stated:

SQL BatchStarting: insert bulk table_name <column_list>

but there is no values?

How to see what database accept from application?

  • Can you add what version of SQL server you are using to the question and also what traces you are using? – James Rhoat Nov 9 '16 at 22:12
  • I believe that if you include the text column in SQL Profiler you should see a list of the values being added. Although I'm not sure that you can see it for bulk operations. You might need to use a different method to capture this traffic. – Matthew Sontum Feb 11 '17 at 19:10
  • Have you see this post? – SqlWorldWide May 7 '17 at 3:10
2

I don't believe there's a Profiler trace event that shows this information.

Insert Bulk Background

Behind the scenes, the client performs a bulk load by sending a TDS SQL Batch message containing an INSERT BULK statement which specifies the destination table and columns as well as any bulk load options requested by the client (e.g. "keep NULLs," "check constraints" or "fire triggers").

However, as you've observed, this INSERT BULK statement doesn't contain the values to insert. Instead, these are transmitted by one or more TDS Bulk Load BCP messages that follow the SQL Batch message. The first Bulk Load BCP message starts with metadata describing the shape of the data set to come. Following this metadata comes the data to insert, encoded in an efficient binary format. (With minor exception, the format used is identical to the binary format the server uses to send results to the client.)

Unfortunately, Profiler doesn't provide an event that displays Bulk Load BCP messages. :-(

Reference

Possibly Helpful: A SO answer which provides clues on using Profiler to get a sense for what a bulk insert is touching. (Thanks to @SqlWorldWide for mentioning this answer in a comment.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.