So my posts on speific error codes that are frequently seen in commerce databases, and what to do about them seem pretty popular. My #1 and #2 posts in # of views (after “Home Page” ) are ones that describe specific errors and what to do about them. So this was one of the areas I came up with when thinking about that type of post.
How this error looks
This error happens most frequently with BODL or with custom code that is meant to do something with a large number of rows, usually using cursors in a stored procedure or statement handles in a Java application. At least once every six months a developer comes to me with this error. It typically looks something like this:
2010-04-23 15:32:56,675 [Thread-263069] INFO - com.ibm.db2.jcc.b.SqlException: DB2 SQL Error: SQLCODE=-805, SQLSTATE=51002, SQLERRMC=NULLID.SYSLH21E 0X5359534C564C3031, DRIVER=3.50.152 2010-04-23 15:32:56,675 [Thread-263069] INFO - at com.ibm.db2.jcc.b.wc.a(wc.java(Compiled Code))
One of the important things to look for beyond the “SQLCODE=-805” is the package name – in this case “NULLID.SYSLH21E”. You may also be presented with the error in this format:
SQL0805N Package NULLID.SYSLH21E was not found.
The package name will always start out with either NULLID.SYSLH or NULLID.SYSLN. If it is something completely different, then the error being encountered is NOT the one being discussed here(and you may just need to do a simple bind on db2ubind and/or db2cli). To get a bit over technically detailed, the H means the cursors are declared with hold and the N means they are declared without hold. There will then be three numbers. The first represents the isolation level, and is one of the following:
- 0 – NC
- 1 – UR
- 2 – CS
- 4 – RS
- 8 – RR
cd ~/sqllib/bnd db2 connect to dbname db2 bind @db2cli.lst blocking all grant public clipkg 30