FairCom DB SQL has extensive internal debugging logic that can be accessed through various means. SQL errors can be logged to the file sql_server.log in the FairCom DB SQL directory.
TPESQLDBG is an array of 12 ‘Y’/‘N’ characters that determine which debug options are enabled.
Example
SETENV TPESQLDBG=NNNNNNNNNNYN
See