To trace the status of cursors being executed, append the -S flag to your parameter list. You can do this through the command line (if you're brave) or through the process definition in the override options:


While you can normally extract the appropriate SQL from the SQR, there are cases where this proves quite useful. In particular it is really helpful for investigating performance issues with SQRs as it tells you the SQL text, number of compiles, executes and rows related to the cursor.

Unfortunately this doesn't resolve dynamic SQL or tell you the value of bind parameters that were passed to the SQL so it certainly has limitations but as far as I know its the closest you can get to a SQL trace in SQR.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License