diff --git a/product/en/docs-mtk/v2.0/commands/mtk.md b/product/en/docs-mtk/v2.0/commands/mtk.md index a265f5dd6f99de0c179b9ee471ca20893f59d8d2..7224301a2362fea990d37da8ef17eb97385a2757 100644 --- a/product/en/docs-mtk/v2.0/commands/mtk.md +++ b/product/en/docs-mtk/v2.0/commands/mtk.md @@ -2,7 +2,7 @@ title: "mtk" summary: mtk author: mtk -date: 2023-09-18 +date: 2023-11-01 --- ## mtk @@ -22,8 +22,8 @@ mtk [flags] # init project ./mtk init-project -n ora2og -# Generate configuration file. -# edit connection information and migration objects (tables/schemas). +# Generate configuration file. +# edit connection information and migration objects (tables/schemas). # the directory definition does not need to be modified vi ora2og/config/mtk.json @@ -62,15 +62,15 @@ vi ora2og/config/mtk.json --batchSize int Specify the batch size to be used for bulk/copy insert. Valid values are 1-50000, default batch size is 1000 for MySQL,Oracle,openGauss,PostgreSQL. - --bufferSize int Specify the Buffer size in MB, to be used inserting or querying. + --bufferSize int Specify the Buffer size in MB, to be used inserting or querying. Valid value is from 1 to 1024, default Buffer size is 8 MB for postgres,openGauss,mysql. --caseSensitive int Object case parameters in SQL statements. - 1 - lower case - 2 - upper case + 1 - lower case + 2 - upper case 3 - Keep it the same as the source database. -c, --config string Set mtk config file. Support json,yaml. [env MTK_CONFIG] (default "mtk.json") - --cpBufferSize int Specify the Copy Buffer size in MB, to be used in the Copy Command. + --cpBufferSize int Specify the Copy Buffer size in MB, to be used in the Copy Command. Valid value is from 1 to 1024, default Copy Buffer Size is 8 MB for PostgreSQL,openGauss. --dataOnly the only Migrate table data @@ -98,13 +98,13 @@ vi ora2og/config/mtk.json --logDir string Set mtk run Http Service log dir [env MTK_LOG_DIR] --logfile string Set mtk log file. Default value is reportFile dir. --noTerminalReport The terminal does not print an overview of the migration report - -p, --parallel int Specify the parallelism. + -p, --parallel int Specify the parallelism. the degree of parallelism is now only useful when migrating table data and parallelism when creating an index. (default 1) - --path string Indicates the directory of a file to which data is to be exported. + --path string Indicates the directory of a file to which data is to be exported. Default value is config.target.parameter.path. If not configured, the system default value ./data Command Value > Config Value > MTK Default Value --preRun preRun check. - -r, --reportFile string Set mtk report file or dir. If it is a file, use the file directory. + -r, --reportFile string Set mtk report file or dir. If it is a file, use the file directory. Default value is ./report report directory format [./report/reportYYYYMMDDHHMISS] ./report/report20210101121314 --reportServer string reportServer [env MTK_REPORT_SERVER] @@ -112,15 +112,15 @@ vi ora2og/config/mtk.json --schemas string the Migrate schema,Separated by commas.(schema1,schema2,db1) --scn string Consistency point in time. For Oracle Flashback Query SCN --seqLastNumAddNum int The last value of the sequence is increased - --splitTabMethod string Define the split method. + --splitTabMethod string Define the split method. Option: rowid,mod,ora_hash,auto Oracle defaults to auto(sample,mod), other databases default to mod --splitTabSamplePercentage float Percentage sampled --splitTabSize int When the table size or partition size is larger than this value, the query task is split. Unit MB --splitTabTaskNum int The number of single-table/single-partition split tasks - --tableSkip stringArray Define table split. Can be specified multiple times. + --tableSkip stringArray Define table split. Can be specified multiple times. format schema.tableName --tableSkip MTK.TABLE01 --tableSkip MTK.TABLE02 - --tableSplit stringArray Define table split. Can be specified multiple times. + --tableSplit stringArray Define table split. Can be specified multiple times. format schema.tableName:where:where:where --tableSplit 'MTK.TABLE01: "ID">100 AND ID<=200: ID>200 AND ID<=300:ID>300' --tableSplit "MTK.TABLE02: \"ID\">100 AND ID<=200: ID>200 AND ID<=300:ID>300 AND COL1='1'" diff --git a/product/en/docs-mtk/v2.0/config/mtk-config.md b/product/en/docs-mtk/v2.0/config/mtk-config.md index 1e4819de28e9818cc08bcaba4cac206834007503..07fdbcc892a85e970fe289bafa01436e787a9326 100644 --- a/product/en/docs-mtk/v2.0/config/mtk-config.md +++ b/product/en/docs-mtk/v2.0/config/mtk-config.md @@ -2,7 +2,7 @@ title: MTK Configuration File Description summary: Configuration File Description author: mtk -date: 2023-09-18 10:34:09 +date: 2023-11-01 10:05:58 --- # MTK Configuration File Description @@ -113,8 +113,8 @@ Config "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, @@ -132,7 +132,8 @@ Config "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ], "schemas": [ "SCHEMA1", @@ -292,8 +293,8 @@ Target Database Config Example "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, @@ -326,7 +327,8 @@ Object Example "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ], "schemas": [ "SCHEMA1", @@ -886,8 +888,8 @@ Target Database Config Example "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, diff --git a/product/en/docs-mtk/v2.0/config/mtk-object.md b/product/en/docs-mtk/v2.0/config/mtk-object.md index a2e91fd215275ebd7dafa19aec5dca92a94c26a2..3e7f37c872a779c896805d4f253cdf3ec244a53a 100644 --- a/product/en/docs-mtk/v2.0/config/mtk-object.md +++ b/product/en/docs-mtk/v2.0/config/mtk-object.md @@ -2,7 +2,7 @@ title: MTK Object summary: MTK Object author: mtk -date: 2023-09-11 10:01:11 +date: 2023-11-01 10:05:58 --- # MTK Object @@ -45,7 +45,8 @@ Object Example "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ], "schemas": [ "SCHEMA1", @@ -87,6 +88,7 @@ configured with tables (`MTK.XXX`) is the `XXX` function under Migrating Schema |-----------------|---------------------| |schema_name.* |is equivalent to configuring schema under [schemas](#schemas)| |schema_name.table_name || +|schema_name.table_name:P01,P02 || |schema_name.object_name% || |schema_name.view_name |./mtk sync-view Migrates the view with the specified name under the schema| |schema_name.function_name |./mtk sync-function Migrates the function with the specified name under the schema| @@ -101,7 +103,8 @@ Tables Example "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ] } ``` diff --git a/product/en/docs-mtk/v2.0/config/mtk-parameter-data.md b/product/en/docs-mtk/v2.0/config/mtk-parameter-data.md index e1748c4150f0b8d5f021788d2b4da4984f2cf09d..ebddd57d0dd632f906dcf82244156a1136f6f423 100644 --- a/product/en/docs-mtk/v2.0/config/mtk-parameter-data.md +++ b/product/en/docs-mtk/v2.0/config/mtk-parameter-data.md @@ -2,7 +2,7 @@ title: MTK Parameter summary: MTK Parameter author: mtk -date: 2023-09-18 10:34:09 +date: 2023-11-01 10:05:58 --- # MTK Parameter @@ -228,3 +228,19 @@ Target ColumnName Data Process Example - true - false + +### enableEncodeValid + +**Type**: bool + +**Desc**: Check encoding legality. for varchar/char +Only the target database is openGauss/MogDB GBK/GB18030 character set + +**Default**: `false` + +**Option**: + +- true +- false + +**Add**: v2.9.5 diff --git a/product/en/docs-mtk/v2.0/config/mtk-parameter-overview.md b/product/en/docs-mtk/v2.0/config/mtk-parameter-overview.md index 3f2786ff68664addf5b06fd679c4e2c84050722e..3b40995c330085305e45d233028564e6043aa74c 100644 --- a/product/en/docs-mtk/v2.0/config/mtk-parameter-overview.md +++ b/product/en/docs-mtk/v2.0/config/mtk-parameter-overview.md @@ -2,7 +2,7 @@ title: MTK Parameter summary: MTK Parameter author: mtk -date: 2023-09-18 10:34:09 +date: 2023-11-01 10:05:58 --- # MTK Parameter @@ -62,6 +62,7 @@ Parameter configuration | [columnNameData](./mtk-parameter-data.md#columnnamedata) |map[string]string |data |Custom processing data conversion method. When the source configures this parameter, | | [enableConvEmptyStringToSpace](./mtk-parameter-data.md#enableconvemptystringtospace) |bool |data |For scenarios where there is an empty string for a non-null column, convert an empty string to a space | | [compatibleIlLegaLChars](./mtk-parameter-data.md#compatibleillegalchars) |bool |data |enable mogdb/openGauss copy option COMPATIBLE_ILLEGAL_CHARS | +| [enableEncodeValid](./mtk-parameter-data.md#enableencodevalid) |bool |data |Check encoding legality. for varchar/char | | [autoAddMySQLAutoIncr](./mtk-parameter-column.md#autoaddmysqlautoincr) |bool |column |Migrate to MySQL to automatically add MySQL `AUTO_INCREMENT` column. | | [autoAddMySQLAutoIncrTabList](./mtk-parameter-column.md#autoaddmysqlautoincrtablist) |[]string |column |Used with the `AutoAddMySQLAutoIncr` parameter. | | [ignoreNotSupportDefault](./mtk-parameter-column.md#ignorenotsupportdefault) |bool |column |Supports ignoring of some default values of some unsupported columns. For example, the `sys_guid`. | @@ -147,8 +148,8 @@ Appears in: "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, diff --git a/product/en/docs-mtk/v2.0/releases/release-2.9.md b/product/en/docs-mtk/v2.0/releases/release-2.9.md index 89bf9a860f81b7aa079c108aad5af04645536c7a..33137ec3e3dac3a1c5b1d4bba8784b8504869983 100644 --- a/product/en/docs-mtk/v2.0/releases/release-2.9.md +++ b/product/en/docs-mtk/v2.0/releases/release-2.9.md @@ -10,6 +10,52 @@ date: 2021-09-17 - mtk command line tool - mtkd mtk background service process. used for specific scenarios +## v2.9.5 + +2023-11-01 + +### MTK + +- [mtk_2.9.5_windows_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_windows_amd64.tar.gz) +- [mtk_2.9.5_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_linux_arm64.tar.gz) +- [mtk_2.9.5_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_linux_amd64.tar.gz) +- [mtk_2.9.5_darwin_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_darwin_amd64.tar.gz) +- [mtk_2.9.5_darwin_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_darwin_arm64.tar.gz) +- [mtk_2.9.5_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_linux_amd64_db2.tar.gz) +- [mtk_2.9.5_darwin_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_darwin_amd64_db2.tar.gz) +- [mtk_2.9.5_windows_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_windows_amd64_db2.tar.gz) +- [mtk_checksums.txt](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_checksums.txt) + +### MTKD + +- [mtkd_2.9.5_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtkd_2.9.5_linux_amd64.tar.gz) +- [mtkd_2.9.5_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtkd_2.9.5_linux_amd64_db2.tar.gz) +- [mtkd_2.9.5_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtkd_2.9.5_linux_arm64.tar.gz) + +### Bug Fixes + +- **DB2:** query partition seqno issue +- **Informix:** When the type is L, the column defaults null +- **MTKD:** optimized code diff and fix array issue +- **MTKD:** source.parameter columnNameData/columnTypeData issue +- **MTKD:** The error message is too long and affects the SQL statement +- **MogDB:** Query column default/extra issue +- **MogDB:** Rewrite Oracle `exp mod number` issue +- **MogDB:** create procedure not ignore already exists +- **MogDB:** Rewrite `sysdate@!` to `sysdate` +- **MogDB:** Rewrite `update return into for more column` issue +- **PLSQL:** Rewrite `insert into/* comment */ table alias select` issue +- **openGauss:** alter table set PARALLEL_WORKERS issue + +### Features + +- **MTK:** object table support partiotion name +- **MTKD:** change mediumblob to longblob +- **MogDB:** support db2 varchar for bit data +- **MogDB:** support Oracle date list partition +- **MogDB:** add parameter enableEncodeValid +- **MogDB:** For the target is MogBD, it automatically converts its own data according to the column type of the target database. + ## v2.9.4 2023-09-18 diff --git a/product/en/docs-mtk/v2.0/releases/release-notes.md b/product/en/docs-mtk/v2.0/releases/release-notes.md index bb721af50d2c776ef5c61ecada8a751b6505e6d5..98f679272e01d6856e4cf70d82e80728e386370f 100644 --- a/product/en/docs-mtk/v2.0/releases/release-notes.md +++ b/product/en/docs-mtk/v2.0/releases/release-notes.md @@ -12,6 +12,7 @@ date: 2021-09-13 ## 2.9 +- [2.9.5](./release-2.9.md#295) - [2.9.4](./release-2.9.md#294) - [2.9.3](./release-2.9.md#293) - [2.9.2](./release-2.9.md#292) @@ -33,19 +34,3 @@ date: 2021-09-13 - [2.7.2](./release-2.7.md#272) - [2.7.1](./release-2.7.md#271) - [2.7.0](./release-2.7.md#270) - -## 2.6 - -- [2.6.6](./release-2.6.md#266) -- [2.6.5](./release-2.6.md#265) -- [2.6.4](./release-2.6.md#264) -- [2.6.3](./release-2.6.md#263) -- [2.6.2](./release-2.6.md#262) -- [2.6.1](./release-2.6.md#261) -- [2.6.0](./release-2.6.md#260) - -## 2.5 - -- [2.5.2](./release-2.5.md#252) -- [2.5.1](./release-2.5.md#251) -- [2.5.0](./release-2.5.md#250) diff --git a/product/zh/docs-mtk/v2.0/commands/mtk.md b/product/zh/docs-mtk/v2.0/commands/mtk.md index a265f5dd6f99de0c179b9ee471ca20893f59d8d2..afa6988d136252c6a59c35c0c23d166298c51676 100644 --- a/product/zh/docs-mtk/v2.0/commands/mtk.md +++ b/product/zh/docs-mtk/v2.0/commands/mtk.md @@ -2,15 +2,15 @@ title: "mtk" summary: mtk author: mtk -date: 2023-09-18 +date: 2023-11-01 --- ## mtk -Database Migration Toolkit +数据库迁移工具 ### Synopsis -The MTK(Database Migration Toolkit) helps you migrate your database +MTK(数据库迁移工具)用于帮助您迁移数据库 ```bash mtk [flags] @@ -22,8 +22,8 @@ mtk [flags] # init project ./mtk init-project -n ora2og -# Generate configuration file. -# edit connection information and migration objects (tables/schemas). +# Generate configuration file. +# edit connection information and migration objects (tables/schemas). # the directory definition does not need to be modified vi ora2og/config/mtk.json @@ -59,130 +59,128 @@ vi ora2og/config/mtk.json ### Options ```bash - --batchSize int Specify the batch size to be used for bulk/copy insert. - Valid values are 1-50000, default batch size is 1000 - for MySQL,Oracle,openGauss,PostgreSQL. - --bufferSize int Specify the Buffer size in MB, to be used inserting or querying. - Valid value is from 1 to 1024, default Buffer size is 8 MB + --batchSize int 指定批量插入或Copy条数大小. + 有效值为 1-50000, 默认大小为 1000 + 支持Oracle、PostgreSQL、openGauss、MySQL. + --bufferSize int 指定批量插入、Copy缓存大小. + 有效值为1-1024,默认为8 MB for postgres,openGauss,mysql. - --caseSensitive int Object case parameters in SQL statements. - 1 - lower case - 2 - upper case - 3 - Keep it the same as the source database. - -c, --config string Set mtk config file. Support json,yaml. [env MTK_CONFIG] (default "mtk.json") - --cpBufferSize int Specify the Copy Buffer size in MB, to be used in the Copy Command. - Valid value is from 1 to 1024, default Copy Buffer Size is 8 MB - for PostgreSQL,openGauss. - --dataOnly the only Migrate table data - -d, --debug Set the debug mode. - Not necessary for the normal usage. [env MTK_DEBUG] - --disableCollStatistics disable Collect table statistics. - --disableFKCons Disable table foreign key sync - --disableIgnoreCase Disable ignoring case queries - --disableSelectPart Disable the select by partition - --disableTableDataComp disable table select count compare. - --enableSyncCompTabPro Enable Synchronize table compressed properties - -e, --exclude strings Exclude specific object types. + --caseSensitive int SQL语句中的对象大小写参数. + 1 - 小写 + 2 - 大写 + 3 - 保持与源数据库相同. + -c, --config string 设置MTK配置文件。支持json、yaml格式. [env MTK_CONFIG] (default "mtk.json") + --cpBufferSize int 定义Copy命令中使用的缓存大小(以MB为单位). + 有效值为1-1024,默认批量大小为8 MB + for Postgres,openGauss. + --dataOnly 仅迁移表数据 + -d, --debug 设置调试模式. + 正常使用不需要此选项. [env MTK_DEBUG] + --disableCollStatistics 禁用采集统计信息. + --disableFKCons 禁用表外键约束同步 + --disableIgnoreCase 禁用查询忽略大小写 + --disableSelectPart 禁言分区并行查询 + --disableTableDataComp 禁用统计表行数对比. + --enableSyncCompTabPro 启用同步表压缩属性 + -e, --exclude strings 排除特定对象类型. For example, exclude=sequence,table - --fetchSize int Specify fetch size in terms of number of rows should be fetched in result set at a time. - Valid values are 1-50000, default fetch size is 1000 + --fetchSize int 指定一次行提取行数大小 + 有效值为 1-50000, 默认大小为 1000 for Oracle. - --file export to file - --fileType string Indicates the type of a file when data is to be exported to a file. - support csv,sql + --file 导出成文件 + --fileType string 指定导出的文件类型。 + 支持csv、sql -h, --help help for mtk - --httpAddr string Set mtk run Http Service Address [env MTK_HTTP_ADDR] + --httpAddr string 设置MTK运行的Http服务端口 [env MTK_HTTP_ADDR] --license string Specify the license file - --limit int Define how many rows of data to migrate. - Specify that test does not specify that this parameter defaults to 10000 - --logDir string Set mtk run Http Service log dir [env MTK_LOG_DIR] - --logfile string Set mtk log file. Default value is reportFile dir. - --noTerminalReport The terminal does not print an overview of the migration report - -p, --parallel int Specify the parallelism. - the degree of parallelism is now only useful when migrating table data and parallelism when creating an index. (default 1) - --path string Indicates the directory of a file to which data is to be exported. - Default value is config.target.parameter.path. If not configured, the system default value ./data - Command Value > Config Value > MTK Default Value - --preRun preRun check. - -r, --reportFile string Set mtk report file or dir. If it is a file, use the file directory. - Default value is ./report - report directory format [./report/reportYYYYMMDDHHMISS] ./report/report20210101121314 - --reportServer string reportServer [env MTK_REPORT_SERVER] - --schemaOnly the only Migrate schema ddl - --schemas string the Migrate schema,Separated by commas.(schema1,schema2,db1) - --scn string Consistency point in time. For Oracle Flashback Query SCN - --seqLastNumAddNum int The last value of the sequence is increased - --splitTabMethod string Define the split method. - Option: rowid,mod,ora_hash,auto - Oracle defaults to auto(sample,mod), other databases default to mod - --splitTabSamplePercentage float Percentage sampled - --splitTabSize int When the table size or partition size is larger than this value, the query task is split. Unit MB - --splitTabTaskNum int The number of single-table/single-partition split tasks - --tableSkip stringArray Define table split. Can be specified multiple times. + --limit int 指定迁移每张表多少行数据。如果指定--test参数则参数默认值为10000 + --logDir string 设置MTK运行的Http服务日志目录 [env MTK_LOG_DIR] + --logfile string 设置MTK日志文件。默认值为reportFile目录. + --noTerminalReport 终端不打印迁移报告概览 + -p, --parallel int 指定并行度. + 并行度目前仅在并行迁移表数据和创建索引时有用. (default 1) + --path string 指定要导出数据的文件的目录。 + 默认值为 config.target.parameter.path。如果不配置,系统默认值./data + 命令值 > 配置值 > MTK 默认值 + --preRun 预运行. + -r, --reportFile string 设置 mtk 报告文件或目录。如果是文件,则使用文件目录。 + 默认值为 ./report + 报告目录格式 [./report/reportYYYYMMDDHHMISS] ./report/report20210101121314 + --reportServer string 指定报告服务器 [env MTK_REPORT_SERVER] + --schemaOnly 仅迁移模式DDL + --schemas string 迁移模式, 以逗号分隔. (schema1,schema2,db1) + --scn string 数据一致性点. 如Oracle SCN + --seqLastNumAddNum int 指定序列最后值统一增加多少 + --splitTabMethod string 指定拆分方式. + 选项: rowid,mod,ora_hash + Oracle 默认为 auto(sample,mod), 其他数据默认 mod + --splitTabSamplePercentage float 采样百分比 + --splitTabSize int 配置当单个表/单个分区大于此值后进行任务拆分并发执行 + --splitTabTaskNum int 配置单个表/单个分区拆分多少个任务执行 + --tableSkip stringArray 指定表拆分条件,允许指定多少. format schema.tableName --tableSkip MTK.TABLE01 --tableSkip MTK.TABLE02 - --tableSplit stringArray Define table split. Can be specified multiple times. + --tableSplit stringArray 指定表拆分条件,允许指定多少. format schema.tableName:where:where:where --tableSplit 'MTK.TABLE01: "ID">100 AND ID<=200: ID>200 AND ID<=300:ID>300' --tableSplit "MTK.TABLE02: \"ID\">100 AND ID<=200: ID>200 AND ID<=300:ID>300 AND COL1='1'" - --tables string the Migrate tables,Separated by commas.(tab1,schema1.tab1) - --test Whether to carry out migration testing, with the parameter limit migration part of the data. - Test migration data is not commit, just testing whether the data is inserted properly + --tables string 迁移表, 以逗号分隔. (tab1,schema1.tab1) + --test 指定MTK是否运行测试模式. 测试模式下每张表只迁移参数limit指定的行数. 测试模式数据不进行提交 -v, --version MTK Version ``` ### SEE ALSO -* [mtk init-project](./mtk_init-project.md) - Initialise a typical mtk project tree. Top directory will be created under project base dir. -* [mtk config-check](./mtk_config-check.md) - check configuration file has errors -* [mtk config-gen](./mtk_config-gen.md) - Interactively generate configuration files -* [mtk gen](./mtk_gen.md) - gen command docs, shell autocompletion script -* [mtk license](./mtk_license.md) - manage license -* [mtk mig-tab-pre](./mtk_mig-tab-pre.md) - mig database object Schema,Sequence,ObjectType,Domain,Queue,Wrapper,Server,UserMapping,Table,NickName,Rule -* [mtk mig-tab-data](./mtk_mig-tab-data.md) - mig database object TableData,TableDataEstimate,CheckTableData -* [mtk mig-tab-post](./mtk_mig-tab-post.md) - mig database object Index,Constraint,AlterSequence,TableDataCom,CollStatistics -* [mtk mig-tab-other](./mtk_mig-tab-other.md) - mig database object DBLink,View,MaterializedView,Function,Procedure,Package,Trigger,Synonym -* [mtk mig-select](./mtk_mig-select.md) - migrate custom query statements to csv or target table -* [mtk mig-selects](./mtk_mig-selects.md) - migrate custom query statements to csv or target table -* [mtk show-schema](./mtk_show-schema.md) - Show Source Database schema. -* [mtk show-db-info](./mtk_show-db-info.md) - show database Information. -* [mtk show-type](./mtk_show-type.md) - show support database type. -* [mtk show-table](./mtk_show-table.md) - display size of the top n table to be migrated -* [mtk show-table-split](./mtk_show-table-split.md) - split large tables in parallel according to user defined parallelism -* [mtk show-support-db](./mtk_show-support-db.md) - show support database version. -* [mtk show-table-data-estimate](./mtk_show-table-data-estimate.md) - estimate table data migration time. -* [mtk report](./mtk_report.md) - Convert mtk report file to sql script. -* [mtk sync-schema](./mtk_sync-schema.md) - sync schema. -* [mtk sync-object-type](./mtk_sync-object-type.md) - sync object-type. -* [mtk sync-domain](./mtk_sync-domain.md) - sync domain. -* [mtk sync-sequence](./mtk_sync-sequence.md) - sync sequence. -* [mtk sync-queue](./mtk_sync-queue.md) - sync queue. -* [mtk sync-wrapper](./mtk_sync-wrapper.md) - sync db2 wrapper. -* [mtk sync-server](./mtk_sync-server.md) - sync db2 server. -* [mtk sync-user-mapping](./mtk_sync-user-mapping.md) - sync db2 user mapping. -* [mtk sync-table](./mtk_sync-table.md) - sync table. -* [mtk sync-nickname](./mtk_sync-nickname.md) - sync db2 nickname. -* [mtk sync-table-data](./mtk_sync-table-data.md) - sync table data. -* [mtk sync-table-data-estimate](./mtk_sync-table-data-estimate.md) - estimate table data migration time. -* [mtk sync-index](./mtk_sync-index.md) - sync index. -* [mtk sync-constraint](./mtk_sync-constraint.md) - sync constraint. -* [mtk sync-view](./mtk_sync-view.md) - sync view. -* [mtk sync-mview](./mtk_sync-mview.md) - sync materialized view. -* [mtk sync-trigger](./mtk_sync-trigger.md) - sync trigger. -* [mtk sync-procedure](./mtk_sync-procedure.md) - sync procedure. -* [mtk sync-function](./mtk_sync-function.md) - sync function. -* [mtk sync-package](./mtk_sync-package.md) - sync package. -* [mtk sync-synonym](./mtk_sync-synonym.md) - sync synonym. -* [mtk sync-db-link](./mtk_sync-db-link.md) - sync db link. -* [mtk sync-rule](./mtk_sync-rule.md) - sync rule. -* [mtk sync-table-data-com](./mtk_sync-table-data-com.md) - table rows count comparison. -* [mtk sync-alter-sequence](./mtk_sync-alter-sequence.md) - modify sequence start value. -* [mtk sync-coll-statistics](./mtk_sync-coll-statistics.md) - collect table statistics. -* [mtk check-table-data](./mtk_check-table-data.md) - Check the table data for exception data -* [mtk show-drop-index](./mtk_show-drop-index.md) - generate drop index sql -* [mtk show-drop-cons](./mtk_show-drop-cons.md) - generate drop constraint sql +* [mtk init-project](./mtk_init-project.md) - 初始化 mtk 项目目录。目录将在当前目录下创建。 +* [mtk config-check](./mtk_config-check.md) - 检查配置文件是否有误 +* [mtk config-gen](./mtk_config-gen.md) - 交互式生成配置文件 +* [mtk gen](./mtk_gen.md) - 生成命令行文档,shell自动补全脚本 +* [mtk license](./mtk_license.md) - 管理许可证 +* [mtk mig-tab-pre](./mtk_mig-tab-pre.md) - 迁移数据库对象 Schema,Sequence,ObjectType,Domain,Queue,Wrapper,Server,UserMapping,Table,NickName,Rule +* [mtk mig-tab-data](./mtk_mig-tab-data.md) - 迁移数据库对象 TableData,TableDataEstimate,CheckTableData +* [mtk mig-tab-post](./mtk_mig-tab-post.md) - 迁移数据库对象 Index,Constraint,AlterSequence,TableDataCom,CollStatistics +* [mtk mig-tab-other](./mtk_mig-tab-other.md) - 迁移数据库对象 DBLink,View,MaterializedView,Function,Procedure,Package,Trigger,Synonym +* [mtk mig-select](./mtk_mig-select.md) - 迁移自定义查询语句到csv文件或目标表 +* [mtk mig-selects](./mtk_mig-selects.md) - 迁移自定义查询语句到csv文件或目标表 +* [mtk show-schema](./mtk_show-schema.md) - 查看源数据库方案. +* [mtk show-db-info](./mtk_show-db-info.md) - 查看数据库基本信息. +* [mtk show-type](./mtk_show-type.md) - 查看支持数据类型. +* [mtk show-table](./mtk_show-table.md) - 查看Top n 表大小 +* [mtk show-table-split](./mtk_show-table-split.md) - 根据用户定义的并行度,并行拆分大表 +* [mtk show-support-db](./mtk_show-support-db.md) - 查看支持数据库版本. +* [mtk show-table-data-estimate](./mtk_show-table-data-estimate.md) - 预估表数据迁移时间. +* [mtk report](./mtk_report.md) - 转换MTK报告成sql脚本. +* [mtk sync-schema](./mtk_sync-schema.md) - 迁移方案. +* [mtk sync-object-type](./mtk_sync-object-type.md) - 迁移对象类型. +* [mtk sync-domain](./mtk_sync-domain.md) - 迁移域. +* [mtk sync-sequence](./mtk_sync-sequence.md) - 迁移序列. +* [mtk sync-queue](./mtk_sync-queue.md) - 迁移队列表. +* [mtk sync-wrapper](./mtk_sync-wrapper.md) - 迁移DB2 Wrapper. +* [mtk sync-server](./mtk_sync-server.md) - 迁移DB2 Server. +* [mtk sync-user-mapping](./mtk_sync-user-mapping.md) - 迁移DB2 User Mapping. +* [mtk sync-table](./mtk_sync-table.md) - 迁移表. +* [mtk sync-nickname](./mtk_sync-nickname.md) - 迁移DB2 Nickname. +* [mtk sync-table-data](./mtk_sync-table-data.md) - 迁移表数据. +* [mtk sync-table-data-estimate](./mtk_sync-table-data-estimate.md) - 预估表数据迁移时间. +* [mtk sync-index](./mtk_sync-index.md) - 迁移索引. +* [mtk sync-constraint](./mtk_sync-constraint.md) - 迁移约束. +* [mtk sync-view](./mtk_sync-view.md) - 迁移视图. +* [mtk sync-mview](./mtk_sync-mview.md) - 迁移物化视图. +* [mtk sync-trigger](./mtk_sync-trigger.md) - 迁移触发器. +* [mtk sync-procedure](./mtk_sync-procedure.md) - 迁移存储过程. +* [mtk sync-function](./mtk_sync-function.md) - 迁移函数. +* [mtk sync-package](./mtk_sync-package.md) - 迁移包. +* [mtk sync-synonym](./mtk_sync-synonym.md) - 迁移同义词. +* [mtk sync-db-link](./mtk_sync-db-link.md) - 迁移数据库链接. +* [mtk sync-rule](./mtk_sync-rule.md) - 迁移规则. +* [mtk sync-table-data-com](./mtk_sync-table-data-com.md) - 统计表行数对比. +* [mtk sync-alter-sequence](./mtk_sync-alter-sequence.md) - 修改序列下一个值. +* [mtk sync-coll-statistics](./mtk_sync-coll-statistics.md) - 采集统计信息. +* [mtk check-table-data](./mtk_check-table-data.md) - 检查表数据是否存在异常数据 +* [mtk show-drop-index](./mtk_show-drop-index.md) - 生成删除索引语句 +* [mtk show-drop-cons](./mtk_show-drop-cons.md) - 生成删除约束语句 * [mtk version](./mtk_version.md) - mtk version -* [mtk encrypt](./mtk_encrypt.md) - Provides a convenient way to encrypt your text/password -* [mtk convert-plsql](./mtk_convert-plsql.md) - Convert PLSQL Statements -* [mtk self](./mtk_self.md) - Modify the mtk installation -* [mtk mvd](./mtk_mvd.md) - Run the MVD for data verification -* [mtk usql](./mtk_usql.md) - The universal command-line interface for SQL databases +* [mtk encrypt](./mtk_encrypt.md) - 提供一种方便的方式来加密您的文本/密码 +* [mtk convert-plsql](./mtk_convert-plsql.md) - 转换PLSQL语句 +* [mtk self](./mtk_self.md) - MTK本身管理 +* [mtk mvd](./mtk_mvd.md) - 运行MVD进行数据校验 +* [mtk usql](./mtk_usql.md) - SQL数据库的通用命令行接口 diff --git a/product/zh/docs-mtk/v2.0/config/mtk-config.md b/product/zh/docs-mtk/v2.0/config/mtk-config.md index d258ced50017353d8091fc39e9a493b36830e9a0..4924d44dcebf4245c8f7930d7073af3e8d28055d 100644 --- a/product/zh/docs-mtk/v2.0/config/mtk-config.md +++ b/product/zh/docs-mtk/v2.0/config/mtk-config.md @@ -2,7 +2,7 @@ title: MTK Configuration File Description summary: Configuration File Description author: mtk -date: 2023-09-18 10:27:14 +date: 2023-11-01 10:06:15 --- # MTK Configuration File Description @@ -113,8 +113,8 @@ date: 2023-09-18 10:27:14 "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, @@ -132,7 +132,8 @@ date: 2023-09-18 10:27:14 "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ], "schemas": [ "SCHEMA1", @@ -292,8 +293,8 @@ Target Database Config Example "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, @@ -326,7 +327,8 @@ Object Example "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ], "schemas": [ "SCHEMA1", @@ -881,8 +883,8 @@ Target Database Config Example "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, diff --git a/product/zh/docs-mtk/v2.0/config/mtk-object.md b/product/zh/docs-mtk/v2.0/config/mtk-object.md index 6b73be1089bc0895271a99adcb2b6c30ab639758..e3df36b83e1c761b7e49102494bc06782a6820ff 100644 --- a/product/zh/docs-mtk/v2.0/config/mtk-object.md +++ b/product/zh/docs-mtk/v2.0/config/mtk-object.md @@ -2,7 +2,7 @@ title: MTK Object summary: MTK Object author: mtk -date: 2023-09-11 10:00:55 +date: 2023-11-01 10:06:16 --- # MTK Object @@ -45,7 +45,8 @@ Object Example "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ], "schemas": [ "SCHEMA1", @@ -86,6 +87,7 @@ Object Example |----------------|--------------------| |schema_name.* |is equivalent to configuring schema under [schemas](#schemas)| |schema_name.table_name || +|schema_name.table_name:P01,P02 || |schema_name.object_name% || |schema_name.view_name |./mtk sync-view Migrates the view with the specified name under the schema| |schema_name.function_name |./mtk sync-function Migrates the function with the specified name under the schema| @@ -100,7 +102,8 @@ Tables Example "tables": [ "MTK.TAB1", "MTK.TAB111%", - "MTK1.*" + "MTK1.*", + "MTK1.TAB_PART:P1,P2" ] } ``` diff --git a/product/zh/docs-mtk/v2.0/config/mtk-parameter-data.md b/product/zh/docs-mtk/v2.0/config/mtk-parameter-data.md index e64959b8fb82eb35de96c75733548f3600c4948c..a76c4677ad0e6fc6d76b2585f9823cfc07e55f24 100644 --- a/product/zh/docs-mtk/v2.0/config/mtk-parameter-data.md +++ b/product/zh/docs-mtk/v2.0/config/mtk-parameter-data.md @@ -2,7 +2,7 @@ title: MTK Parameter summary: MTK Parameter author: mtk -date: 2023-09-18 10:27:14 +date: 2023-11-01 10:06:16 --- # MTK Parameter @@ -218,3 +218,18 @@ Target ColumnName Data Process Example - true - false + +### enableEncodeValid + +**类型**: bool + +**描述**: 检查编码有效性.只支持目标数据库为openGauss/MogDB并且字符集为GBK/GB18030下的char/varchar类型 + +**默认值**: `false` + +**可选值**: + +- true +- false + +**新增于**: v2.9.5 diff --git a/product/zh/docs-mtk/v2.0/config/mtk-parameter-overview.md b/product/zh/docs-mtk/v2.0/config/mtk-parameter-overview.md index 52c39d9cea753c1f0e6a41e0423153f585cab6c3..75ad7542b47d7064bb23fc66f1f262294b6c513e 100644 --- a/product/zh/docs-mtk/v2.0/config/mtk-parameter-overview.md +++ b/product/zh/docs-mtk/v2.0/config/mtk-parameter-overview.md @@ -2,7 +2,7 @@ title: MTK Parameter summary: MTK Parameter author: mtk -date: 2023-09-18 10:27:14 +date: 2023-11-01 10:06:16 --- # MTK Parameter @@ -62,6 +62,7 @@ date: 2023-09-18 10:27:14 | [columnNameData](./mtk-parameter-data.md#columnnamedata) |map[string]string |data |自定义处理数据转换方法. 源配置此参数时生成SELECT语句使用,目标配置此参数时在生成INSERT/COPY使用. | | [enableConvEmptyStringToSpace](./mtk-parameter-data.md#enableconvemptystringtospace) |bool |data |针对非空列存在空字符串场景,转换空字符串为空格 | | [compatibleIlLegaLChars](./mtk-parameter-data.md#compatibleillegalchars) |bool |data |启用mogdb/openGauss copy 选项 COMPATIBLE_ILLEGAL_CHARS | +| [enableEncodeValid](./mtk-parameter-data.md#enableencodevalid) |bool |data |检查编码有效性.只支持目标数据库为openGauss/MogDB并且字符集为GBK/GB18030下的char/varchar类型 | | [autoAddMySQLAutoIncr](./mtk-parameter-column.md#autoaddmysqlautoincr) |bool |column |迁移到MySQL自动添加MySQL `AUTO_INCREMENT` 列 | | [autoAddMySQLAutoIncrTabList](./mtk-parameter-column.md#autoaddmysqlautoincrtablist) |[]string |column |配合`autoAddMySQLAutoIncr`参数使用. | | [ignoreNotSupportDefault](./mtk-parameter-column.md#ignorenotsupportdefault) |bool |column |支持忽略部分不支持列默认值.如Oracle的`sys_guid`。MTK会内嵌白名单进行忽略。 | @@ -147,8 +148,8 @@ Appears in: "seqLastNumAddNum": 0, "skipColumnType": {}, "skipColumnName": {}, - "columnTypeData": null, - "columnNameData": null, + "columnTypeData": {}, + "columnNameData": {}, "templateSeqName": "", "charAppendEmptyString": false, "tableOptions": {}, diff --git a/product/zh/docs-mtk/v2.0/releases/release-2.9.md b/product/zh/docs-mtk/v2.0/releases/release-2.9.md index 46e5ec055c9b9b1b3439e2bb770e77c63191333e..ca98de60b97952ecf13f7bc43a41c9a763134ab1 100644 --- a/product/zh/docs-mtk/v2.0/releases/release-2.9.md +++ b/product/zh/docs-mtk/v2.0/releases/release-2.9.md @@ -10,6 +10,52 @@ date: 2021-09-17 - mtk 命令行工具 - mtkd 封装mtk作为后端服务程序,针对特定场景 +## v2.9.5 + +2023-11-01 + +### MTK + +- [mtk_2.9.5_windows_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_windows_amd64.tar.gz) +- [mtk_2.9.5_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_linux_arm64.tar.gz) +- [mtk_2.9.5_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_linux_amd64.tar.gz) +- [mtk_2.9.5_darwin_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_darwin_amd64.tar.gz) +- [mtk_2.9.5_darwin_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_darwin_arm64.tar.gz) +- [mtk_2.9.5_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_linux_amd64_db2.tar.gz) +- [mtk_2.9.5_darwin_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_darwin_amd64_db2.tar.gz) +- [mtk_2.9.5_windows_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_2.9.5_windows_amd64_db2.tar.gz) +- [mtk_checksums.txt](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtk_checksums.txt) + +### MTKD + +- [mtkd_2.9.5_linux_amd64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtkd_2.9.5_linux_amd64.tar.gz) +- [mtkd_2.9.5_linux_amd64_db2.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtkd_2.9.5_linux_amd64_db2.tar.gz) +- [mtkd_2.9.5_linux_arm64.tar.gz](https://cdn-mogdb.enmotech.com/mtk/v2.9.5/mtkd_2.9.5_linux_arm64.tar.gz) + +### Bug Fixes + +- **DB2:** 查询分区序号问题 +- **Informix:** 列类型为L列默认值为NULL问题 +- **MTKD:** 优化代码对比等功能 +- **MTKD:** 源参数 columnNameData/columnTypeData 保存问题 +- **MTKD:** 错误信息太差影响查看SQL问题 +- **MogDB:** 查询列默认值/extra问题 +- **MogDB:** 改写 Oracle `exp mod number` 问题 +- **MogDB:** 创建存储过程没有忽略已存在场景 +- **MogDB:** 改写 Oracle `sysdate@!` to `sysdate` +- **MogDB:** 改写 `update return into for more column` 问题 +- **PLSQL:** 改写 `insert into/* comment */ table alias select` issue +- **openGauss:** alter table set PARALLEL_WORKERS issue + +### Features + +- **MTK:** object table support partiotion name +- **MTKD:** change mediumblob to longblob +- **MogDB:** support db2 varchar for bit data +- **MogDB:** support Oracle date list partition +- **MogDB:** add parameter enableEncodeValid +- **MogDB:** For the target is MogBD, it automatically converts its own data according to the column type of the target database. + ## v2.9.4 2023-09-18 diff --git a/product/zh/docs-mtk/v2.0/releases/release-notes.md b/product/zh/docs-mtk/v2.0/releases/release-notes.md index ce4001a90b98e4497b7c2a0ec0d49fbb9bc19fd2..fa3c91790be2fc0728323393c332a53b5588689d 100644 --- a/product/zh/docs-mtk/v2.0/releases/release-notes.md +++ b/product/zh/docs-mtk/v2.0/releases/release-notes.md @@ -12,6 +12,7 @@ date: 2021-09-17 ## 2.9 +- [2.9.5](./release-2.9.md#295) - [2.9.4](./release-2.9.md#294) - [2.9.3](./release-2.9.md#293) - [2.9.2](./release-2.9.md#292) @@ -33,19 +34,3 @@ date: 2021-09-17 - [2.7.2](./release-2.7.md#272) - [2.7.1](./release-2.7.md#271) - [2.7.0](./release-2.7.md#270) - -## 2.6 - -- [2.6.6](./release-2.6.md#266) -- [2.6.5](./release-2.6.md#265) -- [2.6.4](./release-2.6.md#264) -- [2.6.3](./release-2.6.md#263) -- [2.6.2](./release-2.6.md#262) -- [2.6.1](./release-2.6.md#261) -- [2.6.0](./release-2.6.md#260) - -## 2.5 - -- [2.5.2](./release-2.5.md#252) -- [2.5.1](./release-2.5.md#251) -- [2.5.0](./release-2.5.md#250)