Skip to main content

Problem:

AcuXDBC may return the following error when queries are attempting to sort a large number of records:

"internal ZEXMAIN error : sort buffer overflow".

Resolution:

AcuXDBC provides a range of administrative options to set wider values, when the defaults are not sufficient.

Using the asql tool (.bat or .sh), execute the following command-line:

C:\\>asql
SQL (/? for help) ==>SET OPTION SORTPAGES T M

where T = Total number of sort pages (disk memory) and M = Memory sort pages.
The defaults are 10000 and 1000. 

For instance:

C:\\>asql
SQL (/? for help) ==>SET OPTION SORTPAGES 500000 200000;

This setting is temporary and should be run everytime the asql tool is started.

To have a permanent setting, store the SET OPTION lines in a configuration file, such as acuxdbcOptions.cfg
Then set a new environment variable GENESIS_INITSQL to let AcuXDBC finding this file.

For example:

Edit a file called c:\\etc\\acuxdbcOptions.cfg

Add the lines to this file using the following syntax, without the ";" at the end of each line:

SET OPTION SORTPAGES 500000 200000
SET OPTION MERGESIZE 10000
etc.

Then, set the environment variable to point to this cfg file, by using a commandline:

C:\\set GENESIS_INITSQL=c:\\etc\\acuxdbcOptions.cfg

[linux]export GENESIS_INITSQL=c:\\etc\\acuxdbcOptions.cfg

or by using the Windows "Advanced System Settings - Environment variables"

If the query is run via JDBC using the VORTEX.JAR library, create a file named vortex.properties and place it in the same directory where vortex.jar is.

This file will contain the same lines "SET OPTION" described above.

Support Incident: 3102321


#buffer
#JDBC
#query
#vortex.jar
#zexmain
#Merge
#AcuXDBC
#Sort
#vortex