HELP! What is 567 and 564 Sort Error? How to solve?
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
We are running a ESQL C program that opens a cursor with hold. After running for some time, we get a 567 (can't write sorted row) or 564 (Can't sort rows) - internal error. Why is this and how can we get around it? Online version is 4.1. Thank you Jim
zigzag@infi.net wrote: > > We are running a ESQL C program that opens a cursor with hold. After > running for some time, we get a 567 (can't write sorted row) or 564 > (Can't sort rows) - internal error. Why is this and how can we get > around it? > > Online version is 4.1. Your query is requiring a sort and is running out of space for sort work files. OL4.10 placed sort work files either in /tmp or rootdbs (various 4.xx and early 5.xx used one or the other the philosophy was in flux at the time). While your program is running use tbstat -d and df -k to determine what disk space is being used up during the run. Also you should look into whether you need to add an index to eliminate the sort behavior altogether. Extract the query from the ESQL program and run it in dbacces under SET EXPLAIN ON (or add a SET EXPLAIN ON to the ESQL code) and examine the sqexplain.out file to determine what the optimizer is doing. Art S. Kagel