home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC64012 Status: Geschlossen

SQLCODE -1224 FROM TRIGGER OR IF STATEMENT UNDER CERTAIN CONDITIONS

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
SQL1224N may result when the condition in a trigger WHEN clause 
or an IF statement references both: 
1. an SQL scalar or row function 
2. a subquery 
 
Example: 
CREATE TABLE PARTITION ( ID INT NOT NULL, STATUS SMALLINT NOT 
NULL, LOAD_ID INT NOT NULL ) 
 
CREATE TABLE DOMAIN ( PROPERTY VARCHAR ( 32 ) NOT NULL, NAME 
VARCHAR ( 32 ) NOT NULL, CODE SMALLINT NOT NULL ) 
 
 
CREATE FUNCTION GET_PROPERTY(p VARCHAR(32), s VARCHAR(32)) 
RETURNS INT 
READS SQL DATA 
DETERMINISTIC 
RETURN SELECT domain.code FROM domain WHERE domain.property = p 
AND domain.name = s 
 
 
CREATE FUNCTION GET_STATUS(s VARCHAR(32)) 
RETURNS INT 
READS SQL DATA 
DETERMINISTIC 
RETURN GET_PROPERTY('STATUS', s) 
 
CREATE TRIGGER RECORD_HISTORY 
AFTER UPDATE OF STATUS ON PARTITION 
REFERENCING NEW AS N 
FOR EACH ROW MODE DB2SQL 
WHEN (((N.status = get_status('STORED'))) AND ((SELECT COUNT(*) 
FROM partition)=0) ) 
BEGIN 
END 
 
update partition set status = get_status('STORED') where id = 
562126 
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 your 
particular request 
due to an error or a force interrupt.  SQLSTATE=55032
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* SQL1224N may result when the condition in a trigger WHEN     * 
* clause                                                       * 
* or an IF statement references both:                          * 
* 1. an SQL scalar or row function                             * 
* 2. a subquery                                                * 
*                                                              * 
* Example:                                                     * 
* CREATE TABLE PARTITION ( ID INT NOT NULL, STATUS SMALLINT    * 
* NOT                                                          * 
* NULL, LOAD_ID INT NOT NULL )                                 * 
*                                                              * 
* CREATE TABLE DOMAIN ( PROPERTY VARCHAR ( 32 ) NOT NULL, NAME * 
*                                                              * 
* VARCHAR ( 32 ) NOT NULL, CODE SMALLINT NOT NULL )            * 
*                                                              * 
*                                                              * 
* CREATE FUNCTION GET_PROPERTY(p VARCHAR(32), s VARCHAR(32))   * 
*                                                              * 
* RETURNS INT                                                  * 
* READS SQL DATA                                               * 
* DETERMINISTIC                                                * 
* RETURN SELECT domain.code FROM domain WHERE domain.property  * 
* = p                                                          * 
* AND domain.name = s                                          * 
*                                                              * 
*                                                              * 
* CREATE FUNCTION GET_STATUS(s VARCHAR(32))                    * 
* RETURNS INT                                                  * 
* READS SQL DATA                                               * 
* DETERMINISTIC                                                * 
* RETURN GET_PROPERTY('STATUS', s)                             * 
*                                                              * 
* CREATE TRIGGER RECORD_HISTORY                                * 
* AFTER UPDATE OF STATUS ON PARTITION                          * 
* REFERENCING NEW AS N                                         * 
* FOR EACH ROW MODE DB2SQL                                     * 
* WHEN (((N.status = get_status('STORED'))) AND ((SELECT       * 
* COUNT(*)                                                     * 
* FROM partition)=0) )                                         * 
* BEGIN                                                        * 
* END                                                          * 
*                                                              * 
* update partition set status = get_status('STORED') where id  * 
* =                                                            * 
* 562126                                                       * 
* 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 your  * 
*                                                              * 
* particular request                                           * 
* due to an error or a force interrupt.  SQLSTATE=55032        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 9.7 Fix Pack 1 or later.              * 
****************************************************************
Local-Fix:
Do not specify both an SQL function and a subquery in the 
condition in the trigger WHEN clause or the IF statement.
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
The problem has been fixed in DB2 Version 9.7 Fix Pack 1
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
22.10.2009
16.02.2010
16.02.2010
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP1
Problem behoben lt. FixList in der Version
9.7.0.1 FixList