Error message: The statement is too long or too complex (SQL0101N)

This error occurs when there is not enough storage available in the database heap to process a statement.

Problem

When you add many columns to a custom report, the following error message might be displayed:
SQL0101N The statement is too long or too complex

This message indicates that all available memory for the database is used.

Action

Increase the database heap size to allow a larger database heap. For example, to change the IBM Spectrum® Control database heap size, use the db2 UPDATE DB command:

db2 UPDATE DB CFG FOR TPCDB USING STMTHEAP 500000