本篇文章主要介绍了"DB2数据库优化 DB2数据库迁移",主要涉及到DB2数据库优化方面的内容,对于其他数据库感兴趣的同学可以参考一下:
DB2数据库迁移环境介绍:原数据库:Windows Server 2008 R2 64bit下的DB2 V10.5.3数据库目标标数据库:RHEL 7.0 64...
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"