Re: HELP ! Cannot write sorted rows...
Posted in 1998
Pedro Ramirez wrote:
>
> We have a program wich is working since lot time, but sometimes 'crack'
> with a message as follow:
>
> SQL statement error number -567.
> SQL statement error number -567.
> Cannot write sorted rows.
> Cannot write soted rows.
> SYSTEM error number -2.
> SYSTEM error number -2.
> No such file or directory
> No such file or directory
>
> When number of rows included in cursor for sort is greatest than a
> number not specified, then program report this error. What I' do to
> maximize ?
You do not state which version of Informix which will affect the answer.
the problem is that when there are fewer rows the sort can happen
entirely in memory so the problem does not show. When there are more
rows the sort needs to write temporary work files to disk. The problem
details are different in 5.xx and 7.xx as is the ultimate solution.
Basically Informix does not have permissions to write to the temp
directory. For 5.xx this is the list of directories of filesystems
listed in the DBTEMP environment variable, if present else ROOTDBS.
For 7.xx this is based on a hierarchy of places to write:
If set the list of dbspaces OR filesystems in the environment variable
PSORT_DBTEMP in the client program's are used.
else if set the list of dbspaces in the environment variable DBSPACETEMP
in the client program's environment is used
else if present the list of dbspaces in the ONCONFIG parameter
DBSPACETEMP is usedelse if present the list of directories in the old 5.xx environment
variable DBTEMP is used
else ROOTDBS is used.
Art S. Kagel