DB2数据库迁移
db2数据库迁移
DB2数据库迁移
环境介绍:
原数据库:Windows Server 2008 R2 64bit下的DB2 V10.5.3数据库
目标标数据库:RHEL 7.0 64bit下的DB2 V10.5.3数据库
迁移方法:使用db2move和db2look工具
- 首先从Windows下导出表结构和表数据:a.准备目录D:\yjmhbak,用于存放导出来的数据文件;b.使用有数据库权限的账户进行数据库连接、导出等操作。如需将账户加入DB2ADMNS组中。
- 导出数据:
- D:\yjmhbak>db2stop force
- 2017-11-15 14:39:06 0 0 SQL1064N DB2STOP 处理成功。
- SQL1064N DB2STOP 处理成功。
- D:\yjmhbak>db2start
- 2017-11-15 14:39:24 0 0 SQL1063N DB2START 处理成功。
- SQL1063N DB2START 处理成功。
- D:\yjmhbak>db2move YJMH export -aw
- ***** DB2MOVE *****
- Action: EXPORT
- Start time: Wed Nov 15 14:39:58 2017
- Connecting to database YJMH ... successful! Server : DB2 Common Server V10.5.3
- EXPORT: 108 rows from table "SYSTOOLS"."ALTOBJ_INFO"
- EXPORT: 0 rows from table "SYSTOOLS"."FED_CACHE_MQTS"
- EXPORT: 0 rows from table "SYSTOOLS"."FED_CACHE_OPTIONS"
- EXPORT: 191 rows from table "SYSTOOLS"."HMON_ATM_INFO"
- EXPORT: 0 rows from table "SYSTOOLS"."HMON_COLLECTION"
- EXPORT: 5 rows from table "SYSTOOLS"."POLICY"
- EXPORT: 1 rows from table "SYSTOOLS"."STMG_DBSIZE_INFO"
- EXPORT: 15085 rows from table "FUTURECLOUD"."T_ACCOUNT"
- EXPORT: 325 rows from table "FUTURECLOUD"."T_ACCOUNT_BK"
- EXPORT: 3202311 rows from table "FUTURECLOUD"."T_ACCOUNT_FUNCTION"
- EXPORT: 1816 rows from table "FUTURECLOUD"."T_ACCOUNT_MESSAGEADDRESSLIST"
- EXPORT: 476 rows from table "FUTURECLOUD"."T_ACCOUNT_MESSAGEGROUP"
- EXPORT: 30265 rows from table "FUTURECLOUD"."T_ACCOUNT_MESSAGESEARCH"
- EXPORT: 1371358 rows from table "FUTURECLOUD"."T_ACCOUNT_MODULE"
- EXPORT: 17007 rows from table "FUTURECLOUD"."T_ACCOUNT_QUESTION"
- EXPORT: 49830 rows from table "FUTURECLOUD"."T_ACCOUNT_ROLE"
- EXPORT: 20028 rows from table "FUTURECLOUD"."T_ADDRESSLIST"
- EXPORT: 2821 rows from table "FUTURECLOUD"."T_ADDRESSLIST_0214"
- EXPORT: 2367 rows from table "FUTURECLOUD"."T_ADDRESSLIST_021416"
- EXPORT: 0 rows from table "FUTURECLOUD"."T_ADDRESSLIST_BK"
- EXPORT: 0 rows from table "FUTURECLOUD"."T_ADDRESSLIST_TEMP"
- EXPORT: 13 rows from table "FUTURECLOUD"."T_ADMINAUTHORITY"
- EXPORT: 11 rows from table "FUTURECLOUD"."T_APPLICATION"
- EXPORT: 14 rows from table "FUTURECLOUD"."T_APPLICATION_AREAINFO"
- EXPORT: 1966 rows from table "FUTURECLOUD"."T_AREAGROUP"
- EXPORT: 4612 rows from table "FUTURECLOUD"."T_AREAINFO"
- EXPORT: 14947 rows from table "FUTURECLOUD"."T_DEPARTMENT"
- EXPORT: 8640 rows from table "FUTURECLOUD"."T_DEPARTMENT_0311"
- EXPORT: 61 rows from table "FUTURECLOUD"."T_DICTIONARY"
- EXPORT: 64 rows from table "FUTURECLOUD"."T_DUTY"
- EXPORT: 703 rows from table "FUTURECLOUD"."T_FUNCTION"
- EXPORT: 1413501 rows from table "FUTURECLOUD"."T_LOG"
- EXPORT: 93647 rows from table "FUTURECLOUD"."T_LOGINRECORD"
- EXPORT: 72 rows from table "FUTURECLOUD"."T_LOG_DIRECTORY"
- EXPORT: 1599 rows from table "FUTURECLOUD"."T_MAC_AREACODE"
- EXPORT: 23 rows from table "FUTURECLOUD"."T_MESSAGESEARCH"
- EXPORT: 205 rows from table "FUTURECLOUD"."T_MODULE"
- EXPORT: 10700 rows from table "FUTURECLOUD"."T_NEWS"
- EXPORT: 82000 rows from table "FUTURECLOUD"."T_NUMBERSEARCH"
- EXPORT: 2050 rows from table "FUTURECLOUD"."T_RECEIVEMESSAGE"
- EXPORT: 7992 rows from table "FUTURECLOUD"."T_ROLE"
- EXPORT: 9216 rows from table "FUTURECLOUD"."T_ROLE_FUNCTION"
- EXPORT: 7400 rows from table "FUTURECLOUD"."T_SECURITYCODE"
- EXPORT: 51823 rows from table "FUTURECLOUD"."T_SENDMESSAGE"
- EXPORT: 570 rows from table "FUTURECLOUD"."T_SMS_NUMBER"
- EXPORT: 285 rows from table "FUTURECLOUD"."T_TIMERMESSAGE"
- EXPORT: 1750985 rows from table "FUTURECLOUD"."T_webSERVICELOG"
- Disconnecting from database ... successful!
- End time: Wed Nov 15 14:57:21 2017
- D:\yjmhbak>
导出完成!
来源: http://www.bubuko.com/infodetail-2396014.html