关于db2 asncdc启动时报错解决方法ASN0121E CAPTURE “ASNCDC“ : “WorkerThread“. The Capture program warm start fai

1、在外部进行冷启动,利用冷启动清除旧数据 /datatest11/dbtest11/sqllib/bin/asncap capture_schema=asncdc capture_server=DOEDVLP startmode=cold & 参考文档:https://www.ibm.com/docs/en/idr/11.4.0?topic=zos-asncap-starting-capture 如果cdc进程未启动成功用如下命令查找删除冷启动进程: ps -ef | grep cdc kill -9  pid

2、再次进入db2正常热启动asncdc进程(默认启动方式warmsi (default) ) /datatest11/dbtest11/sqllib/bin/asncap capture_schema=asncdc capture_server=DOEDVLP &

3、再次查看asncdc状态 db2 =>VALUES ASNCDC.ASNCDCSERVICES('status','asncdc') 就可以看到成功启动的状态如下:

2023-05-18-11.15.31.336548 ASN0600I  "AsnCcmd" : "" : "Initial" : Program "capcmd 11.4.0 (Build 11.1.4.7 Level s2204041200, PTF DYN2204041200AMD64)" is starting. 2023-05-18-11.15.33.355436 ASN0520I  "AsnCcmd" : "ASNCDC" : "Initial" : The STATUS command response: "HoldLThread" thread is in the "is waiting" state.

2023-05-18-11.15.33.355558 ASN0520I  "AsnCcmd" : "ASNCDC" : "Initial" : The STATUS command response: "AdminThread" thread is in the "is resting" state.

2023-05-18-11.15.33.355575 ASN0520I  "AsnCcmd" : "ASNCDC" : "Initial" : The STATUS command response: "PruneThread" thread is in the "is resting" state.

2023-05-18-11.15.33.355585 ASN0520I  "AsnCcmd" : "ASNCDC" : "Initial" : The STATUS command response: "WorkerThread" thread is in the "is doing work" state.

4、如果看到如下日志 ASN0109I  CAPTURE "ASNCDC" : "WorkerThread". The Capture program has successfully initialized and is capturing data changes for "0" registrations. "0" registrations are in a stopped state. "6" registrations are in an inactive state. 表明asncdc进程启动后,但有六个表注册处于非活跃状态,解决方法需要从捕获模式删除这些表,再重新加入捕获模式

5、删除和加入捕获模式

从捕获模式删除表

CALL ASNCDC.REMOVETABLE('MYSCHEMA', 'MYTABLE') 

将表置于捕获模式

CALL ASNCDC.ADDTABLE('MYSCHEMA', 'MYTABLE') 

此时可以关注 Schema-ASNCDC-Tables-IBMSNAP_REGISTER表中数据的变化

6、重新初始化 ASN 服务 VALUES ASNCDC.ASNCDCSERVICES('reinit','asncdc')

出现如下消息则表示所有表都捕获程序已成功初始化并正在捕获数据:  ASN0023I  CAPTURE "ASNCDC" : "WorkerThread". The Capture program has been reinitialized and is capturing changes for "7" registrations. "0" registrations are in a stopped state. "0" registrations are in an inactive state. 此时异常状态修复完成,问题解决

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值