DB2 - Problem description
Problem IC72964 | Status: Closed |
EXPORT MAY INCORRECTLY REPORT SQL27981W, IF THERE IS A 4-CHARACTER TOKEN IN THE EXPORT'S SELECT STATEMENT | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
DB2 export command may incorrectly report a SQL27981W warning message. For example, any of the following will generate the warning SQL27981W message: db2 "export to abc.del of del values ('ABC ')" db2 "export to abc.del of del values ('ABC ' || ' ')" db2 "export to abc.del of del select tabname, 'ABC ' from syscat.tables" db2 "export to test.ixf of ixf select case when name='AAAA' then '11' else '22' end from sysibm.systables" Example output: $ db2 "export to abc.del of del select tabname, 'ABC ' from syscat.tables" SQL3104N The Export utility is beginning to export data to file "abc.del". SQL27981W The utility could not verify presence of attached or detached data partitions in the target table or the source table. SQL3105N The Export utility has finished exporting "360" rows. Number of rows exported: 360 Explanation: DB2 scans and parses the select statement of an export command, and incorrectly determines that the first 4-character token (from token 3 onwards) it finds as the FROM keyword, and the next token as the table name. It then runs some internal SQL queries using the table name to determine table characteristics. If it does not determine the correct FROM keyword (for example, a 4-character token precedes the real FROM keyword), then the internal SQL queries with the wrong table name may fail with syntax errors, and DB2 export will then return the SQL27891W warning message. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users of export. * **************************************************************** * PROBLEM DESCRIPTION: * * See Problem Description above. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 5. * **************************************************************** | |
Local Fix: | |
The incorrect SQL27981W warning message can be ignored, or user can attempt to modify the export's select statement slightly so that it does not contain 4-character tokens preceding a valid FROM keyword, and still have the correct semantic meaning. For example, the following will not generate the warning: db2 "export to abc.del of del values ('ABC')" db2 "export to abc.del of del values ('ABC' || ' ')" db2 "export to abc.del of del values (cast ('ABC ' as char (4)))" db2 "export to abc.del of del select tabname, cast ('ABC ' as char (4)) from syscat.tables" db2 "export to test.ixf of ixf select case when DEPTNAME = 'AAA' then '11' else '22' end from org" | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Solution | |
First Fixed in Version 9.7 Fix Pack 5. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 02.12.2010 23.12.2011 23.12.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP5 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.5 |