Look at the Command Ref. for the
SET CURRENT EXPLAIN ...
-SET--CURRENT--EXPLAIN--SNAPSHOT--+---+--+-NO------------+---><
+-YES-----------+
+-EXPLAIN-------+
'-host-variable-'
-SET CURRENT EXPLAIN MODE--+---+--+-NO----------------+------><
+-YES---------------+
+-EXPLAIN-----------+
+-RECOMMEND INDEXES-+
+-EVALUATE INDEXES--+
'-host-variable-----'
Set that on your command line, call the appl and go.
If you want to set this at the db2cli.ini file, look at:
DB2EXPLAIN CLI/ODBC Configuration Keyword
Keyword Description:
Determines whether Explain snapshot and/or Explain table
information will be generated by the server.
db2cli.ini Keyword Syntax:
DB2EXPLAIN = 0 | 1 | 2 | 3
Default Setting:
Neither Explain snapshot nor Explain table information will be
generated by the server.
Equivalent Connection Attribute:
SQL_ATTR_DB2EXPLAIN
HTH, Pierre.
Fan Ruo Xin wrote:
Is there a way I can capture the access plans for all the sql stmts
written in a java (jdbc) application?
I reconfigured the db2cli.ini ...
I also tried to rebind the db2cli.lst ...
No one worked ...
Thanks,
FRX
--
Pierre Saint-Jacques
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.