SQL1225N, SQL4302N, SQL20540N, or SQL1224N error when using Datalake tables or executing Java SYSHADOOP routines

A Datalake table statement may fail with multiple error codes.

Symptoms

A statement using Datalake tables or executing Java SYSHADOOP routines may fail with SQL1225N, SQL4302N, SQL20540N, or SQL1224N with the tokens of the message, reason codes, or db2diag log file indicating that the Java heap size has been exceeded.

Causes

The Java SYSHADOOP routines and other internal operations supporting Datalake tables execute in a fenced mode process (FMP) with a Java virtual machine (JVM). During the execution of one or more of these routines, the Java heap size of the JVM has been exceeded.


Resolving the problem

Increase the Java heap size and rerun any statement that has failed. Restarting the instance may be needed after increasing the Java heap size.

For example, increase the Java heap size by doubling it from its default value of 65536:
db2 update dbm cfg using java_heap_sz 131072