On Mon, 15 Mar 2004 17:58:42 -0800, Michael Peppler wrote: >�On Mon, 2004-03-15 at 17:28, Matthew O. Persico wrote: >>�We have modified our servers to set the maximum packet size to >>�4096, up from 512. We did this because the main app (commercial >>�software) we use works MUCH better with it. This app requires us >>�to set a flag on its command line (the size to use, in this case >>�4096) to pass down to Sybase in order to get the better >>�performance. In addition, we wish to pass down 4096 to direct >>�DBD::Sybase connections and to some old 'C' code using DBlib >>�directly. >> >>�Question 1: Now, according to what I've read, if you pass a CTlib >>�app a value for packetsize that is too high, the connection will >>�successfully negotiate a good value. Since DBD::Sybase uses CTlib >>�under the covers, I suspect that I can throw 4096 into the DBI >>�connection string with no ill effects, even if the max allowed by >>�the server is less. Ditto for a straight CTlib app. True or false? > >�Not quite - at least not during my quick tests involving OpenClient >�12.5.1. > >�Both DBlib and CTlib logins fail if you set the packet size larger >�than the max allowed. > >�The error message is: > >�4024 10 2 0 luthien �The packet size (4096) specified at login time >�is illegal. Legal values are between 512 and 2048. > >�and is the same for both Client Library and DB-Library apps.
Hmm. Look at this: http://manuals.sybase.com/onlinebooks/group-cnarc/cng1110e/ctref/@Generic__BookView;pt=1355?DwebQuery=packet Either I am interpreting it incorrectly or it has changed in 12.5.1, in which case, you have to ask Sybase, "Where are the new CT docs for 12.5.1?" > >�DBD::Sybase, Sybase::CTlib and Sybase::DBlib could be recoded to >�check for the 4024 error message at connect time, and retry lower >�packet sizes as needed, but at the moment the connect fails if you >�specify a packet size that is larger than the max supported. Perhaps a patch will be in the mail... [snip] >>�Question 3: Is there a way in Sybase::DBlib (and raw DBlib for >>�that matter) to query the server for the allowed max packet size? >>�I think that dbgetpacket gives the size of the current connection, >>�not the max allowed. > >�sp_configure 'max network packet size' > >�will give you the value you're looking for. > So, I could connect default size, do("sp_configure 'max network packet size'"), reconnect. Sounds like a strategy to me. One more question. This commercial app has a PC client and a UNIX client. The UNIX client runs on the same physical box as the Sybase server (no, I did not design the network topology) to that we can specify the full 4096 to the UNIX client. But, we were told that the PC client only works at a max of 1536 because the PC client is not on the same phisical box and is limited by the network. Does this sound reasonable? -- Matthew O. Persico
