473,687 Members | 3,505 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 3255
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
1689
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
4610
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
2255
by: Philip Sherman | last post by:
SELECT columns FROM t1 JOIN t2
8
3139
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
5560
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
3670
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
4002
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
5321
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
8947
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...
1
8782
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8786
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
5807
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4321
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4547
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2964
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
2
2215
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1950
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.