为了便于观察过程,我们最好为其导入数据,有一定的数据量,以便于观察转换过程,此测试数据来源都是DB2示例数据库sample中相关表中获取的,在此就不多讲,读者可以自己自行测试效果。
如此,我们就可以对其进行转换,其实db2convert工具的用法相对简单,可以进行整库转换,也可以指定单表,需要提供表的schema和tablename,具体用法可以参阅相关使用说明:
[db2inst1@dblab test]$ db2convert -d sample -z db2inst2 -t employee
Proceeding with the conversion...
Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 UNSTARTED 0.00
Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 UNSTARTED 0.00 Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 INIT 0.00 Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 INIT 100.00 Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 INIT 100.00 Table RowsNum RowsComm Status Progress(%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 COPY 0.00 Table RowsNum RowsComm Status Progress(%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 COPY 0.00 Table RowsNum RowsComm Status Progress(%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 COPY 0.00
Table RowsNum RowsComm Status Progress(%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 COPY 100.00
Table RowsNum RowsComm Status Progress(%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 42 0 COPY 100.00 Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 0 0 REPLAY 100.00
Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 0 0 REPLAY 100.00
Table RowsNum RowsComm Status Progress(%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 0 0 SWAP 0.00
Table RowsNum RowsComm Status Progress(%)
--------------------------------------- --------------- ---------------
"DB2INST2"."EMPLOYEE" 0 0 SWAP 100.00