How do I capture the data passed in SqlBulkCopy using the Sql Profiler?

前端 未结 2 1699
别跟我提以往
别跟我提以往 2021-02-08 12:16

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 ide

2条回答
  •  心在旅途
    2021-02-08 12:35

    You cann't capture SqlBulkCopy in SQL Profiler because SqlBulkCopy doesn't generate SQL at all when inserts data in SQL Server table. SqlBulkCopy works similar to bcp utility and loads data directly into SQL Server file system. It's even can ignore FKs and triggers when inserts the rows!

提交回复
热议问题