How do I capture the data passed in SqlBulkCopy using the Sql Profiler?
问题 I am using Sql Profiler all the time to capture the SQL statements and rerun problematic ones. Very useful. However, some code uses the SqlBulkCopy API and I have no idea how to capture those. I see creation of temp tables, but nothing that populates them. Seems like SqlBulkCopy bypasses Sql Profiler or I do not capture the right events. 回答1: Capturing event info for bulk insert operations ( BCP.EXE , SqlBulkCopy , and I assume BULK INSERT , and OPENROWSET(BULK... ) is possible, but you won't