how to clean/free up preparestatment

J

John_Woo

Hi,

We have an application which keeps running in linux with DB2.

We found that in codes, if create and close preparestatement more than
like 800, then DB2 complains: DB2 SQL error: SQLCODE: -805, SQLSTATE:
51002, SQLERRMC: NULLID.SYSLH203 0X5359534C564C3031, etc.

in such case, restart the app, then things go well until next
create/close 800 preparestatements.

I'm wondering, how to clean up such preparestatements instead of
restart app?

Thanks

John
Toronto
 
D

Daniel Dyer

Hi,

We have an application which keeps running in linux with DB2.

We found that in codes, if create and close preparestatement more than
like 800, then DB2 complains: DB2 SQL error: SQLCODE: -805, SQLSTATE:
51002, SQLERRMC: NULLID.SYSLH203 0X5359534C564C3031, etc.

in such case, restart the app, then things go well until next
create/close 800 preparestatements.

I'm wondering, how to clean up such preparestatements instead of
restart app?

I've never used DB2 and that error message is even more cryptic than
Oracle's best efforts. However, if I had to guess, it sounds like you are
failing to properly close connections or statements. You'll have to go
through the code and check everywhere that you open a connection to make
sure all resources are closed properly (in a finally block so that they
still get closed even if there is an exception). Tools such as IntelliJ
IDEA's inspections or FindBugs may be able to help locate these problems.

Dan.
 
J

John_Woo

Daniel said:
I've never used DB2 and that error message is even more cryptic than
Oracle's best efforts. However, if I had to guess, it sounds like you are
failing to properly close connections or statements. You'll have to go
through the code and check everywhere that you open a connection to make
sure all resources are closed properly (in a finally block so that they
still get closed even if there is an exception). Tools such as IntelliJ
IDEA's inspections or FindBugs may be able to help locate these problems.

Hi Dan,

Thanks lots for the reply.
Actually we are using Database Pool and it's clear that the statement
is closed. We just couldn't figure out. but we'll try IntelliJ IDEA's
inspections.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top