文档更新

This commit is contained in:
inrgihc
2021-06-10 22:28:46 +08:00
parent 8e232d5d08
commit bfdd3993ce

View File

@@ -132,70 +132,119 @@ sh ./docker-maven-build.sh
**注意:**
- *1支持源端为多个数据源类型如果dbswitch.source[i]为数组类型i为编号从0开始的整数*
- *1支持源端为多个数据源类型如果dbswitch.source[i]为数组类型i为编号从0开始的整数 *
- *2如果dbswitch.source[i].source-includes不为空则按照包含表的方式来执行*
- *2如果```dbswitch.source[i].source-includes```不为空,则按照包含表的方式来执行; *
- *3如果dbswitch.source[i].source-includes为空则按照dbswitch.source[i].source-excludes排除表的方式来执行。*
- *3如果```dbswitch.source[i].source-includes```为空,则按照```dbswitch.source[i].source-excludes```排除表的方式来执行。 *
- *4如果dbswitch.target.target-drop=falsedbswitch.target.change-data-synch=true时会对有主键表启用增量变更方式同步*
- *4如果```dbswitch.target.target-drop=false``````dbswitch.target.change-data-synch=true```;时会对有主键表启用增量变更方式同步 *
- mysql/mariadb的驱动配置样例
- *5也支持配置文件名为```conf/config.yml```的YML格式配置文件样例如下*
```
dbswitch:
source:
# source database connection information
## support MySQL/MariaDB/DB2/DM/Kingbase8/Oracle/SQLServer/PostgreSQL/Greenplum
## support mutiple source database connection
- url: jdbc:oracle:thin:@172.17.2.10:1521:ORCL
driver-class-name: 'oracle.jdbc.driver.OracleDriver'
username: 'system'
password: '123456'
# source database configuration parameters
## fetch size for query source database
fetch-size: 10000
## schema name for query source database
source-schema: 'TANG'
## prefix of table name for target name
prefix-table: 'TA_'
## table name include from table lists
source-includes: ''
## table name exclude from table lists
source-excludes: ''
target:
# target database connection information
## Best support for Oracle/PostgreSQL/Greenplum/DM/Kingbase8
url: jdbc:postgresql://172.17.2.10:5432/test
driver-class-name: org.postgresql.Driver
username: tang
password: 123456
# target database configuration parameters
## schema name for create/insert table data
target-schema: public
## whether drop-create table when target table exist
target-drop: true
## whether create table support auto increment for primary key field
create-table-auto-increment: false
## whether use insert engine to write data for target database
## Only usefull for PostgreSQL/Greenplum database
writer-engine-insert: false
## whether use change data synchronize to target database table
change-data-synch: true
```
- *6各个数据库的JDBC驱动连接示例如下
**mysql/mariadb的驱动配置样例**
```
jdbc连接地址jdbc:mysql://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
jdbc驱动名称 com.mysql.cj.jdbc.Driver
```
与:
```
jdbc连接地址jdbc:mariadb://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
jdbc驱动名称 org.mariadb.jdbc.Driver
```
- oracle的驱动配置样例
**oracle的驱动配置样例**
```
jdbc连接地址jdbc:oracle:thin:@172.17.2.10:1521:ORCL
jdbc驱动名称oracle.jdbc.driver.OracleDriver
```
- SqlServer(>=2005)的驱动配置样例
**SqlServer(>=2005)的驱动配置样例**
```
jdbc连接地址jdbc:sqlserver://172.17.2.10:1433;DatabaseName=hqtest
jdbc驱动名称com.microsoft.sqlserver.jdbc.SQLServerDriver
```
- PostgreSQL的驱动配置样例
**PostgreSQL/Greenplum的驱动配置样例**
```
jdbc连接地址jdbc:postgresql://172.17.2.10:5432/study
jdbc驱动名称org.postgresql.Driver
```
- DB2的驱动配置样例
**DB2的驱动配置样例**
```
jdbc连接地址jdbc:db2://172.17.2.10:50000/testdb:driverType=4;fullyMaterializeLobData=true;fullyMaterializeInputStreams=true;progressiveStreaming=2;progresssiveLocators=2;
jdbc驱动名称com.ibm.db2.jcc.DB2Driver
```
- 达梦DM的驱动配置样例
**达梦DM的驱动配置样例**
```
jdbc连接地址jdbc:dm://172.17.2.10:5236
jdbc驱动名称dm.jdbc.driver.DmDriver
```
- 人大金仓Kingbase8的驱动配置样例
**人大金仓Kingbase8的驱动配置样例**
```
jdbc连接地址jdbc:kingbase8://172.17.2.10:54321/MYTEST
jdbc驱动名称com.kingbase8.Driver
```
- 翰高HighGo数据库(可按PostgreSQL使用)
**翰高HighGo数据库(可按PostgreSQL使用)**
```
jdbc连接地址jdbc:postgresql://172.17.2.10:5866/highgo
jdbc驱动名称org.postgresql.Driver