Debugging SQL

Set the FGLSQLDEBUG environment variable to print SQL debug info.

SQL debug information is printed by the runtime system when the FGLSQLDEBUG environment variable is defined. This variable can be set to an integer value from 0 to 10, according to the debugging details you want to see. The debug messages are sent to the standard error stream. If needed, you can redirect the standard error output into a file.

UNIX™ (shell) example:

FGLSQLDEBUG=3
export FGLSQLDEBUG
fglrun myprog 2>sqldbg.txt

An SQL debug header is printed before executing the underlying ODI driver code. If the driver code crashes or raises an assertion, you can easily find the last SQL instruction that was executed by the program, and report to you support center.