SQL1224 is returned during the execution of an SQL procedure
阅读原文时间:2023年07月10日阅读:1

SQL1224 is returned during the execution of an SQL procedure

https://www.ibm.com/support/pages/sql1224-returned-during-execution-sql-procedure

Question & Answer

The execution of an SQL procedure can fail with error SQL1224 if a LOAD command is executed at the same time.

PROBLEM

The following message might be logged in the db2diag.log during execution of a SQL procedure.

2007-05-02-11.06.17.513639-300 I2535A1111         LEVEL: Error

PID     : 43578                TID  : 1           PROC : db2agent (SAMPLE) 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-98                 APPID: *N0.db2inst1.070502160554
MESSAGE : Severe TERMINATE err at nest lvl 1, in SQL from rtn<
DB2INST1.SELECTROW:
DATA #1 : Hexdump, 136 bytes
0x0000000110362C48 : 5351 4C43 4120 2020 0000 0088 FFFF FB38 SQLCA   …….8
0x0000000110362C58 : 0000 2020 2020 2020 2020 2020 2020 2020    ..<<<<<<<<<<<<<<
0x0000000110362C68 : 2020 2020 2020 2020 2020 2020 2020 2020<<<<<<<<<<<<<<<<<<<<
0x0000000110362C78 : 2020 2020 2020 2020 2020 2020 2020 2020<<<<<<<<<<<<<<<<<<<<
0x0000000110362C88 : 2020 2020 2020 2020 2020 2020 2020 2020<<<<<<<<<<<<<<<<<<<<
0x0000000110362C98 : 2020 2020 2020 2020 5351 4C45 4752 5054            SQLEGRPT
0x0000000110362CA8 : 0000 0000 0000 0000 0000 0000 0000 0000    …………….
0x0000000110362CB8 : 0000 0000 0000 0000 2020 2020 2020 2020    ……..<<<<<<<<
0x0000000110362CC8 : 2020 2035 3530 3332                           55032

CAUSE

The above error indicates that the SQL procedure DB2INST1.SELECTROW failed with SQL1224 because during its execution, a LOAD command using the LOCK WITH FORCE option was issued against the same table that is referenced in the stored procedure. The LOCK WITH FORCE option allows the load command to force off other applications that hold conflicting locks on the target table.

SOLUTION

Execute the SQL stored procedure after the load is complete.

------------------------------------------------------------------------------------------
如果你觉得文章有用,欢迎打赏

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器