db2move迁移数据遇到锁

来源:互联网 发布:天池大数据竞赛 案例 编辑:程序博客网 时间:2024/06/10 05:31

环境说明

Linux DB2 V10.1


  1. [db2inst2@kvm101 migrate_repdb01]$ db2level 
  2. DB21085I This instance or install (instance name, where applicable: 
  3. "db2inst2") uses "64" bits and DB2 code release "SQL10014" with level 
  4. identifier "0205010E".
  5. Informational tokens are "DB2 v10.1.0.4", "s140509", "IP23584", and Fix Pack 
  6. "4".
  7. Product is installed at "/opt/ibm/db2/V10.1.0.5".
计划使用db2move+db2look迁移一个数据库,数据库名叫repdb01
数据库有一个capture在运行.

新建目录 migrate_repdb01
cd  migrate_repdb01
开始使用db2move导出数据

点击(此处)折叠或打开


  1. [db2inst2@kvm101 migrate_repdb01]$ db2move repdb01 export

  2. Application code page not determined, using ANSI codepage 1208

  3. ***** DB2MOVE *****

  4. Action: EXPORT

  5. Start time: Wed Jun 8 13:46:39 2016

  6. Connecting to database REPDB01 ... Server : DB2 Common Server V10.1.4

  7. Binding package automatically ... /home/db2inst2/sqllib/bnd/db2common.bnd ... 

  8. Binding package automatically ... /home/db2inst2/sqllib/bnd/db2move.bnd ... 

  9. EXPORT: 2004 rows from table "ASN "."ASNTDIFF"
  10. EXPORT: 0 rows from table "DB2CAE2 "."CDT0"
  11. EXPORT: 0 rows from table "DB2CAE2 "."CDT1"
  12. EXPORT: 0 rows from table "DB2CAE2 "."CDT2"
  13. EXPORT: 0 rows from table "DB2CAE2 "."CDT3"
  14. EXPORT: 0 rows from table "DB2CAE2 "."CDT4"
  15. EXPORT: 0 rows from table "DB2CAE2 "."CDT5"
  16. EXPORT: 0 rows from table "DB2CAE2 "."CDTEST01"
  17. EXPORT: 178 rows from table "SYSTOOLS"."HMON_ATM_INFO"
  18. EXPORT: 0 rows from table "SYSTOOLS"."HMON_COLLECTION"
  19. EXPORT: 14 rows from table "ASN "."IBMQREP_COLVERSION"
  20. EXPORT: 0 rows from table "ASN "."IBMQREP_IGNTRAN"
  21. EXPORT: 0 rows from table "ASN "."IBMQREP_IGNTRANTRC"
  22. EXPORT: 0 rows from table "ASN "."IBMQREP_PART_HIST"
  23. EXPORT: 7 rows from table "ASN "."IBMQREP_TABVERSION"
问题来了,就一直卡在这里没有进展.....卡住

使用db2top快速查看session情况



发现db2move处于Lock waiting状态


进一步查看Lock Chain:
发现db2move会话被865号会话阻塞







是capture数据复制,暂停capture

  1. nohup asnccmd capture_server=repdb01 capture_schema=asn stop &

随后db2move立刻继续数据导出:

  1. EXPORT: 0 rows from table "ASN "."IBMSNAP_CAPENQ"
  2. EXPORT: 2012 rows from table "ASN "."IBMSNAP_CAPMON"
  3. EXPORT: 1 rows from table "ASN "."IBMSNAP_CAPPARMS"
  4. EXPORT: 1 rows from table "ASN "."IBMSNAP_CAPSCHEMAS"
  5. EXPORT: 8103 rows from table "ASN "."IBMSNAP_CAPTRACE"
  6. EXPORT: 7 rows from table "ASN "."IBMSNAP_PRUNCNTL"
  7. EXPORT: 0 rows from table "ASN "."IBMSNAP_PRUNE_LOCK"
  8. EXPORT: 3 rows from table "ASN "."IBMSNAP_PRUNE_SET"
  9. EXPORT: 8 rows from table "ASN "."IBMSNAP_REGISTER"
  10. EXPORT: 1 rows from table "ASN "."IBMSNAP_RESTART"
  11. EXPORT: 0 rows from table "ASN "."IBMSNAP_SIGNAL"
  12. EXPORT: 0 rows from table "ASN "."IBMSNAP_UOW"
  13. EXPORT: 5 rows from table "SYSTOOLS"."POLICY"
  14. EXPORT: 3986 rows from table "DB2CAE2 "."T0"
  15. EXPORT: 3999999 rows from table "DB2CAE2 "."T1"
  16. EXPORT: 3999999 rows from table "DB2CAE2 "."T2"
  17. EXPORT: 3 rows from table "DB2CAE2 "."T3"
  18. EXPORT: 3 rows from table "DB2CAE2 "."T4"
  19. EXPORT: 3 rows from table "DB2CAE2 "."T5"
  20. EXPORT: 20 rows from table "DB2CAE2 "."TEST01"

  21. Disconnecting from database ... 

  22. End time: Wed Jun 8 14:23:01 2016
恢复正常,继续导出数据后,进行数据库的迁移。


1 0
原创粉丝点击