IBM Support

Disabling progressive streaming with CLI/JDBC applications

Troubleshooting


Problem

Problem in cli driver with progressive streaming (Abstract) --------------------------------------------------------------------------------------- Problems may occur in DB2 zOS servers that support the progressive streaming interface when retrieving LOB or XML data if the application is setting rowset size > 1 once the cursor is opened and driver require more rows than what is present in the current client buffer. Consider the application has the following function flow SQL_ATTR_ROW_ARRAY_SIZE is set to 1 SQLExecute SQLFetch SQLFetch SQL_ATTR_ROW_ARRAY_SIZE is set to 6 Assume at this point of time, the current client driver buffer has only 2 rows remaining. Then for the next sqlfetch, driver has to go to server to get the remaining 4 rows. This will cause the server to close all the mode 3 references in the first client buffer. So accessing the first 2 rows of the rowset using mode 3 reference will throw error SQL30073N. Problem in jdbc driver with progressive streaming (Abstract) ---------------------------------------------------------------------------------------- In case of JDBC applications with pure locators, the locator remains valid until the transaction is committed. However, with progressive references the lob can become inaccessible sometime after moving to the next row in the Result Set. It may or may not happen - depends on the size of the lob, and the number of rows buffered in the driver before the next fetch goes to the server. The following error is thrown when the application tries to access the LOB reference that is already closed [jcc][10120][11936][3.63.80002] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null java.io.IOException: [jcc][10120][11936][3.63.80002] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null

Environment

DB2 v9.1 FP1+ JDBC and CLI applications running against DB2 v9 NFM and above for zOS

Resolving The Problem

If the data source supports progressive streaming, also known as dynamic data format (DDF), then CLI and JDBC based applications starting from DB2 v9.1 FP1 are using progressive streaming/DDF by default.

You may want to disable this feature if the CLI/JDBC applications have the flow mentioned above so that LOB / XML data is processed the way it was before the progressive streaming interface was implemented.


Disabling progressive streaming / DDF for the CLI driver:

For CLI based application by using the CLI/ODBC keyword DynamicDataFormat=0

You can either modify the db2cli.ini file and add DynamicDataFormat=0 under the data source section that is used by the CLI/ODBC application, or you can add DynamicDataFormat=0 to the connection string used by the application.

Disabling progressive streaming / DDF for the JDBC driver:

For applications that use the Universal JDBC driver by setting the progressiveStreaming property value to 2.

We have several methods in place to disable progressive streaming for application using the Universal JDBC driver :


1) Simply set the DataSource / Connection URL property progressiveStreaming=2.
2) Use a global properties file on the client. The link to the following article covers taking a JCC trace, but the method of using a properties file is applicable to progressive streaming as well:http://www.ibm.com/developerworks/db2/library/techarticle/dm-0506fechner/

For DB2 zOS v9.1 servers for JDBC applications the setting of PRGSTRIN ZPARM value to DISABLE will not cause DB2 for z/OS to disable progressive streaming, but rather provides a mechanism for returning a server-level indicator to the jdbc driver as to what the desired progressive streaming default behavior should be against this z/OS system. zOS APAR PK46079 was created with conjunction with jcc APAR IY99846 (v9.1 FP2+). Please notice that this setting only affect the jdbc driver, not the cli driver.



Note:
For JCC based applications before DB2 v9.1 FP2, if progressiveStreaming is NOT_SET on the client side it is still enabled even if the DB2 for zOS ZPARM PRGSTRIN=DISABLE.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Programming Interface - JCC","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF025","label":"Platform Independent"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21329664