签到成功

知道了

CNDBA社区CNDBA社区

DB2ADVIS returning error -220

2022-05-16 22:12 1232 0 原创 DB2
作者: hbhe0316

Problem
db2advis tool can return error -220 even though the explain and advise tables do existhttp://www.cndba.cn/hbhe0316/article/108012

Cause
This is caused by columns not having the proper definition or columns missing.

Diagnosing The Problem
When running db2advis tool, DB2 can return the following error:

The db2advis tool needs the explain tables and the advise tables to exist. Please create them
using the EXPLAIN.DDL script in the misc subdirectory of the sqllib directory.http://www.cndba.cn/hbhe0316/article/108012http://www.cndba.cn/hbhe0316/article/108012http://www.cndba.cn/hbhe0316/article/108012http://www.cndba.cn/hbhe0316/article/108012

0 solutions were evaluated by the advisorhttp://www.cndba.cn/hbhe0316/article/108012

exiting with error code [-220]
Resolving The Problem
1) Drop the explain and advise tables:

db2 connect to <dbname>;
db2 drop table EXPLAIN_INSTANCE;
db2 drop table EXPLAIN_STATEMENT;
db2 drop table EXPLAIN_ARGUMENT;
db2 drop table EXPLAIN_OBJECT;
db2 drop table EXPLAIN_OPERATOR;
db2 drop table EXPLAIN_PREDICATE;
db2 drop table EXPLAIN_STREAM;
db2 drop table EXPLAIN_DIAGNOSTIC;
db2 drop table EXPLAIN_DIAGNOSTIC_DATA;
db2 drop table ADVISE_INSTANCE;
db2 drop table ADVISE_INDEX;
db2 drop table ADVISE_WORKLOAD;
db2 drop table ADVISE_MQT;
db2 drop table ADVISE_PARTITION;
db2 drop table ADVISE_TABLE;
db2 drop table EXPLAIN_ACTUALS;

Note: On DB2 v10.1 the table OBJECT_METRICS was also included as part of the set of tables created by the EXPLAIN.DDL script and should be dropped as below.http://www.cndba.cn/hbhe0316/article/108012

http://www.cndba.cn/hbhe0316/article/108012

db2 drop table OBJECT_METRICS;

2) Recreate them using the EXPLAIN.DDL script located in the directory $HOME/sqllib/misc:

http://www.cndba.cn/hbhe0316/article/108012

db2 -tvf EXPLAIN.DDL

3) Bind the db2advis packages below:

http://www.cndba.cn/hbhe0316/article/108012

db2advcatalog.bnd
db2advindex.bnd
db2advio.bnd
db2advis.bnd
db2advmdc.bnd
db2advmisc.bnd
db2advmqt.bnd
db2advsimulation.bnd
db2advworkload.bnd

These bind files are located under the Instance owner's home directory $HOME/sqllib/bnd.
To bind the files you can run the following command:
db2 bind <filename.bnd>

4) Rerun the db2advis

版权声明:本文为博主原创文章,未经博主允许不得转载。

DB2

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:1150202次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