签到成功

知道了

CNDBA社区CNDBA社区

kettle数据迁移从DB2到mysql

2021-10-02 09:04 1717 0 原创 kettle
作者: hbhe0316

kettle下载地址
https://community.hitachivantara.com/s/article/data-integration-kettlehttp://www.cndba.cn/hbhe0316/article/4831http://www.cndba.cn/hbhe0316/article/4831

1.【文件】->【新建】->【作业】
创建两个DB连接:source、target(源数据库何目标数据库),在菜单中找到【复制多表向导】,点击进行相关操作。

http://www.cndba.cn/hbhe0316/article/4831

2.选择源数据库何目标数据库
http://www.cndba.cn/hbhe0316/article/4831

http://www.cndba.cn/hbhe0316/article/4831

输入DB2的IP地址、端口、数据库名称

输入实例用户名和密码
http://www.cndba.cn/hbhe0316/article/4831

点击【测试数据库连接】
http://www.cndba.cn/hbhe0316/article/4831http://www.cndba.cn/hbhe0316/article/4831

3.设置目标端IP地址、端口、用户名、密码
设置target目标端
修改F:/kettle/pdi-ce-9.0.0.0-423/data-integration/simple-jndi下的jdbc.properties文件

MYSQL8_DB/type=javax.sql.DataSource
MYSQL8_DB/driver=com.mysql.cj.jdbc.Driver
MYSQL8_DB/url=jdbc:mysql://192.168.31.209:3306/testdb?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT
MYSQL8_DB/user=root
MYSQL8_DB/password=wwwwww

4.新建job开始迁移
新建一个job,创建2个db的连接,source,target,在菜单中找到[复制多表导向],点击进行关联操作
【工具】—【向导】—【复制多表导向】

选择要迁移的表,本测试环境只测试迁移一张表。

http://www.cndba.cn/hbhe0316/article/4831

执行任务开始迁移。

5.迁移完成

