1. 程式人生 > >DB2數據庫遷移

DB2數據庫遷移

db2數據庫遷移

DB2數據庫遷移

環境介紹:

原數據庫:Windows Server 2008 R2 64bit下的DB2 V10.5.3數據庫

目標標數據庫:RHEL 7.0 64bit下的DB2 V10.5.3數據庫

遷移方法:使用db2move和db2look工具


  1. 首先從Windows下導出表結構和表數據:

    a.準備目錄D:\yjmhbak,用於存放導出來的數據文件;

    b.使用有數據庫權限的賬戶進行數據庫連接、導出等操作。如需將賬戶加入DB2ADMNS組中。

  2. 導出數據:


  3. D:\yjmhbak>db2stop force

  4. 2017-11-15 14:39:06 0 0 SQL1064N DB2STOP 處理成功。

  5. SQL1064N DB2STOP 處理成功。


  6. D:\yjmhbak>db2start

  7. 2017-11-15 14:39:24 0 0 SQL1063N DB2START 處理成功。

  8. SQL1063N DB2START 處理成功。


  9. D:\yjmhbak>db2move YJMH export -aw


  10. ***** DB2MOVE *****


  11. Action: EXPORT


  12. Start time: Wed Nov 15 14:39:58 2017



  13. Connecting to database YJMH ... successful! Server : DB2 Common Server V10.5.3


  14. EXPORT: 108 rows from table "SYSTOOLS"."ALTOBJ_INFO"

  15. EXPORT: 0 rows from table "SYSTOOLS"."FED_CACHE_MQTS"

  16. EXPORT: 0 rows from table "SYSTOOLS"."FED_CACHE_OPTIONS"

  17. EXPORT: 191 rows from table "SYSTOOLS"."HMON_ATM_INFO"

  18. EXPORT: 0 rows from table "SYSTOOLS"."HMON_COLLECTION"

  19. EXPORT: 5 rows from table "SYSTOOLS"."POLICY"

  20. EXPORT: 1 rows from table "SYSTOOLS"."STMG_DBSIZE_INFO"

  21. EXPORT: 15085 rows from table "FUTURECLOUD"."T_ACCOUNT"

  22. EXPORT: 325 rows from table "FUTURECLOUD"."T_ACCOUNT_BK"

  23. EXPORT: 3202311 rows from table "FUTURECLOUD"."T_ACCOUNT_FUNCTION"

  24. EXPORT: 1816 rows from table "FUTURECLOUD"."T_ACCOUNT_MESSAGEADDRESSLIST"

  25. EXPORT: 476 rows from table "FUTURECLOUD"."T_ACCOUNT_MESSAGEGROUP"

  26. EXPORT: 30265 rows from table "FUTURECLOUD"."T_ACCOUNT_MESSAGESEARCH"

  27. EXPORT: 1371358 rows from table "FUTURECLOUD"."T_ACCOUNT_MODULE"

  28. EXPORT: 17007 rows from table "FUTURECLOUD"."T_ACCOUNT_QUESTION"

  29. EXPORT: 49830 rows from table "FUTURECLOUD"."T_ACCOUNT_ROLE"

  30. EXPORT: 20028 rows from table "FUTURECLOUD"."T_ADDRESSLIST"

  31. EXPORT: 2821 rows from table "FUTURECLOUD"."T_ADDRESSLIST_0214"

  32. EXPORT: 2367 rows from table "FUTURECLOUD"."T_ADDRESSLIST_021416"

  33. EXPORT: 0 rows from table "FUTURECLOUD"."T_ADDRESSLIST_BK"

  34. EXPORT: 0 rows from table "FUTURECLOUD"."T_ADDRESSLIST_TEMP"

  35. EXPORT: 13 rows from table "FUTURECLOUD"."T_ADMINAUTHORITY"

  36. EXPORT: 11 rows from table "FUTURECLOUD"."T_APPLICATION"

  37. EXPORT: 14 rows from table "FUTURECLOUD"."T_APPLICATION_AREAINFO"

  38. EXPORT: 1966 rows from table "FUTURECLOUD"."T_AREAGROUP"

  39. EXPORT: 4612 rows from table "FUTURECLOUD"."T_AREAINFO"

  40. EXPORT: 14947 rows from table "FUTURECLOUD"."T_DEPARTMENT"

  41. EXPORT: 8640 rows from table "FUTURECLOUD"."T_DEPARTMENT_0311"

  42. EXPORT: 61 rows from table "FUTURECLOUD"."T_DICTIONARY"

  43. EXPORT: 64 rows from table "FUTURECLOUD"."T_DUTY"

  44. EXPORT: 703 rows from table "FUTURECLOUD"."T_FUNCTION"

  45. EXPORT: 1413501 rows from table "FUTURECLOUD"."T_LOG"

  46. EXPORT: 93647 rows from table "FUTURECLOUD"."T_LOGINRECORD"

  47. EXPORT: 72 rows from table "FUTURECLOUD"."T_LOG_DIRECTORY"

  48. EXPORT: 1599 rows from table "FUTURECLOUD"."T_MAC_AREACODE"

  49. EXPORT: 23 rows from table "FUTURECLOUD"."T_MESSAGESEARCH"

  50. EXPORT: 205 rows from table "FUTURECLOUD"."T_MODULE"

  51. EXPORT: 10700 rows from table "FUTURECLOUD"."T_NEWS"

  52. EXPORT: 82000 rows from table "FUTURECLOUD"."T_NUMBERSEARCH"

  53. EXPORT: 2050 rows from table "FUTURECLOUD"."T_RECEIVEMESSAGE"

  54. EXPORT: 7992 rows from table "FUTURECLOUD"."T_ROLE"

  55. EXPORT: 9216 rows from table "FUTURECLOUD"."T_ROLE_FUNCTION"

  56. EXPORT: 7400 rows from table "FUTURECLOUD"."T_SECURITYCODE"

  57. EXPORT: 51823 rows from table "FUTURECLOUD"."T_SENDMESSAGE"

  58. EXPORT: 570 rows from table "FUTURECLOUD"."T_SMS_NUMBER"

  59. EXPORT: 285 rows from table "FUTURECLOUD"."T_TIMERMESSAGE"

  60. EXPORT: 1750985 rows from table "FUTURECLOUD"."T_WEBSERVICELOG"


  61. Disconnecting from database ... successful!


  62. End time: Wed Nov 15 14:57:21 2017

  63. D:\yjmhbak>

導出完成!


本文出自 “花之旭's Blog” 博客,謝絕轉載!

DB2數據庫遷移