question

Kari T. avatar image
Kari T. asked ·

DB2 database gives millions of Cursor execution operations?

What is wrong if this happens? Can I see more detailed?

nam servernam
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ulf T. avatar image
Ulf T. answered ·

DB2 is always a bit dicey. Cursor can be created whenever so to see if they have any value you would have to look at a longer perspective but if you see a set of them created and then torn down without being used, then very likely someone has been using a high level tool that has generated code and calls that they don't need.

If you have access to DNA then it will be very visible there, if not then you have to go Wireshark, and that's a Little harder :)

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ulf T. avatar image
Ulf T. answered ·

DB2 is always a bit dicey. Cursor can be created whenever so to see if they have any value you would have to look at a longer perspective but if you see a set of them created and then torn down without being used, then very likely someone has been using a high level tool that has generated code and calls that they don't need.

If you have access to DNA then it will be very visible there, if not then you have to go Wireshark, and that's a Little harder :)

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Kari T. avatar image
Kari T. answered ·

Hi Ulf.

I found this, because AMD couldn't handle this much operaations and started to drop packets.

Haven't done trace yet, can I just record it? How big that will be, if those operations have millions?

I dont have accesss to DB2 server.

Could this be the problem, what I found from the forum?

"

Cursors point to records in the database so if you see lots of cursors being consumed, i'm guessing you're getting lots of rows back from the query execution. This might relate to the long running query, in that more work is required for broader searches. Take a look at the query string, is there lots of select statements without 'where' clauses to limit the amount of data coming back

"
Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Ulf T. avatar image
Ulf T. answered ·

Moi Kari

Can you be a bit more verbose - is there an error or do you have some more info?

Have you made a trace and checked the content?

Sometimes DB2 throws errors due to shortage of Resources - does the DB2 log file say anything?

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.