I am using a Perl 5.8.3 script to query Oracle 11g database. The connection is established with ODBC Extension for Win32:
http://search.cpan.org/~gsar/libwin32-0.191/ODBC/ODBC.pm
As you can see in the documentation (link), the buffer size is limited to 10K. This size of the buffer is not sufficient in some cases (i.e. too small).
- Excerpt from the link above: “The amount of memory that is allocated to retrieve the field data of a record is dynamic and changes when it need to be larger.” I have tested it and the buffer size is not increasing with larger data. It just errors out. Is there any configuration / setup / initialization / parameters passing I need to do? Am I missing something here?
- What is the life span of the allocated buffer? Is it throughout the lifetime of the opened connection?
- I can increase the buffer size with SetMaxBuffer size up to 2GB. But to what size? Having it too large might put the server stability at risk. One option is to get the row length (the size in bytes for the actual data for all the columns for a record. Not an average) in order for us to allocate sufficient buffer size dynamically. Is there an easy way to do that or I must tally up the sum of all columns? This option will increase the DB trips but in this specific case, it’s not an issue. Related: Oracle - How do I get the actual size of a specific ROW? http://www.dba-oracle.com/t_get_length_of_row.htm
Thanks in advance!