DBD::Sybase and packet sizes

From: Matthew O. Persico (matthew.persico_at_verizon.net)
Date: 03/16/04


To: <dbi-users@perl.org>
Date: Mon, 15 Mar 2004 20:28:25 -0500

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?

Question 2:
I am betting, however, that if you throw a value higher than the server's max setting at DBSETPACKET in DBlib (and Sybase::DBlib), DBlib will barf, which could explain why the commercial app barfs if you set the flag too high. True or false?

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.

--
Matthew