IBM Support

Block Inserts Limited to 16MB of Data

Troubleshooting


Problem

This document describes the limits that IBM DB2 UDB for iSeries has on block (bulk) inserts.

Resolving The Problem

IBM DB2 for i supports multi-row inserts. The ODBC drivers support this through the block insert function. The IBM Toolbox for Java JDBC driver supports multi-row inserts using the PreparedStatement's addBatch() method.

There are limits on the multi-row insert:
  • 32767 is the maximum number of rows that can be inserted at one time.
  • 16MB is the maximum amount of data that can be in the block insert (approximately 525 rows if the row size is 32K).

The IBM Toolbox for Java JDBC handles the first limit of 32K rows by breaking the block insert up into pieces. The Access Client Solutions ODBC driver returns an error that prevents the user from giving the driver more than 32K rows at a time. Neither ODBC nor JDBC determine whether applications exceed the second limit of 16Mb data. Rather, the insert is sent to IBM i, where it results in the message SQL0901 - SQL System Error from the QSQINS module.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"Host Servers","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Historical Number

342157908

Document Information

Modified date:
31 December 2019

UID

nas8N1016054