ZCBUS数据导出工具tableimp
tableimp为数据库导入工具,将制定目录的bsd文件,直接读取导入到指定目标数据库中
目前支持数据库列表
数据库列表 | 版本列表 | 操作系统列表 |
---|---|---|
ORACLE | 8I/9I/10G/11G/12C/18C/19C/20C | WINDOWS/LINUX/AIX/HP-UX/SOLARIS |
mysql | 5.5,5.6,5.7 | WINDOWS/LINUX |
sqlserver | 2005以及以上 | WINDOWS/LINUX |
POSTGRESQL | 9.4以上 | LINUX/WINDOWS |
SYBASE | 12.7以上 | LINUX |
需要在ZCBUS用户下执行,环境变量生效的前提下,自动引入LIB库文件,以及ddl转换模块。
TABLEIMP参数列表
- -h help
- -log_level 2 log_level
- -log 1.log log file
- -table ds.t1 table to import
- -db postgres database, for postgresql,db2,sqlserver
- -parallel 2 import threads
- -idir /tmp bsd file dir to import
- -mode 0 0 - load, 1 - sql bind, 2 - direct sql (default 0)
- -truncate not create table, only truncate
- -filter_ddl filter ddl operation
- -db_charset GB18030 set target database charset, for sybase
- -keys c1,c3 set cols replace pk, if set this, do not check pk
- -cols c1,c3 set columns to apply
- -addcol ZCBUS_SOURCE_PART=1000,ZCBUS_SOURCE_OPTYPE,ZCBUS_INSERT_OPTIME
add coumns, support ZCBUS_SOURCE_PART,ZCBUS_SOURCE_OPTYPE,
ZCBUS_SOURCE_OPTIME,ZCBUS_TARGET_OPTIME,ZCBUS_INSERT_OPTIME
- -land_file for sybase load, default 0, if set 1, land to file first
- -msg_len 5242880 split message length, default 5M
- -repair repair data by bsd file
- -bsd 1.bsd bsd file for repair
- -delete_file delete loaded file
- -zbmq_topic ds.tt zbmq mode, topic name
### 导出DEMO用例
- ORACLE
./tableimp oracle:zcbus/password@172.17.58.145:1521/oracle12c -table zcbus.test2 -idir /tmp
- MYSQL
./tableimp mysql:zcbus/password@127.0.0.1:3306 -table ds.t1 -idir /tmp
- SQLSERVER
./tableimp sqlserver:zcbus/password@172.17.104.185:1433 -db dt2 -table dbo.test_string -idir /tmp
- POSTGRESQL
./tableimp sybase:zcbus/password@172.17.58.145:5432 -db ds -table public.test -idir /tmp
- SYBASE
./tableimp sybase:zcbus/password@172.17.58.145:5000 -db ds -table dbo.test -idir /tmp
- SYBASEIQ
./tableimp sybaseiq:zcbus/password@172.17.58.145:5000 -db ds -table dbo.test -idir /tmp
文档更新时间: 2022-02-08 20:53 作者:阿力