SQL0818N/SQL0901N error when running db2advis

Troubleshooting

Problem

Running the db2advis command returns error message SQL0818N or SQL0901N.

Symptom

Related error information in the db2diag.log:

Error at line 11257, in file partadvise.SQC
DATA #2 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -818 sqlerrml: 0
sqlerrmc:
sqlerrp : SQLRA145
sqlerrd : (1) 0x801A006D (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0xFFFFFD76 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 51003
In some cases, SQL0901N instead of SQL0818N is returned and there is no corresponding message in db2diag.log. db2trc will show:
| | | | | db2advis_setup entry
| | | | | | parser entry
(snip)
| | | | | | | | sqljrDrdaArExecute exit [rc = 0x8037006D = -2143879059 = SQLJR_CABLT]
| | | | | | | sqlacall error [probe 3317]
| | | | | | | | sqlofica entry
| | | | | | | | | pdLog entry
(snip)
| | | | | | | | | sqlnxDbgPrint::printf entry
| | | | | | | | | sqlnxDbgPrint::printf exit [rc = 0x000001B7 = 439]
| | | | | | | | sqldesOutputMsg exit
| | | | | | | usage exit
| | | | | | parser exit [rc = 0xFFFFFC7B = -901]
| | | | | | report_error_with_loc entry
| | | | | | | report_diag_error entry
SQLCARD from DRDA flow will show SQLSTATE 51003 "Consistency tokens do not match" which corresponds to SQL0818N.

Cause

Packages required to run db2advis command were not bound

Resolving The Problem

To resolve the issue you will need bind the packages for the db2advis command to work.

1) Create a list file called db2advis.lst1 in the $HOME/sqllib/bnd (Unix/Windows) or C:\Program Files\IBM\SQLLIB\BND (Windows) directory with the following content
db2advis.lst
db2advcatalog.bnd+
db2advindex.bnd+
db2advio.bnd+
db2advis.bnd+
db2advmdc.bnd+
db2advmisc.bnd+
db2advmqt.bnd+
db2advsimulation.bnd+
db2advworkload.bnd+
gseClAdv.bnd+
mdcadvise.bnd+
partadvise.bnd
2) Connect to the database at the command line
For Example to connect to the SAMPLE database

db2 connect to SAMPLE
db2 "drop package nullid.db2advio"
3) Bind the list file using the following command

cd sqllib/bnd
db2 "bind @db2advis.lst action replace blocking all grant public
sqlerror continue messages bindadvs.out"
4) Re-run db2advis. If SQL0220N is returned see Note2
Notes:
  1. Root required to create files in ~/sqllib/bnd (Unix/Linux). Alternative is to copy the contents of ~/sqllib/bnd to another directory then create db2advis.lst in new directory. Ensure there are no spaces at end of each file in db2advis.lst.
  2. See technote DB2ADVIS returning error -220
 

Related Information

Was this topic helpful?

Not useful
Useful

Document Information

More support for:
Db2 for Linux, UNIX and Windows

Software version:
9.7, 9.5, 9.1, 10.1, 10.5, 11.1

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows

Document number:
433575

Modified date:
17 April 2019

 
Manage My Notification Subscriptions

Click the Subscribe button to stay informed of critical IBM support updates with My Notifications.

Take a proactive approach to problem prevention.

Receive support content tailored to your needs, delivered directly to you!

Receive immediate notifications of Security Bulletins and Flashes.

Receive daily or weekly notifications of technical support information such as downloads, tips, technical notes, and publications.

Log in to Subscribe

Close

Need support?

------------------------------------------------------------------------------------------
如果你觉得文章有用,欢迎打赏

最新文章

  1. HTML案例—很讨巧的一种js+css制作hover模式展示二级菜单方法
  2. 使用AFNetWorking读取JSON出现NSCocoaErrorDomain Code=3840的解决方法
  3. 面向对象的JavaScript
  4. webstorm编辑RN代码提示功能
  5. [LeetCode] Implement strStr()
  6. [C++] socket - 2 [UDP通信C/S实例]
  7. BZOJ1092 : [SCOI2003]蜘蛛难题
  8. lcd 图片
  9. /bin/rm: Argument list too long解決方法
  10. MVC简捷调用EasyUI的datagrid
  11. 注册微信小程序
  12. Linux&shell 之基本Shell命令
  13. Proving Equivalences(加多少边使其强联通)
  14. 【转】matlab图形句柄详解(一)
  15. Filecoin协议(挖矿)
  16. ImageMagick简单记录
  17. The following packages have unmet dependencies错误
  18. vue教程3-05 vue组件数据传递、父子组件数据获取,slot,router路由
  19. MyEclipse持续性开发教程:用JPA和Spring管理数据(四)
  20. UVA-1152 4 Values whose Sum is 0 (二分)

热门文章

  1. 测开-面试题-MySQL
  2. SQL Server查看端口号及修改端口号
  3. golang 映射(map)
  4. # huawei--流策略+NAT+单臂路由
  5. JavaSE——String
  6. spring 理念与项目构建
  7. 前端js校验小数点
  8. svn ssh方式避免每次输入密码
  9. 物联网IOT定位技术详解
  10. 22_webpack_优化