DB2 - Problem description
Problem IC76229 | Status: Closed |
SQL0104N RETURNED DUE TO SINGLE OR DOUBLE QUOTES INSIDE NEW STYLE COMMENT | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
Another symptom is that users executing ALTER PROCEDURE will have the Line Feed (0xA) character removed before the DDL is sent to the server. Thus when the DDL is retrieved the entire CREATE PROCEDURE statement will be one long line with no new line or carriage returns. Example: alter procedure db2inst1.sp1 replace version v1 () DISABLE DEBUG MODE ISOLATION LEVEL CS /* if there is a ' or " in this comment no LF is sent*/ LANGUAGE SQL P1: BEGIN -- Test Insert INSERT INTO T1 VALUES( 11, -- here ' or " has no problem. 55) --Parm2 ; -- end of procedure END P1@ select * from /* it is new 'style comment */ -- normal comment T1@ The problem is with /* ... */ style of comment only. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All users using CLP script and quote under new style * * comment. * **************************************************************** * PROBLEM DESCRIPTION: * * When using single or double quote inside new style comment * * (/* ... */) with a sql statement in a clp script file, sql * * fails with SQL0104N error. * * * * users executing ALTER PROCEDURE will * * have the Line Feed (0xA) character removed before the DDL is * * * * sent to the server. Thus when the DDL is retrieved the * * entire * * CREATE PROCEDURE statement will be one long line with no new * * * * line or carriage returns. * * * * * * Example: * * * * alter procedure db2inst1.sp1 replace version v1 () * * * * DISABLE DEBUG MODE * * * * ISOLATION LEVEL CS /* if there is a ' or " in this * * comment * * no LF is sent*/ * * LANGUAGE SQL * * * * P1: BEGIN * * -- Test Insert * * * * INSERT INTO T1 VALUES( * * * * 11, -- here ' or " has no problem. * * * * 55) --Parm2 * * ; * * -- end of procedure * * END P1@ * * * * * * select * from /* it is new 'style comment */ * * * * -- normal comment * * T1@ * * * * * * The problem is with /* ... */ style of comment only. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v9.5 Fixpack 9. * **************************************************************** | |
Local Fix: | |
Do not use single quotes (') or double quotes (") inside a new style comment. Another alternative is to use the old style comments instead (e.g. -- Line 1) | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in v9.5 Fixpack 9. At minimum this fix should be applied to the system executing the SQL statements. | |
Workaround | |
Do not use single quotes (') or double quotes (") inside a new style comment. Another alternative is to use the old style comments instead (e.g. -- Line 1) | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC76259 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 06.05.2011 12.03.2012 12.03.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP9 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.5.0.9 |