DB2 - Problem description
Problem IC86167 | Status: Closed |
SQL0153N MAY BE RETURNED WHEN RUNNING DBMS_SQL.EXECUTE WITH SQL STATEMENT THAT IS PREFIXED BY SPACES IN ORACLE-COMPATIBLE MODE | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
After Oracle-compatible mode is enabled, if you create a procedure that will execute a SQL statement that is prefixed by spaces, you may receive SQL0153N. For example, CREATE OR REPLACE PROCEDURE DBMS_SQL_TEST5 IS vc_SQL varchar2(2000); cid INTEGER; row NUMBER; v_firstnme varchar2(20); v_lastname varchar2(20); BEGIN vc_SQL := ' SELECT FIRSTNME, LASTNAME FROM employee WHERE rownum=5'; cid := DBMS_SQL.OPEN_CURSOR; DBMS_SQL.PARSE(cid, vc_SQL, DBMS_SQL.native); DBMS_SQL.DEFINE_COLUMN_VARCHAR(cid,1,v_firstnme, 20); DBMS_SQL.DEFINE_COLUMN_VARCHAR(cid,2,v_lastname, 20); --Execute SQL statement row := DBMS_SQL.EXECUTE(cid); -- Retrieve one row DBMS_SQL.FETCH_ROWS(cid, row); -- Get each column data DBMS_SQL.COLUMN_VALUE_VARCHAR(cid, 1, v_firstnme); DBMS_SQL.COLUMN_VALUE_VARCHAR(cid, 2, v_lastname); --Close cursor DBMS_SQL.CLOSE_CURSOR(cid); END DBMS_SQL_TEST5; call DBMS_SQL_TEST5; | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All users running servers on DB2 Version 9.7 GA on platforms * * Linux, Unix and Windows. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Update to DB2 Version v9.7 Fix Pack 8. * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows | |
Solution | |
This problem is first fixed in DB2 Version v9.7 Fix Pack 8. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC88647 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 27.08.2012 01.04.2013 01.04.2013 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP8 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.8 |