Hello guys,

Recently we have been getting the above mentioned errors with messages like:

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL0514N The cursor "SQLCUR4" is not in a prepared state. SQLSTATE=26501


COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL0518N The statement named in the EXECUTE statement is not in a prepared state or is a SELECT or VALUES statement. SQLSTATE=07003

Now, couple of days ago I ran the reorg, runstats and rebounded the packages and this started happening after that BUT I am not sure if the errors are result of doing this maintenance. Since then I've rebounded the packages AGAIN and emptied the prepared statement cache(read from somewhere that this might fix the issue).

Right now, we are not sure if the problem has gone away but why would it happen, I mean after running the maintenance operation why would it throw these errors? Any help is greatly appreciated!!!