IBM Support

SQLCODE=-901,SQLSTATE=58004,SQLERRMC=Number of HVnum is 0 or less.

Troubleshooting


Problem

The DB2 JDBC driver may hang for few minutes and then fail with SQLERRMC as "Number of HVnum is 0 or less" when using the GET DIAGNOSTICS SQL statement in an atomic context.

Cause

The reason for this error is extended indicator support which was added in DB2 V9.7 fp2.  It was enabled by default in DB2 V9.7 fp2 for Java clients.

Resolving The Problem

Extended indicators can be disabled by setting the"enableExtendedIndicators" JDBC property to "no":

      Properties p = new Properties();
      p.setProperty( "enableExtendedIndicators","no");

this will avoid the -901 error.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;10.1","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Express;Express-C;Personal;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg22004073