Showing posts with label DB2. Show all posts

Steps to setup DB2 Data Studio Client for Visual Explain of queries.

As a beginner, It was hard for me to figure out how to prepare visual execution plan in DB2 Data Studio Client. I was ending up with the following error.
com.ibm.datatools.dsoe.common.da.exception.OSCSQLException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: The required Explain table "VICKY.EXPLAIN_INSTANCE" does not exist.. SQLCODE=-219, SQLSTATE=42704, DRIVER=3.68.61
     at com.ibm.datatools.dsoe.explain.luw.impl.ExplainThread.explain(Unknown Source)
     at com.ibm.datatools.dsoe.explain.luw.impl.ExplainThread.buildLUWExplainModelNeedSync(Unknown Source)
     at com.ibm.datatools.dsoe.explain.luw.impl.ExplainThread.commonProcess(Unknown Source)
     at com.ibm.datatools.dsoe.explain.luw.impl.ExplainThread.process(Unknown Source)
     at com.ibm.datatools.dsoe.explain.luw.Explainer.process(Unknown Source)
     at com.ibm.datatools.dsoe.ape.core.LUWAPEModelGenerator.generate(Unknown Source)
     at com.ibm.datatools.dsoe.ape.core.APEModelGenerator.generate(Unknown Source)
     at com.ibm.datatools.visualexplain.common.viewer.popup.LaunchVisualExplainFromEditorAction$1.run(Unknown Source)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source)
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: The required Explain table "VICKY.EXPLAIN_INSTANCE" does not exist.. SQLCODE=-219, SQLSTATE=42704, DRIVER=3.68.61
     at com.ibm.db2.jcc.am.gd.a(Unknown Source)
     at com.ibm.db2.jcc.am.gd.a(Unknown Source)
     at com.ibm.db2.jcc.am.gd.a(Unknown Source)
     at com.ibm.db2.jcc.am.uo.c(Unknown Source)
     at com.ibm.db2.jcc.am.uo.d(Unknown Source)
     at com.ibm.db2.jcc.am.uo.a(Unknown Source)
     at com.ibm.db2.jcc.t4.bb.h(Unknown Source)
     at com.ibm.db2.jcc.t4.bb.b(Unknown Source)
     at com.ibm.db2.jcc.t4.p.a(Unknown Source)
     at com.ibm.db2.jcc.t4.vb.i(Unknown Source)
     at com.ibm.db2.jcc.am.uo.ib(Unknown Source)
     at com.ibm.db2.jcc.am.uo.a(Unknown Source)
     at com.ibm.db2.jcc.am.uo.e(Unknown Source)
     at com.ibm.db2.jcc.am.uo.execute(Unknown Source)
     ... 9 more


Steps to setup Visual Explain

Step 1: Switch Data Studio Activity. Administer Databases to Tune Queries (As shown in Image)

Administer Databases to Tune Queries+ DB2 Data Studio Client

Step 2: Right click Data Source. Analyze and Tune > Configure and Tuning > Guided Configuration (As shown in Image)


Now you can generate visual explain on your queries.