DB2ADVIS returning error -220

之前执行db2advis 的时候报了错:

 

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-01.ibm.com/support/docview.wss?uid=swg21607022

 

 

 

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.

  •  

db2 drop table OBJECT_METRICS; 

2) Recreate them using the EXPLAIN.DDL script located in the directory $HOME/sqllib/misc: db2 -tvf EXPLAIN.DDL
3) Bind the db2advis packages below: 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

 

最后执行:db2advis -d dbname -i 1.sql -n schema -1 schema

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值