Fixes are available
DB2 Version 9.1 Fix Pack 7 for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 5 for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 6 for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 6a for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 7a for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 8 for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 9 for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 10 for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 11 for Linux, UNIX and Windows
DB2 Version 9.1 Fix Pack 12 for Linux, UNIX and Windows
APAR status
Closed as program error.
Error description
DB2 applications that use the legacy JDBC driver or CLI API may experience error SQL0104N in rare situations when preparing an SQL statement containing a double-byte character (e.g. 0x819B in ja_JP.SJIS) and the application makes repeated, successive calls to the Java method setMaxRows() or the CLI function SQLSetStmtAttr( ... SQL_ATTR_MAX_ROWS ... ). Example: : String sql = "SELECT '?' FROM SYSIBM.SYSDUMMY1"; PreparedStatement pstmt = conn.prepareStatement( sql ); pstmt.setMaxRows ( 500 ); pstmt.setMaxRows ( 500 ); ResultSet rs5 = pstmt.executeQuery(); : The SQL statement is incorrectly translated to contain double FETCH FIRST <n> ROWS ONLY clauses as in: SELECT * FROM SYSDUMMY1 FETCH FIRST 500 ROWS ONLY FETCH FIRST 500 ROWS ONLY
Local fix
Remove the duplicate call from the application that sets the maximum rows.
Problem summary
Users Affected: Application developers using the DB2 CLI driver or Legacy JDBC driver. Problem Description: Multi-byte characters in a literal string may cause SQL0104N errors when setting SQL_ATTR_MAX_ROWS more than once.
Problem conclusion
First fixed in DB2 UDB Version 9, Fixpak 5
Temporary fix
Set SQL_ATTR_MAX_ROWS only once.
Comments
APAR Information
APAR number
JR28436
Reported component name
DB2 UDB EXE WIN
Reported component ID
5724E4901
Reported release
910
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2008-02-05
Closed date
2008-07-02
Last modified date
2008-07-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
DB2 UDB EXE WIN
Fixed component ID
5724E4901
Applicable component levels
R910 PSN
UP
Document Information
Modified date:
11 October 2021