I am doing a batch process which fetches rows from table 50000 times.
The query is:
SELECT * FROM <table name> WHERE <condition; this changes for each iteration(50000)>
This batch process is done in java and uses jdbc connection.
The error shown is:
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002
This error happens at certain iteration (between 20000 to 30000)
I logged the query which caused the error and took this query and executed it using both external agent and java/jdbc; it worked fine.
what would be the problem?