DB2 - Problem description
| Problem IC63762 | Status: Closed |
Query compilation fails with -901 "sqlnp_initlex [300]" | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 970 - 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: * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v9.7 FP1 * **************************************************************** | |
| Local Fix: | |
Correct the table reference | |
| available fix packs: | |
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows | |
| Solution | |
Fix for this APAR will return SQL0437W for the query with syntax error. SQL0437W Performance of this complex query may be sub-optimal. Reason code: "13". SQLSTATE=01602 | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 14.10.2009 31.05.2010 03.06.2010 |
| Problem solved at the following versions (IBM BugInfos) | |
9.7.FP1 | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.7.0.2 |
|