2020/07/12 11:48:51 - Carte - Installing timer to purge stale objects after 1440 minutes.
2020/07/12 11:57:57 - Spoon - 正在开始任务...
2020/07/12 11:57:57 - test1111 - 开始执行任务
2020/07/12 11:57:57 - test1111 - 开始项[创建表 [T1]]
2020/07/12 11:57:57 - test1111 - 开始项[复制数据到 [T1]]
2020/07/12 11:57:58 - 复制数据到 [T1] - Running transformation using the Kettle execution engine
2020/07/12 11:57:58 - 复制到_sorcet1_到_target - 为了转换解除补丁开始  [复制到_sorcet1_到_target]
2020/07/12 11:57:58 - 写到 [T1].0 - Connected to database [target] (commit=100)
2020/07/12 11:58:31 - 从 [T1].0 - linenr 50000
2020/07/12 11:58:38 - 写到 [T1].0 - linenr 50000
2020/07/12 11:59:08 - 从 [T1].0 - linenr 100000
2020/07/12 11:59:18 - 写到 [T1].0 - linenr 100000
2020/07/12 11:59:45 - 从 [T1].0 - linenr 150000
2020/07/12 11:59:52 - 写到 [T1].0 - linenr 150000
2020/07/12 12:00:22 - 从 [T1].0 - linenr 200000
2020/07/12 12:00:29 - 写到 [T1].0 - linenr 200000
2020/07/12 12:01:04 - 从 [T1].0 - linenr 250000
2020/07/12 12:01:12 - 写到 [T1].0 - linenr 250000
2020/07/12 12:01:47 - 从 [T1].0 - linenr 300000
2020/07/12 12:01:57 - 写到 [T1].0 - linenr 300000
2020/07/12 12:02:43 - 从 [T1].0 - linenr 350000
2020/07/12 12:02:55 - 写到 [T1].0 - linenr 350000
2020/07/12 12:03:30 - 从 [T1].0 - linenr 400000
2020/07/12 12:03:42 - 写到 [T1].0 - linenr 400000
2020/07/12 12:04:18 - 从 [T1].0 - linenr 450000
2020/07/12 12:04:26 - 写到 [T1].0 - linenr 450000
2020/07/12 12:05:05 - 从 [T1].0 - linenr 500000
2020/07/12 12:05:11 - 写到 [T1].0 - linenr 500000
2020/07/12 12:05:47 - 从 [T1].0 - linenr 550000
2020/07/12 12:05:55 - 写到 [T1].0 - linenr 550000
2020/07/12 12:06:29 - 从 [T1].0 - linenr 600000
2020/07/12 12:06:37 - 写到 [T1].0 - linenr 600000
2020/07/12 12:07:15 - 从 [T1].0 - linenr 650000
2020/07/12 12:07:24 - 写到 [T1].0 - linenr 650000
2020/07/12 12:07:56 - 从 [T1].0 - linenr 700000
2020/07/12 12:08:04 - 写到 [T1].0 - linenr 700000
2020/07/12 12:08:39 - 从 [T1].0 - linenr 750000
2020/07/12 12:08:49 - 写到 [T1].0 - linenr 750000
2020/07/12 12:09:27 - 从 [T1].0 - linenr 800000
2020/07/12 12:09:34 - 写到 [T1].0 - linenr 800000
2020/07/12 12:10:10 - 从 [T1].0 - linenr 850000
2020/07/12 12:10:22 - 写到 [T1].0 - linenr 850000
2020/07/12 12:10:54 - 从 [T1].0 - linenr 900000
2020/07/12 12:11:04 - 写到 [T1].0 - linenr 900000
2020/07/12 12:11:36 - 从 [T1].0 - linenr 950000
2020/07/12 12:11:46 - 写到 [T1].0 - linenr 950000
2020/07/12 12:12:18 - 从 [T1].0 - linenr 1000000
2020/07/12 12:12:26 - 写到 [T1].0 - linenr 1000000
2020/07/12 12:13:05 - 从 [T1].0 - linenr 1050000
2020/07/12 12:13:11 - 写到 [T1].0 - linenr 1050000
2020/07/12 12:13:56 - 从 [T1].0 - linenr 1100000
2020/07/12 12:13:59 - 从 [T1].0 - Finished reading query, closing connection.
2020/07/12 12:13:59 - 从 [T1].0 - 完成处理 (I=1104758, O=0, R=0, W=1104758, U=0, E=0)
2020/07/12 12:14:03 - 写到 [T1].0 - linenr 1100000
2020/07/12 12:14:08 - 写到 [T1].0 - 完成处理 (I=0, O=1104758, R=1104758, W=1104758, U=0, E=0)
2020/07/12 12:14:08 - test1111 - 完成作业项[复制数据到 [T1]] (结果=[true])
2020/07/12 12:14:08 - test1111 - 完成作业项[创建表 [T1]] (结果=[true])
2020/07/12 12:14:08 - test1111 - 任务执行完毕
2020/07/12 12:14:08 - Spoon - 任务已经结束.

测试从DB2到DB2的时间http://www.cndba.cn/hbhe0316/article/4831

