Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"BMC AMI Ops Monitor for Db2" (mvmon) trace for prepared statements (from Java)

Status
Not open for further replies.

Thomas B

Programmer
Mar 5, 2021
1
DE
Hello there,

is there anyone who knows the "BMC AMI Ops Monitor for Db2" utility for db2? I would like to understand the output of the tool.

We have a Java (test) application running a prepared statement 10 times. The mvmon output is:
[ul]
[li]prepares 10[/li]
[li]describes 10[/li]
[li]statement found 10[/li]
[li]open fetch 10[/li]
[/ul]

Shouldn't it be something like this:
[ul]
[li]prepares 1[/li]
[li]describes 1[/li]
[li]statement found 10[/li]
[li]open fetch 10[/li]
[/ul]

Running the same prepared statements on a sql server results in a (sql profiler) trace:
[ul]
[li]prepare sql 1[/li]
[li]exec prepared 10[/li]
[li]unprepare 1[/li]
[/ul]

This are the expected values. Why is db2 trace different?
(The Java application runs a db2 jcc t2 driver.)

I just make a small change to the java application. Running the prepared statement 10 times in a explicit transaction, the mvmon trace is
[ul]
[li]prepares 1[/li]
[li]describes 1[/li]
[li]statement found 10[/li]
[li]open fetch 10[/li]
[/ul]

I can't imagine db2 only uses a prepared execution plan, when the statment runs in a transaction. I have to miss something
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top