客户端安装(在ZCBUS_SERVICE所在的服务器中安装客户端)
a)db2inst1用户创建
useradd db2inst1
passwd db2inst1
b)介质包解压
tar -xvf v9.7_linuxx64_server.tar
c) 客户端安装
cd server
./db2_install
指定安装目录,默认路径是/opt/ibm/db2/V9.7,需要修改路径输入yes:
指定安装客户端程序,输入CLIENT:
d) 实例创建
cd /opt/ibm/db2/V9.7/instance
./db2icrt db2inst1
修改ZCBUS_SERVICE的profile文件
添加如上图所示变量,并使profile文件生效
验证数据连接
su - db2inst1 (目前程序须使用DB2 用户才能运行)
[db2inst1@m2db01 ~]$ /usr/local/zcbus_client/bin/tableexp db2:db2inst1/1qaz1qaz@192.168.0.112:50000 -db testdb -table ZCBUS.TEST -edir /tmp
Linux m2db01 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
tableexp: Release 7.6-12 64 bit (QA) - Production on 2022-03-28 10:51:47
Copyright (c) 2022 ZCBUS. All Rights Reserved.
process id 742234
connect string: db2:db2inst1/1qaz1qaz@192.168.0.112:50000
login host[192.168.0.112] port[50000] user[db2inst1] password[1qaz1qaz] database[].
[INF] DB2 VERSION: 11050000 Code page: 1208
[INF] 2022-04-06 15:57:13: export table ZCBUS.TEST[1/1]...
table rows: 6, size: 0
[INF] begin export table ZCBUS.TEST...
[INF] send full sync tag[0] to full topic .
[INF] 2022-04-06 15:57:13: export bsdata: len[39]
[INF] open file /tmp/zcbus.test/0.bsd to write...
ddl: create table ZCBUS.TEST(
ID INTEGER,
NAME VARCHAR(50));;
[INF] 2022-04-06 15:57:13: export bsdata: len[95]
[INF] 2022-04-06 15:57:13: export bsdata: len[67]
[INF] 2022-04-06 15:57:13: export bsdata: len[462] rows[6/6] 100.00%
[INF] send full sync tag[1] to full topic .
[INF] 2022-04-06 15:57:13: export bsdata: len[39] rows[6/6] 100.00%
[INF] 2022-04-06 15:57:13: export table ZCBUS.TEST success.
Topic:
Tag:
Exp rows: 6
Data: 0.0007 M
Use time: 0.063 s
Speed: 0.0106 M/s
[INF] 2022-04-06 15:57:13: export table ZCBUS.TEST to path /tmp/zcbus.test success.
[INF] 2022-04-06 15:57:13: export all tables ok, 1 tables.
文档更新时间: 2023-06-30 22:30 作者:操李红