DB2 - Problem description
Problem IC74430 | Status: Closed |
INSTANCE TERMINATES ABNORMALLY WHEN COMPILING AN SQL PROCEDURE THAT USES CONTAINS() | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
If you compile an SQL procedure, SQL function, compiled trigger, or compiled compound statement that contains an expression that uses CONTAINS(), your DB2 instance may terminate with error SQL1224N: For example, given table TEST_TABLE, with columns NAME and ID: create procedure test() begin declare v1 varchar(5); -- ... set v1 = (select id from test_table where contains(name, '#') > 0); -- ... end DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL1224N The database manager is not able to accept new requests, has terminated all requests in progress, or has terminated the specified request because of an error or a forced interrupt. SQLSTATE=55032 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * If you compile an SQL procedure, SQL function, compiled * * trigger, * * or compiled compound statement that contains an expression * * that * * uses CONTAINS(), your DB2 instance may terminate with error * * * * SQL1224N: * * * * * * * * For example, given table TEST_TABLE, with columns NAME and * * ID: * * * * create procedure test() * * * * begin * * * * declare v1 varchar(5); * * * * * * * * -- ... * * * * * * * * set v1 = (select id from test_table where contains(name, * * '#') * * > 0); * * * * * * * * -- ... * * * * end * * * * DB21034E The command was processed as an SQL statement * * because * * it was not a * * * * valid Command Line Processor command. During SQL processing * * it * * returned: * * * * SQL1224N The database manager is not able to accept new * * * * requests, has * * * * terminated all requests in progress, or has terminated the * * * * specified request * * * * because of an error or a forced interrupt. SQLSTATE=55032 * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 4. * **************************************************************** | |
Local Fix: | |
If possible, rewrite query predicates to avoid the use of CONTAINS() inside SQL routines; for example: set v1 = (select id from test_table where name like '%#%'); | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows | |
Solution | |
This problem is fixed in DB2 Version 9.7 Fix Pack 4. | |
Workaround | |
See LOCAL FIX. | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 11.02.2011 28.04.2011 28.04.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP4 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.4 |