Latest versionsfixlist
11.1.0.6 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
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26
Question in the chat LiveZilla Live Help

DB2 - Problem description

Problem IC64958 Status: Closed

SQL774N AFTER INTERRUPT OF SQL PROCEDURE CONTAINING ONE OR MORE ATOMIC
COMPOUND STATEMENTS

product:
DB2 FOR LUW / DB2FORLUW / 950 - DB2
Problem description:
If you terminate an SQL procedure containing an atomic compound 
statement by interrupting the procedure, any statement that run 
on that connection (outside of the stored procedure) may result 
in SQLCODE -774. 
 
Example: 
 
db2 "call proc_stat_chngs_1(1)" 
^CSQL0952N Processing was cancelled due to an interrupt. 
SQLSTATE=57014 
 
$ db2 commit 
SQL0774N  The statement cannot be executed within an ATOMIC 
compound SQL 
statement.  SQLSTATE=2D522 
 
db2 "insert into session.del_milestones values ('1','1','1')" 
DB21034E The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0774N  The statement cannot be executed within an ATOMIC 
compound SQL 
statement.  SQLSTATE=2D522 
 
db2 terminate 
SQL0774N The statement cannot be executed within an ATOMIC 
compound SQL 
statement.  SQLSTATE=2D522
Problem Summary:
If you terminate an SQL procedure containing an atomic compound 
statement by interrupting the procedure, any statement that run 
on that connection (outside of the stored procedure) may result 
in SQLCODE -774. 
 
Example: 
 
db2 "call proc_stat_chngs_1(1)" 
^CSQL0952N Processing was cancelled due to an interrupt. 
SQLSTATE=57014 
 
$ db2 commit 
SQL0774N  The statement cannot be executed within an ATOMIC 
compound SQL 
statement.  SQLSTATE=2D522 
 
db2 "insert into session.del_milestones values ('1','1','1')" 
DB21034E The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0774N  The statement cannot be executed within an ATOMIC 
compound SQL 
statement.  SQLSTATE=2D522 
 
db2 terminate 
SQL0774N The statement cannot be executed within an ATOMIC 
compound SQL 
statement.  SQLSTATE=2D522
Local Fix:
Add the NEW SAVEPOINT LEVEL option to the CREATE PROCEDURE 
statement for an SQL procedure.  That procedure will not cause 
subsequent -774 errors if interrupted. 
 
CREATE PROCEDURE TEST(in N integer) 
LANGUAGE SQL 
NEW SAVEPOINT LEVEL 
BEGIN ATOMIC 
  -- ... 
END 
 
This modification need only be applied to SQL procedures 
containing BEGIN ATOMIC statements, and only to those that are 
likely subject to interruption (e.g., by Ctrl-C, FORCE 
APPLICATION, etc.).  You must recompile any modified procedures 
to apply the workaround.
available fix packs:
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 10 for Linux, UNIX, and Windows

Solution
First fixed in DB2 UDB Version 9.5, FixPak 6.
Workaround
Add the NEW SAVEPOINT LEVEL option to the CREATE PROCEDURE 
statement for an SQL procedure.  That procedure will not cause 
subsequent -774 errors if interrupted. 
 
CREATE PROCEDURE TEST(in N integer) 
LANGUAGE SQL 
NEW SAVEPOINT LEVEL 
BEGIN ATOMIC 
  -- ... 
END 
 
This modification need only be applied to SQL procedures 
containing BEGIN ATOMIC statements, and only to those that are 
likely subject to interruption (e.g., by Ctrl-C, FORCE 
APPLICATION, etc.).  You must recompile any modified procedures 
to apply the workaround.
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
04.12.2009
13.05.2010
13.05.2010
Problem solved at the following versions (IBM BugInfos)
9.5.
Problem solved according to the fixlist(s) of the following version(s)
This site uses cookies to make it easier for us to provide you with our services. By using our site you agree to the use of cookies.