SqlBulkCopy class and ROWS_PER_BATCH option

  • Hi,

    we use the SqlBulkCopy class for insert bulks (SQL 2019). Is there an option to set the ROWS_PER_BATCH value? I can see only the batchsize attribute. For any reason SQL Server estimates 10,000 number of rows per execution (looks like a default value). If there is only one row for the insert bulk with a few kilobytes the memory grant for the statement is about 70 megabyte, probably based on the 10,000 rows estimation. Or is it possible to reduce the default rows estimation of 10,000 with other settings?

    thanks for your help. Alex

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply