473,594 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4073
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******@nospa m.ca.ibm.com> schrieb im Newsbeitrag
news:bm******** **@hanover.toro lab.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******@nospa m.ca.ibm.com> schrieb im Newsbeitrag
news:bm******** **@hanover.toro lab.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.packagei d 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.packa geid
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
1530
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 segment and one semophore when in use. What I noticed was that when I gracefully shut apache down (completely), the segment and semaphore remain. I believe this is mostly intentional from design, but I would like to be able to remove any shared...
1
1610
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 processing code Response.Redirect url
2
1770
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 stays as an hourglass. It seems as though the cursor can only be set in the context of the form. I would like to set the cursor within my standard error handling module. See code below... Any ideas? Thanks, Dave
10
17323
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) stored in Me.Cursor. Or is Cursors.Default some process wide cursor shape? What is a correct statement?
1
1861
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 checkout. Since the cookie was just in the clients browser memory, garbage collection was simple. Now with PHP sessions, patrons now do not have to have cookies enabled to shop on our site, but since this is not a 'log on' and 'log off' situation...
3
5897
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 little stumped with which direction to take and advice would be greatly appreciated. I think this is a generally interesting problem but I haven't seen a post this long here before :S I have developed half of the admin interface for an e-commerce
2
2348
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 different behaviour. Both tables are allocated in the same database and storage space and use the same buffer pool. The DB2 subsystem is Version7.1 on z/OS. On both tables I've run REORG with standard statistics. I've checked for stale statistics...
0
18016
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. CREATE PACKAGE emp_stuff AS TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE; emp_cv EmpCurTyp; -- not allowed END emp_stuff;
4
2343
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 reload the PHP page, the output does not reflect this change. Viz: -------- mysqlselect * from users; +----------+
0
8251
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...
1
8003
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
8234
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
6654
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3859
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
3897
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1478
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1210
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.