2020/07/12 13:57:10 - Spoon - 另存为...
2020/07/12 13:57:16 - Spoon - Save file as...
2020/07/12 13:59:19 - Spoon - 正在开始任务...
2020/07/12 13:59:19 - t1 - 开始执行任务
2020/07/12 13:59:19 - t1 - 开始项[复制数据到 [T1]]
2020/07/12 13:59:19 - 复制数据到 [T1] - Running transformation using the Kettle execution engine
2020/07/12 13:59:19 - 复制到_source1t1_到_target1 - 为了转换解除补丁开始  [复制到_source1t1_到_target1]
2020/07/12 13:59:19 - 写到 [T1].0 - Connected to database [target1] (commit=100)
2020/07/12 13:59:30 - 从 [T1].0 - linenr 50000
2020/07/12 13:59:33 - 写到 [T1].0 - linenr 50000
2020/07/12 13:59:44 - 从 [T1].0 - linenr 100000
2020/07/12 13:59:46 - 写到 [T1].0 - linenr 100000
2020/07/12 13:59:56 - 从 [T1].0 - linenr 150000
2020/07/12 13:59:58 - 写到 [T1].0 - linenr 150000
2020/07/12 14:00:07 - 从 [T1].0 - linenr 200000
2020/07/12 14:00:10 - 写到 [T1].0 - linenr 200000
2020/07/12 14:00:19 - 从 [T1].0 - linenr 250000
2020/07/12 14:00:21 - 写到 [T1].0 - linenr 250000
2020/07/12 14:00:32 - 从 [T1].0 - linenr 300000
2020/07/12 14:00:35 - 写到 [T1].0 - linenr 300000
2020/07/12 14:00:45 - 从 [T1].0 - linenr 350000
2020/07/12 14:00:47 - 写到 [T1].0 - linenr 350000
2020/07/12 14:00:59 - 从 [T1].0 - linenr 400000
2020/07/12 14:01:01 - 写到 [T1].0 - linenr 400000
2020/07/12 14:01:10 - 从 [T1].0 - linenr 450000
2020/07/12 14:01:13 - 写到 [T1].0 - linenr 450000
2020/07/12 14:01:23 - 从 [T1].0 - linenr 500000
2020/07/12 14:01:25 - 写到 [T1].0 - linenr 500000
2020/07/12 14:01:35 - 从 [T1].0 - linenr 550000
2020/07/12 14:01:38 - 写到 [T1].0 - linenr 550000
2020/07/12 14:01:51 - 从 [T1].0 - linenr 600000
2020/07/12 14:01:54 - 写到 [T1].0 - linenr 600000
2020/07/12 14:02:07 - 从 [T1].0 - linenr 650000
2020/07/12 14:02:10 - 写到 [T1].0 - linenr 650000
2020/07/12 14:02:21 - 从 [T1].0 - linenr 700000
2020/07/12 14:02:23 - 写到 [T1].0 - linenr 700000
2020/07/12 14:02:32 - 从 [T1].0 - linenr 750000
2020/07/12 14:02:35 - 写到 [T1].0 - linenr 750000
2020/07/12 14:02:45 - 从 [T1].0 - linenr 800000
2020/07/12 14:02:47 - 写到 [T1].0 - linenr 800000
2020/07/12 14:02:58 - 从 [T1].0 - linenr 850000
2020/07/12 14:03:00 - 写到 [T1].0 - linenr 850000
2020/07/12 14:03:10 - 从 [T1].0 - linenr 900000
2020/07/12 14:03:13 - 写到 [T1].0 - linenr 900000
2020/07/12 14:03:23 - 从 [T1].0 - linenr 950000
2020/07/12 14:03:24 - 写到 [T1].0 - linenr 950000
2020/07/12 14:03:37 - 从 [T1].0 - linenr 1000000
2020/07/12 14:03:40 - 写到 [T1].0 - linenr 1000000
2020/07/12 14:03:52 - 从 [T1].0 - linenr 1050000
2020/07/12 14:03:54 - 写到 [T1].0 - linenr 1050000
2020/07/12 14:04:07 - 从 [T1].0 - linenr 1100000
2020/07/12 14:04:10 - 写到 [T1].0 - linenr 1100000
2020/07/12 14:04:22 - 从 [T1].0 - linenr 1150000
2020/07/12 14:04:25 - 写到 [T1].0 - linenr 1150000
2020/07/12 14:04:26 - 从 [T1].0 - Finished reading query, closing connection.
2020/07/12 14:04:26 - 从 [T1].0 - 完成处理 (I=1162570, O=0, R=0, W=1162570, U=0, E=0)
2020/07/12 14:04:29 - 写到 [T1].0 - 完成处理 (I=0, O=1162570, R=1162570, W=1162570, U=0, E=0)
2020/07/12 14:04:29 - t1 - 完成作业项[复制数据到 [T1]] (结果=[true])
2020/07/12 14:04:29 - t1 - 任务执行完毕
2020/07/12 14:04:29 - Spoon - 任务已经结束.

版权声明:本文为博主原创文章,未经博主允许不得转载。

kettle

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:1039943次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