DB2 - Problem description
Problem IC72769 | 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 / 950 - DB2 | |
Problem description: | |
DB2 export command may incorrectly report a SQL27981W warning message. For example, any of the following will generate the SQL27981W warning 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 who are including literal values * **************************************************************** * PROBLEM DESCRIPTION: * * See above. * **************************************************************** * RECOMMENDATION: * * Upgrade to Version 9.5 Fix Pack 8 or a later release that * * includes the fix. * **************************************************************** | |
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.5 Fix Pack 8 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in Version 9.5 Fix Pack 8. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC72964 IC72965 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 23.11.2010 08.07.2011 08.07.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP8 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.5.0.8 |