473,416 Members | 1,659 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Instance crash: playing with cursor's holdability

Hello.

v8.2.7, windows xp.

---
create procedure cursor_test()
language sql
dynamic result sets 1
begin
declare c1 cursor
--with hold
with return for
select * from sysibm.sysdummy1;
open c1;
end@

create procedure cursor_test2(out p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCATOR VARYING;

call cursor_test();
commit;
ASSOCIATE RESULT SET LOCATOR (loc1)
WITH PROCEDURE cursor_test;
ALLOCATE C1 CURSOR FOR RESULT SET loc1;
OPEN C1;
FETCH C1 INTO p_out;
CLOSE C1;
end@
---

statement
call cursor_test2(?);
leads to instance crash.
All works as expected when I comment "commit" statement in
cursor_test2 procedure or declare c1 cursor as "with hold" in
cursor_test procedure.

Sincerely,
Mark B.

Apr 16 '07 #1
10 3227
4.****@mail.ru wrote:
Hello.

v8.2.7, windows xp.

---
create procedure cursor_test()
language sql
dynamic result sets 1
begin
declare c1 cursor
--with hold
with return for
select * from sysibm.sysdummy1;
open c1;
end@

create procedure cursor_test2(out p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCATOR VARYING;

call cursor_test();
commit;
ASSOCIATE RESULT SET LOCATOR (loc1)
WITH PROCEDURE cursor_test;
ALLOCATE C1 CURSOR FOR RESULT SET loc1;
OPEN C1;
FETCH C1 INTO p_out;
CLOSE C1;
end@
---

statement
call cursor_test2(?);
leads to instance crash.
All works as expected when I comment "commit" statement in
cursor_test2 procedure or declare c1 cursor as "with hold" in
cursor_test procedure.
DB2 instances should never ever crash. Period. So you should open a PMR to
get this investigated and fixed.

Does the problem still occur with the latest FP applied? How about Version
9? Maybe that would be an easier and quicker solution...

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Apr 20 '07 #2
DB2 instances should never ever crash. Period. So you should open a PMR to
get this investigated and fixed.

Does the problem still occur with the latest FP applied? How about Version
9? Maybe that would be an easier and quicker solution...
FP14 (v8.2.7) is the latest fixpack.
I can't open PMR or check it with v9.
But it's a serious problem and I appeal to anyone who can open PMR to
do it.

P.S.:
In addition:
This simple statement:
values treat(1 as int);
crashes not only v8.2.7 but v9.1.2 too (both on windows)...
Help, somebody!!!

Apr 23 '07 #3
4.****@mail.ru wrote:
In addition:
This simple statement:
values treat(1 as int);
crashes not only v8.2.7 but v9.1.2 too (both on windows)...
Help, somebody!!!
I will work on this one - although it is an illegal construct instance
should not crash.

With your cursor one - it's similar scenario: commit closes all open
cursors except those defined WITH HOLD.

In addition - it is *not* recommended to issue COMMIT from the SP. But -
instance should not crash.

Jan M. Nelken
Apr 23 '07 #4
4.****@mail.ru wrote:
This simple statement:
values treat(1 as int);
crashes not only v8.2.7 but v9.1.2 too (both on windows)...
Help, somebody!!!
Seems Knut was faster in opening defect about this access violation.
Stay tuned...

Jan M. Nelken
Apr 23 '07 #5
Jan M. Nelken wrote:
4.****@mail.ru wrote:
>This simple statement:
values treat(1 as int);
crashes not only v8.2.7 but v9.1.2 too (both on windows)...
Help, somebody!!!

Seems Knut was faster in opening defect about this access violation.
Stay tuned...
Apparently, I was. ;-)

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Apr 23 '07 #6
4.****@mail.ru wrote:
This simple statement:
values treat(1 as int);
crashes not only v8.2.7 but v9.1.2 too (both on windows)...
Help, somebody!!!
Expectd behaviour could be (probably in one of the future versions of DB2):

$ db2 "values treat(1 as int)"
SQL20026N The type "SYSIBM.INTEGER" is not a structured type or is not an
instantiable structured type. SQLSTATE=428DP
Jan M. Nelken
Apr 23 '07 #7
4.****@mail.ru wrote:
Hello.

v8.2.7, windows xp.

---
create procedure cursor_test()
language sql
dynamic result sets 1
begin
declare c1 cursor
--with hold
with return for
select * from sysibm.sysdummy1;
open c1;
end@

create procedure cursor_test2(out p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCATOR VARYING;

call cursor_test();
commit;
ASSOCIATE RESULT SET LOCATOR (loc1)
WITH PROCEDURE cursor_test;
ALLOCATE C1 CURSOR FOR RESULT SET loc1;
OPEN C1;
FETCH C1 INTO p_out;
CLOSE C1;
end@
---

statement
call cursor_test2(?);
leads to instance crash.
All works as expected when I comment "commit" statement in
cursor_test2 procedure or declare c1 cursor as "with hold" in
cursor_test procedure.
My DB2 V9 correctly states that cursor specified is not open:

D:\Working>db2 call cursor_test2(?)
SQL0501N The cursor specified in a FETCH or CLOSE statement is not open.
SQLSTATE=24501
Will retry on V8.

Jan M. Nelken
Apr 24 '07 #8
Jan M. Nelken wrote:
4.****@mail.ru wrote:
>Hello.

v8.2.7, windows xp.

---
create procedure cursor_test()
language sql
dynamic result sets 1
begin
declare c1 cursor
--with hold
with return for
select * from sysibm.sysdummy1;
open c1;
end@

create procedure cursor_test2(out p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCATOR VARYING;

call cursor_test();
commit;
ASSOCIATE RESULT SET LOCATOR (loc1)
WITH PROCEDURE cursor_test;
ALLOCATE C1 CURSOR FOR RESULT SET loc1;
OPEN C1;
FETCH C1 INTO p_out;
CLOSE C1;
end@
---

statement
call cursor_test2(?);
leads to instance crash.
All works as expected when I comment "commit" statement in
cursor_test2 procedure or declare c1 cursor as "with hold" in
cursor_test procedure.

My DB2 V9 correctly states that cursor specified is not open:

D:\Working>db2 call cursor_test2(?)
SQL0501N The cursor specified in a FETCH or CLOSE statement is not open.
SQLSTATE=24501
V8 FP14 crashes indeed when DB2 tries to associate the locator with the
cursor internally (in sqlaAssocLocator, according to the stack traceback).

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Apr 24 '07 #9
4.****@mail.ru wrote:
I can't open PMR or check it with v9.
But it's a serious problem and I appeal to anyone who can open PMR to
do it.
Why you cannot open PMR?

I opened a defect 376747 for this issue against V8 FP14. It may make to
the next Fixpack - FP16 is the earliest opportunity.

If you really need it earlier - then special build could be constructed
- but for that we really would like to see PMR.
This simple statement:
values treat(1 as int);
crashes not only v8.2.7 but v9.1.2 too (both on windows)...
Knut opened defect 376729 for this. It is being worked upon.
Jan M. Nelken
Apr 24 '07 #10
Hello Mr Nelken,

My name's Andrzej Dobrucki
I believe we met about 10 years ago in Kielce, Poland
I was wondering how you're doing
You can reach me at my g-mail given above

Have a great day
A.D.

Apr 25 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Krice | last post by:
Is it possible that construction of a global instance can fail? I'm suspecting this because the program seems to crash before main(). Is it a better practice to declare a pointer for the object...
8
by: Jean-Marc Blaise | last post by:
Hi, I'm on Linux Intel, V8.1 / FP4. I have an instance crash. The test case: db2set DB2_FMP_COMM_HEAPSZ = 0 db2stop db2start db2mtrk -i -d -p -v ==> Instance is crashed.
10
by: Philip Sherman | last post by:
SELECT columns FROM t1 JOIN t2
8
by: Lana Zapornikova | last post by:
We are using DB2 Workgroup Server, v. 8.1, fixpack 5 under Windows 2003 Standart Edition. There were series of similar instance crashes. At the begining, some errors appeared in the...
2
by: Mike | last post by:
Greetings, Having a major problem here. running version 8.2 on win2003 server. The problem I am having is backing up a database seems to get to the last part of the backup and then fails. This...
0
by: BD Jones | last post by:
I added some code to a web form to display an hourglass cursor when posing back, but IE sometime crashes. My Web form contains a button. I set the onclick function in the code-behind as...
6
by: Larry | last post by:
Hi All, I am in .NET 2003 I have a form and a toolbar on the form. When the user clicks on a button on the toolbar I call the following Sub I get a crash on the last line: ...
3
by: dan_roman | last post by:
Hi, I developed a script with a nice interface in Tkinter that allows me to edit some formulas and to generate an Excel worksheet with VBA macros within it. The script runs perfectlly in Office...
2
by: Joe Salmeri | last post by:
I believe this bug is also related to the other problem I just reported. OS = Windows XP SP2 DB = Microsoft Access XP PROBLEM: When you use + (or &) to concatenation columns together and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.