|   | ![]() |
|
I'm having problems getting
more than <x> connections from a 16-bit client to SQL Server. I get out of memory or
unable to connect errors. This is due to the fact that 16-bit clients, whether they use ODBC or db-lib, use a 64K buffer for all their control blocks, network buffers etc. You have to keep everything within this one area - there are no workarounds for this. The main thing that uses up the memory is the space used for "network" buffers - actually these are buffers for the TDS packets, as the actual network buffers may be bigger/smaller and the TDS packets may have to be fragmented by the network driver to get them on the network - but that is transparent to SQL. The "network packet size" (TDS) can be specified by the client connection. If it is not then it uses the setting on the server that is set by sp_configure. If you need more connections then the easiest thing to do is reduce the "network packet size" via sp_configure/client connection until you get enough. The lower it is set the more round-trips that SQL client to server has to take, which potentially can degrade performance. |
All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.