473,609 Members | 2,296 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.sysdummy 1;
open c1;
end@

create procedure cursor_test2(ou t p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCA TOR 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 3249
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.sysdummy 1;
open c1;
end@

create procedure cursor_test2(ou t p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCA TOR 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.sysdummy 1;
open c1;
end@

create procedure cursor_test2(ou t p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCA TOR 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.sysdummy 1;
open c1;
end@

create procedure cursor_test2(ou t p_out char(1))
language sql
begin
DECLARE loc1 RESULT_SET_LOCA TOR 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 sqlaAssocLocato r, 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

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

Similar topics

4
1687
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 and then use 'new' to create an instance?
8
4608
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
2253
by: Philip Sherman | last post by:
SELECT columns FROM t1 JOIN t2
8
3136
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 db2diag.log like: ================= 2004-06-06-17.21.48.671000 Instance:DB2 Node:000
2
5554
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 brings the whole instance down and it has to be restarted. In addition the job seems to be stuck in the TOOLSDB as if I try to delete the backup job I get "The task is currently running". So I went to the command line and tried "db2 backup database...
0
1278
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 follows. BtnTest.Attributes = "StartWaitCursor();"; In the page, I have included the following Javascript.
6
3668
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: tlbSearch.Buttons(0).Enabled = True ' Enable search
3
3996
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 2000, but in Office 2003 crash at line: "wbc = workbook.VBProject.VBComponents.Add(1)" Please help me :-( the code of the module that crash is (only in Excel 2003, in 2000 not): import os
2
5318
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 the columns are of type text and the combined length exceed 255 this causes pyodbc to fail and python to crash.
0
8126
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8065
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8563
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8524
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8394
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2527
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.