DB2 - Problem description
Problem IC63665 | Status: Closed |
Query compilation fails with -901 "sqlnp_initlex [300]" | |
product: | |
DB2 FOR LUW / DB2FORLUW / 910 - DB2 | |
Problem description: | |
Compiling a query that uses optimization guidelines may fail with SQLCODE -901 reason "sqlnp_initlex [300]". This happens when the guideline contains a malformed table reference. In the following example, a double quote is missing from the table reference: SELECT C1 FROM "schema" . "table" /*<OPTGUIDELINES><TBSCAN TABLE=' "schema . "table" '/></OPTGUIDELINES>*/; SQL0901N The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed. (Reason "sqlnp_initlex [300]:rc( 0) ".) SQLSTATE=58004 db2diag.log shows : 2009-09-07-17.21.27.814163-300 I2097A741 LEVEL: Severe PID : 11111 TID : 1 PROC : db2agent (TEST) 0 INSTANCE: db2inst1 NODE : 000 DB : TEST APPHDL : 0-1500 APPID: AC118719.DBA7.0335C7110624 DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes sqlcaid : SQLCA sqlcabc: 136 sqlcode: -901 sqlerrml: 58 sqlerrmc: sqlnp_initlex [300]:rc( 0) sqlerrp : SQLNN066 sqlerrd : (1) 0x80310021 (2) 0x00000021 (3) 0x00000000 (4) 0x00000000 (5) 0xFFFFFDA8 (6) 0x00000000 sqlwarn : (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) sqlstate: Fix for this defect will return SQL0437W for the query with syntax error. SQL0437W Performance of this complex query may be sub-optimal. Reason code: "13". SQLSTATE=01602 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * Compiling a query that uses optimization guidelines may fail * * * * with SQLCODE -901 reason * * * * "sqlnp_initlex [300]". This happens when the guideline * * * * contains a malformed table reference. In the following * * example, * * a double quote is missing from the table reference: * * * * * * * * SELECT C1 FROM "schema" . "table" * * * * /*<OPTGUIDELINES><TBSCAN TABLE=' "schema . "table" * * * * '/></OPTGUIDELINES>*/; * * * * SQL0901N The SQL statement failed because of a non-severe * * * * system error. * * * * Subsequent SQL statements can be processed. (Reason * * * * "sqlnp_initlex * * * * [300]:rc( 0) ".) SQLSTATE=58004 * * * * * * db2diag.log shows : * * * * 2009-09-07-17.21.27.814163-300 I2097A741 LEVEL: Severe * * * * * * * * PID : 11111 TID : 1 PROC : * * * * db2agent (TEST) * * * * 0 * * * * * * * * INSTANCE: db2inst1 NODE : 000 DB : TEST * * APPHDL : 0-1500 APPID: AC118719.DBA7.0335C7110624 * * * * * * * * DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes * * * * * * * * sqlcaid : SQLCA sqlcabc: 136 sqlcode: -901 sqlerrml: 58 * * * * * * sqlerrmc: sqlnp_initlex [300]:rc( 0) * * * * * * * * sqlerrp : SQLNN066 * * * * * * * * sqlerrd : (1) 0x80310021 (2) 0x00000021 (3) * * * * 0x00000000 * * * * (4) 0x00000000 (5) 0xFFFFFDA8 (6) * * 0x00000000 * * * * sqlwarn : (1) (2) (3) (4) (5) (6) * * * * * * (7) (8) (9) (10) (11) * * * * * * sqlstate: * * * * * * * * Fix for this defect will return SQL0437W for the query with * * * * syntax error. * * * * SQL0437W Performance of this complex query may be * * sub-optimal. * * Reason code: * * * * "13". SQLSTATE=01602 * **************************************************************** * RECOMMENDATION: * * Correct the syntax * **************************************************************** | |
Local Fix: | |
Correct the table reference | |
available fix packs: | |
DB2 Version 9.1 Fix Pack 9 for Linux, UNIX and Windows | |
Solution | |
Problem was first fixed in Version 9.1 FP9 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC63761 IC63762 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 08.10.2009 19.04.2010 19.04.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.1.FP9 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.1.0.9 |