3

I have a IBM DB2 database in our application. We have a monthly Java batch process which loads data in the tables using

"load Replace"

sql command. Around millions of record will be updated every month in this batch process.
The batch was running fine without any issues in the DB2 version 9.5 . Recently the database was updated to DB2 Version V10.5. After the upgrade , we face the following issues in the batch process. (No change in the code)

  1. There is an Interrupted Exception occurring in the middle of the process.

com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-952, SQLSTATE=57014, SQLERRMC=null, DRIVER=3.69.24

  1. The data in which the data gets loaded is also getting slow after some time. At first the data ets loaded in around 50,000 rows /sec. After some time it is getting loaded at the rate of 1000 rows/second.

  2. TheCPU utilization is also getting increased gradually as the load starts.

We select data from the input tables using Java JDBC connection.Then we process the data and store the data in temporary files. From the files we insert data in the output tables using the load command(Load command executed from AIX server). Is there any upgrade issue or enhancement in DB2 10.5, that does not support this. Will using cursor solve this issue. I am also not sure if there is any connection problems in the new version of Db2.
Any help is highly appreciated. Please comment for any additional information required.

Nagesh
  • 434
  • 1
  • 8
  • 26
  • 3
    Consider asking at http://dba.stackexchange.com/ too. – Thorbjørn Ravn Andersen Jan 08 '16 at 15:19
  • 1
    Your question is a bit confusing. The `LOAD` command is not SQL, you cannot issue it using JDBC, so how do you invoke it? How do you obtain the rows/sec number from the `LOAD`? And what are "pipeline stages"? `SQLCODE=-952` means the application interrupted the statement execution, e.g. a connection timeout configured in the data source. – mustaccio Jan 08 '16 at 15:38
  • @mustaccio I have edited the question. Please check if it is clear now. – Nagesh Jan 11 '16 at 14:59
  • Can you consider reverting to DB2 version 9.5? – hovanessyan Jan 18 '16 at 13:14

1 Answers1

3

The error is caused due to the Insufficient timeout value. When you are dealing with Huge amount data you should disable the Timeout values.

You can do this with

Statement.setQueryTimeout()

The official solution is given on IBM site here

I hope you will Enjoy coding! Have great day!

Arjun
  • 3,248
  • 18
  • 35