473,402 Members | 2,053 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,402 software developers and data experts.

stale cursor???

Hello All!

We have a cursor in an application which fetches some data out of a DB2-DB.
Normally it all works kind of well.
We inserted a routine at certain places in order to do some
perfomance-monitoring .
Now we got the problem, that the cursor closes at some point although not
all the data has been fetched and then next fetch of the application causes
an error.
Is there a way to force the cursor to stay open?

Thanks for your hints or help in advance!

Bye!

Oli
Nov 12 '05 #1
4 4056
If this is cli or jdbc, you should check your auto-commit on in your
sp/udf (that's what you mean by routine, right)?

The cursor will stay open until a tx boundary...if you need to commit,
and leave the cursor open, you can create the cursor 'with hold' but if
the commit/rollback is happening accidentally, then you need to find out
where/why.

Oliver Stratmann wrote:
Hello All!

We have a cursor in an application which fetches some data out of a DB2-DB.
Normally it all works kind of well.
We inserted a routine at certain places in order to do some
perfomance-monitoring .
Now we got the problem, that the cursor closes at some point although not
all the data has been fetched and then next fetch of the application causes
an error.
Is there a way to force the cursor to stay open?

Thanks for your hints or help in advance!

Bye!

Oli


Nov 12 '05 #2
Sadly this seems not to be the cause of the error.
The cursor only reads data and performs no commit or rollback.
The routine/program which was inserted into the code, sends time-based
information to a programoutside our application which holds these
information for later analysis. We think that a kind of timeout is performed
on the cursor.
We tried the Hold-option which did not solve the problem.

Thanks for your hint, Sean!
Have a nice Weekend!

Bye!
Oli
"Sean McKeough" <mc******@nospam.ca.ibm.com> schrieb im Newsbeitrag
news:bm**********@hanover.torolab.ibm.com...
If this is cli or jdbc, you should check your auto-commit on in your
sp/udf (that's what you mean by routine, right)?

The cursor will stay open until a tx boundary...if you need to commit,
and leave the cursor open, you can create the cursor 'with hold' but if
the commit/rollback is happening accidentally, then you need to find out
where/why.

Oliver Stratmann wrote:
Hello All!

We have a cursor in an application which fetches some data out of a DB2-DB. Normally it all works kind of well.
We inserted a routine at certain places in order to do some
perfomance-monitoring .
Now we got the problem, that the cursor closes at some point although not all the data has been fetched and then next fetch of the application causes an error.
Is there a way to force the cursor to stay open?

Thanks for your hints or help in advance!

Bye!

Oli

Nov 12 '05 #3
There's no concept of a cursor timeout...I'd suggest using a statement
event monitor to see what's being done for that application id (what
happens after the open, and before the -501 error).

Oliver Stratmann wrote:
Sadly this seems not to be the cause of the error.
The cursor only reads data and performs no commit or rollback.
The routine/program which was inserted into the code, sends time-based
information to a programoutside our application which holds these
information for later analysis. We think that a kind of timeout is performed
on the cursor.
We tried the Hold-option which did not solve the problem.

Thanks for your hint, Sean!
Have a nice Weekend!

Bye!
Oli
"Sean McKeough" <mc******@nospam.ca.ibm.com> schrieb im Newsbeitrag
news:bm**********@hanover.torolab.ibm.com...
If this is cli or jdbc, you should check your auto-commit on in your
sp/udf (that's what you mean by routine, right)?

The cursor will stay open until a tx boundary...if you need to commit,
and leave the cursor open, you can create the cursor 'with hold' but if
the commit/rollback is happening accidentally, then you need to find out
where/why.

Oliver Stratmann wrote:

Hello All!

We have a cursor in an application which fetches some data out of a
DB2-DB.
Normally it all works kind of well.
We inserted a routine at certain places in order to do some
perfomance-monitoring .
Now we got the problem, that the cursor closes at some point although
not
all the data has been fetched and then next fetch of the application
causes
an error.
Is there a way to force the cursor to stay open?

Thanks for your hints or help in advance!

Bye!

Oli



Nov 12 '05 #4
"Oliver Stratmann" <st*****@gmx.de> wrote in message news:<bm************@ID-180535.news.uni-berlin.de>...
Hello All!

We have a cursor in an application which fetches some data out of a DB2-DB.
Normally it all works kind of well.
We inserted a routine at certain places in order to do some
perfomance-monitoring .
Now we got the problem, that the cursor closes at some point although not
all the data has been fetched and then next fetch of the application causes
an error.
Is there a way to force the cursor to stay open?

Thanks for your hints or help in advance!

Bye!

Oli

Is the error -501?

When a cursor is openened, it is valid for the package
schema.packageid is was openened in (as can be seen by testing, I do
not know if this behavior is documented): DB2 UDB LUW when processing
the fetch, will look at controlinfo in the package addressed at time
of the fetch. So if a set current packageset has been issued between 2
fetches, and the schema has changed, the fetch will not find his
control info he expects to find in <schema at open cursor
time><packageid> and will return -501 (assuming newschema.packageid
exists, otherwise it will return -805). This is one occurence I know
where a -501 can be returned.

Bernard Dhooghe
Nov 12 '05 #5

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

Similar topics

0
by: Jeff Nokes | last post by:
Hello, I'm using Cache::SharedMemoryCache with an Apache 1.3.28 / mod_perl 1.28 / Mason instance on RedHat Linux 7.2. The caching mechanism seems to work fine, it creates one shared memory...
1
by: John Rivers | last post by:
Hello, This topic has bugged me for years. The ideal for handling web forms would be that submitting the form replaces the browser history's current url with the url resulting from the form...
2
by: dave | last post by:
In my form Ive got a SaveData() routine that saves changes to a DB. When I encounter an exception in the save operations, I am having trouble chaning the cursor back to the default cursor, it just...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
1
by: Jonathan N. Little | last post by:
With all the security concerns and folks disabling JavaScript and cookies I converted my site to PHP. Originally I use session cookie to keep track of items our patrons selected on our gallery for...
3
by: petermichaux | last post by:
Hi, I am trying to put together the last major pieces of my project's puzzle. This is more website/client-side architecture than JavaScript syntax but I hope this is a good place to ask. I'm a...
2
by: Ulrike Klusik | last post by:
Hello Folks, i've got two structural identical tables (including tablespace and indexes) with identical data, on which the access path of an SQL is differs. But I don't see a reason for the...
0
debasisdas
by: debasisdas | last post by:
RESTRICTIONS ON CURSOR VARIABLES ================================= Currently, cursor variables are subject to the following restrictions: Cannot declare cursor variables in a package spec. ...
4
by: bodhiSoma | last post by:
I've got this weird problem. I'm connecting to MySQL via PHP, querying a particular table, closing the connection then parsing and displaying the results. I then modify the table but when I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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.