Displaying SQL Statement Text
When SQL statement text is displayed in a DB2® report, a limit of up to 4,000 characters, or up to 15,000 characters is displayed, depending on the circumstances. SQL statements exceeding the limit are truncated.
For non-DDF observations, the SQL text for dynamic SQL can be up to 15,000 characters long. If the DB2V option is selected, then static SQL text can also be up to 15,000 characters long. Otherwise, static SQL text is limited to 4,000 characters.
For DDF observations, the SQL text for dynamic SQL can be up to 15,000 characters long. Static SQL statements are limited to 4,000 characters.
When the execution of a SQL statement is unsuccessful, DB2 sets a negative SQLCODE. In this situation, Application Performance Analyzer displays the negative SQLCODE in the DB2 reports, rather than the SQL statement text. Report F11 SQL CPU/Service Time by Statement provides a SETUP option to limit the display of SQL statements to only those that ended successfully or to only those that ended unsuccessfully.