DB2 - Problem description
Problem IC96707 | Status: Closed |
SQL0901N WHEN INSERTING INTO TABLE WITH A TRIGGER CALLING MQ UDF | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem description: | |
SQL0901N could be raised for inserting into a table with a trigger which is calling MQ UDF. This may occur after adding a column to the subject table. The problem may also happen if the trigger is calling other UDF that can not process expressions as input parameter. 1. create a trigger on table, calling MQ wrapper function MQSEND. CREATE OR REPLACE TRIGGER FFFFFFFFF AFTER INSERT ON TTTTTTT REFERENCING? NEW_TABLE AS NEWT FOR EACH STATEMENT BEGIN ATOMIC SELECT DB2MQ1C.MQSEND (DIGITS (NEWT.C1) CONCAT ':ADD') FROM NEWT ; -- END; 2. Conduct an insert, which would fire the trigger, intially this will not cause error INSERT INTO TTTTTTT(C1) VALUES (987654322); 3. Alter table by adding columns ALTER TABLE TTTTTTT ADD COLUMN C2 CHARACTER(20) NOT NULL DEFAULT ' ' 4. The table-alter operation could cause incorrect internal format of the query and trigger to be changed, which in turn causes the query to hit the limitation of DB2MQ1C.MQSEND that can not process expressions as input parameter INSERT INTO TTTTTTT(C1) VALUES (987654322) DB21034E? The command was processed as a SQL statement because it was not a valid Command Line Processor command.? During SQL processing it returned: SQL0901N? The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed.? (Reason "Internal error: invalid request@MQ_UnfencedServer ::get_value".) SQLSTATE=58004 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * The user is running MQ UDF. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.1 Fix Pack 4 or later * **************************************************************** | |
Local Fix: | |
Recreate the trigger can bypass the error. | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows | |
Solution | |
The problem is first fixed in DB2 Version 10.1 Fix Pack 4 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 08.10.2013 02.06.2014 02.06.2014 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.4 |