DB2 - Problem description
Problem IC81667 | Status: Closed |
SPORADIC SQL2001N DURING STATEMENT EXECUTION | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
Starting with DB2 V9.7 FixPack 5 you might get sporadic SQL2001N errors when executing DB2 commands from a script. E.g. we have seen this with REORG statement being executed in a script. The behavior is caused by a late interrupt that was meant for previous SQL request, which can be picked up by the next SQL request. The error you will get is: SQL2001N The utility was interrupted. The output data may be incomplete. SQLSTATE=57014 Following steps will reproduce the issue on DB2 V9.7 FP5: 1. create database objects: db2 "connect to sample" db2 "create table db2v975.tt (c char(20), c1 char(20))" db2 "create unique index i2 on db2v975.tt (c, c1)" db2 "alter index i2 compress yes" 2. run following script --- #!/bin/ksh db2diag -A i=0 RC=0; while [[ $RC -eq 0 ]] ; do i=$(( $i + 1 )) xx=$( db2 connect to sample ) db2 "select cast(case when CLUSTERRATIO = -1 then CLUSTERFACTOR * 100 else clusterratio end as integer) from syscat.indexes where indname = 'I2' and tabname = 'TT' and tabschema = 'DB2V975'" | read x dummy db2 -a "reorg table db2v975.TT index I2" RC=$? echo "i:$i x $x RC $RC\n\n\n" done --- In the above example the SELECT statement causes a broken pipe (SIGPIPE) signal. This happens because the "| read x dummy" expects only 1 line output, where in this case it will be more lines. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 6. * **************************************************************** | |
Local Fix: | |
Executing the CLP with 'db2 -x' will output only one line and prevent the issue in the example above. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 Version 9.7 Fix Pack 6. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC84459 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 27.02.2012 11.06.2012 11.06.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.6 |