BulkFetchEnabled and BulkRowCount connection parameters are not working in SQL Server ODBC 18 driver.

Mukesh Patel 0 Reputation points
2023-05-18T05:21:14.9333333+00:00

The following "BulkFetchEnabled" and "BulkRowCount" connection parameters are not working in SQL Server ODBC 18 driver (C++). The intend is to minimize the network call and optimize the bulk fetch, without really changing the application code.

My sample DSN, looks like

[perfTest]

Driver=/opt/test/native/odbc/lib/libmsodbcsql.so

Database=mystore

Server=myhost.com, 1433

Trusted_Connection=No

TrustServerCertificate=No

Encrypt=No

BulkFetchEnabled=1

BulkRowCount=1000

With and without above two setting, there is no change in behavior. Any thoughts, if I am missing anything. Or if any setting may help in bulk fetch like buffer size, etc

I try to find the relevant documentation for sql driver but could not get much out of it.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,880 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 78,826 Reputation points MVP
    2023-05-18T10:16:46.48+00:00

    The keywords for the connection string for the ODBC 18 SQL Server Driver are found here: https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-ver16. And BulkFetchEnabled and BulkRowCount are not listed there.

    I did find an answer from this forum, https://learn.microsoft.com/en-us/answers/questions/1251242/odbc-dsn-setting-to-bulk-fetch-load-to-reduce-numb, which suggests that these options exist. I don't know what basis the poster had for making this claim, but one possibility is that the poster asked Chat GPT, which is a very unreliable source. Chat GPT is programmed to converse, and to not return accurate answers. So when it does not find any information, it just makes things up. (Or "hallucinates" as the term apparently is.)