From 9d0b15eaad7a76eeb78e09730cf24e013af6d53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=AA=E6=97=A5=E5=8D=8E?= Date: Thu, 9 Jun 2022 15:07:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update(mvd):=20=E7=A7=BB=E9=99=A43.0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BB=A5=E5=89=8D=E7=9A=84=E5=90=84=E4=B8=AA?= =?UTF-8?q?=E7=89=88=E6=9C=ACMVD=E4=B8=8B=E8=BD=BD=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- product/en/docs-mvd/v2.0/release-notes.md | 22 ----------------- product/en/docs-mvd/v2.4/release-notes.md | 30 ----------------------- product/zh/docs-mvd/v2.0/release-notes.md | 22 ----------------- product/zh/docs-mvd/v2.4/release-notes.md | 30 ----------------------- 4 files changed, 104 deletions(-) diff --git a/product/en/docs-mvd/v2.0/release-notes.md b/product/en/docs-mvd/v2.0/release-notes.md index f8f9805d..701f51a6 100644 --- a/product/en/docs-mvd/v2.0/release-notes.md +++ b/product/en/docs-mvd/v2.0/release-notes.md @@ -9,10 +9,6 @@ date: 2021-08-30 ## v2.3.2 (2021-11-08) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_macos_x86_64) - ### Bugfix - Resolve the table constraint comparison error in MySQL earlier than 8.0. Therefore, MySQL 5.5, 5.7, and 8.0 are supported. @@ -20,10 +16,6 @@ date: 2021-08-30 ## v2.3.1 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_macos_x86_64) - ### Bugfix - Resolve the error that the program is abnormal because the return value of the driver is **str/byte** for the MySQL query field type in some versions. @@ -31,22 +23,8 @@ date: 2021-08-30 ## v2.3.0 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_macos_x86_64) - ### Feature - Support the sha256 authentication method for openGauss/MogDB in Linux. ## v2.2.14 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_macos_x86_64) - -## v2.1.1 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_macos_x86_64) diff --git a/product/en/docs-mvd/v2.4/release-notes.md b/product/en/docs-mvd/v2.4/release-notes.md index f219a90d..b952128a 100644 --- a/product/en/docs-mvd/v2.4/release-notes.md +++ b/product/en/docs-mvd/v2.4/release-notes.md @@ -9,10 +9,6 @@ date: 2021-08-30 ## v2.4.8 (2022-04-22) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.8/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.8/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.8/mvd_macos_x86_64) - ### Feature - When comparing objects, MogDB adds Package objects (2.1 and later versions) and SYNONYM objects comparison @@ -37,10 +33,6 @@ date: 2021-08-30 ## v2.4.0 (2021-12-20) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.0/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.0/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.0/mvd_macos_x86_64) - ### Feature - Add the category option (-C/--catagory): supports object structure comparison only and data comparison only. @@ -60,10 +52,6 @@ date: 2021-08-30 ## v2.3.2 (2021-11-08) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_macos_x86_64) - ### Bugfix - Resolve the table constraint comparison error in MySQL earlier than 8.0. Therefore, MySQL 5.5, 5.7, and 8.0 are supported. @@ -71,10 +59,6 @@ date: 2021-08-30 ## v2.3.1 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_macos_x86_64) - ### Bugfix - Resolve the error that the program is abnormal because the return value of the driver is **str/byte** for the MySQL query field type in some versions. @@ -82,22 +66,8 @@ date: 2021-08-30 ## v2.3.0 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_macos_x86_64) - ### Feature - Support the sha256 authentication method for openGauss/MogDB in Linux. ## v2.2.14 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_macos_x86_64) - -## v2.1.1 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_macos_x86_64) diff --git a/product/zh/docs-mvd/v2.0/release-notes.md b/product/zh/docs-mvd/v2.0/release-notes.md index 45252ed1..3002fb7b 100644 --- a/product/zh/docs-mvd/v2.0/release-notes.md +++ b/product/zh/docs-mvd/v2.0/release-notes.md @@ -2,10 +2,6 @@ ## v2.3.2 (2021-11-08) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_macos_x86_64) - ### 问题修复 - 修复低版本 MySQL(<8.0) 时表约束对比错误,支持 MySQL 5.5, 5.7, 8.0 @@ -13,10 +9,6 @@ ## v2.3.1 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_macos_x86_64) - ### 问题修复 - 修复部分版本下 MySQL 查询字段类型,驱动返回值是 str/byte 导致的程序异常 @@ -24,22 +16,8 @@ ## v2.3.0 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_macos_x86_64) - ### Feature - 支持 Linux 平台下 openGauss/MogDB 中的 sha256 加密认证方式 ## v2.2.14 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_macos_x86_64) - -## v2.1.1 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_macos_x86_64) diff --git a/product/zh/docs-mvd/v2.4/release-notes.md b/product/zh/docs-mvd/v2.4/release-notes.md index 22486ac9..7fc53f6a 100644 --- a/product/zh/docs-mvd/v2.4/release-notes.md +++ b/product/zh/docs-mvd/v2.4/release-notes.md @@ -9,10 +9,6 @@ date: 2021-08-30 ## v2.4.8 (2022-04-22) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.8/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.8/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.8/mvd_macos_x86_64) - ### 新增功能 - 对象对比时,MogDB 库增加 Package 对象(2.1及以后版本),以及 SYNONYM 对象的对比 @@ -37,10 +33,6 @@ date: 2021-08-30 ## v2.4.0 (2021-12-20) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.0/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.0/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.4.0/mvd_macos_x86_64) - ### 新增功能 - 增加对比类别选项 (-C/--catagory): 提供单独对比对象结构,以及单独对比数据的功能 @@ -60,10 +52,6 @@ date: 2021-08-30 ## v2.3.2 (2021-11-08) -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v2.3.2/mvd_macos_x86_64) - ### 问题修复 - 修复低版本 MySQL(<8.0) 时表约束对比错误,支持 MySQL 5.5, 5.7, 8.0 @@ -71,10 +59,6 @@ date: 2021-08-30 ## v2.3.1 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.1/mvd_macos_x86_64) - ### 问题修复 - 修复部分版本下 MySQL 查询字段类型,驱动返回值是 str/byte 导致的程序异常 @@ -82,22 +66,8 @@ date: 2021-08-30 ## v2.3.0 -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.3.0/mvd_macos_x86_64) - ### Feature - 支持 Linux 平台下 openGauss/MogDB 中的 sha256 加密认证方式 ## v2.2.14 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.2.14/mvd_macos_x86_64) - -## v2.1.1 - -- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_arm64) -- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_linux_x86_64) -- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com//mvd/MVD_v2.1.1/mvd_macos_x86_64) -- Gitee From ca1939b867a4ad2d0dcd9181104d2062e6c03aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=AA=E6=97=A5=E5=8D=8E?= Date: Thu, 9 Jun 2022 15:42:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(mvd):=20=E5=8F=91=E5=B8=83=E6=96=B0?= =?UTF-8?q?=E7=89=88=E6=9C=AC3.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- product/en/docs-mvd/v2.4/release-notes.md | 24 ++++++++ product/en/docs-mvd/v2.4/usage.md | 71 ++++++++++++++--------- product/zh/docs-mvd/v2.4/release-notes.md | 24 ++++++++ product/zh/docs-mvd/v2.4/usage.md | 66 +++++++++++++-------- 4 files changed, 132 insertions(+), 53 deletions(-) diff --git a/product/en/docs-mvd/v2.4/release-notes.md b/product/en/docs-mvd/v2.4/release-notes.md index b952128a..7ee52d23 100644 --- a/product/en/docs-mvd/v2.4/release-notes.md +++ b/product/en/docs-mvd/v2.4/release-notes.md @@ -7,6 +7,30 @@ date: 2021-08-30 # Release Notes +## v3.0.0 (2022-06-09) + +- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v3.0.0/mvd_linux_arm64) +- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v3.0.0/mvd_linux_x86_64) +- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v3.0.0/mvd_macos_x86_64) + +### Features + +- Add options: "-L", "--license", "--apply-licnese", used for apply and verify license +- Add option: "--column-list", support partial column comparion + +### Improvements + +- Use "--debug-md5" option can output primary key in source and target database +- When comparing with statistics method, filter columns before query +- Adjust the display of empty characters in object names (use double quotes to wrap them) +- Support for MySQL with object names without space compared to other databases with space in name +- Add debug information for openGauss SQL executions + +### Bugfixs + +- Fix "NULL" (None in python) value returns when comparision with primary key +- Remove "public" schema out of system schema list in openGauss + ## v2.4.8 (2022-04-22) ### Feature diff --git a/product/en/docs-mvd/v2.4/usage.md b/product/en/docs-mvd/v2.4/usage.md index 1f2746d3..18fcbf38 100644 --- a/product/en/docs-mvd/v2.4/usage.md +++ b/product/en/docs-mvd/v2.4/usage.md @@ -13,46 +13,46 @@ MVD is command line tool can be run only in the Shell interface. You can query t Introduction: MVD is a data verification tool for Heterogeneous Databases. -Options: +Options: -h, --help : Show help message - -v, --version : Show tool version [2.4.0] + -v, --version : Show tool version [3.0.0] -x, --debug : Run in debug mode, means more output logs --debug-md5 : Debug for print data before calculator MD5 -c, --config-file : Using a config file with format json --mtk-config : Using a config file from MTK tool with format json -C, --catagory : Compare catagory: A=All, M=Metadata, D=Data -d, --func-dimension : [Advanced Option] Functions used in data comparison - : Default: avg:a,min:np,max:np,median:np - : Format: : -- Same function name among all database - : := a|p|np, a = all, p = primary table, np = not [p] - : can be ignored, then use default [a] - : Format: :: - : := = | = - : := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS - : Example 'testmin:oracle=min|mogdb=min|mysql=min|db2=min:p' + Default: avg:a,min:np,max:np,median:np + Format: : -- Same function name among all database + := a|p|np, a = all, p = primary table, np = not [p] + can be ignored, then use default [a] + Format: :: + := = | = + := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS + Example 'testmin:oracle=min|mogdb=min|mysql=min|db2=min:p' -s, --source-db : Source database to be verified - : Format: ::::: - : := -ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS - : Example 'testmin:oracle=min|mogdb=min|mysql=min|db2=min:p' - -s, --source-db : Source database to be verified - : Format: ::::: - : := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS + Format: ::::: + := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS -t, --target-db : Target database to be verified, format see also '-s' -w, --workers : Parallel workers (1~32), default: 8 - -T, --table : Check a single table - : Format: . - : Tips: if this option was specified, then '-i' and '-e' will be ignored - -i, --include : White list, patterns used for object filter, all patterns combined with comma - : Format: :.,... - : : - : . - : - : Notes: 1. can use: */%/TABLE/VIEW/SEQUENCE/PROCEDURE/FUNCTION/OTHERS - : 2. Can use */% in and field, means to match all - -e, --exclude : Black list, patterns used for object filter, format see also '-i' + -T, --table : Check a single table (source table info) + Format: . + Tips: 1. if this option was specified, then '-i' and '-e' will be ignored + 2. Name with mixed-case means case sensitive + -i, --include : Source White list, patterns used for object filter, all patterns combined with comma + Format: :.,... + : + . + + Tips: 1. can use: */%/TABLE/VIEW/SEQUENCE/PROCEDURE/FUNCTION/OTHERS + 2. Can use */% in and field, means to match all + 3. Name with mixed-case means case sensitive + -e, --exclude : Source Black list, patterns used for object filter, format see also '-i' -r, --remap-schema : Schema transformation in comparision - : Format: :,:... + Format: :,:... + --column-list : Set valid column list for data comparion, combined with comma + Format: ,,,... + Tips: name with mixed-case means case sensitive -f, --result-file : Result file, used to save result, default to print result to screen -F, --result-format : Result file data format: json (default), plain -R, --row-dir : Row directory for differences data (MD5 & KEY) @@ -61,6 +61,8 @@ ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS -z, --zero-char : Specify a char for chr(0) in comparason, Default is empty char -Z, --time-zone : Specify timezone for DB client, set empty use local, default is UTC(+00:00) -l, --logfile : Write output information to logfile + -L, --license : Specify license file, default is: ./license.json + --apply-license : Apply for a new license from server Usage: 1. Verify a single table (Using Statistics Analysis) @@ -89,6 +91,7 @@ Usage: | -i, --include | Specifies a list of objects to be included for comparison. You can specify multiple matching modes and separate them with commas.
The matching format includes <type>:<owner> .<object_name>, <owner>.<object_name>, <object_name>, ....
``*`` or ``%`` can be used in OWNER and OBJECT_NAME to mark wildcard characters.
TYPE includes */%/TABLE/VIEW/SEQUENCE/PROCEDURE/FUNCTION/OTHERS. | | -e, --exclude | Specifies the list of objects to be excluded. The format is the same as that of `-i`. | | -r, --remap-schema | Specifies the mapping of schemas in the source and target databases during comparison. The schemas in the source and target databases have the same name but do not have the mapping relation by default. | +| --column-list | Specify to compare only the data in the fields listed within this option | | -f, --result-file | Specifies the comparison result file. By default, no file will be generated, and the result is shown in the command line window. | | -F, --result-format | Specifies the comparison result format, including **json** and **plain**. The default value is **plain**, indicating the text format which is convenient for the user to read. | | -R, --row-dir | Specifies the folder where the row difference result is generated upon the execution of the MD5 row-by-row comparison mode. For each table with a difference, a difference file is created in that directory. | @@ -97,6 +100,8 @@ Usage: | -z, --zero-char | Specifies the replacing character of the chr(0) character during comparison. The default value is null, which is to remove the chr(0) invisible characters. | | -Z, --time-zone | Specifies the time zone of the client data query, set the empty string to use the local OS time zone, if not set, use UTC (+00:00) time zone | | -l, --logfile | Specifies the log file for tool running. | +| -L, --license | Specify the location of the license file, if license.json is not in the current directory, you need to specify it manually with this option | +| --license-apply | Apply for a license | ## Examples of Common Commands @@ -104,6 +109,14 @@ The following lists command examples in common scenarios (using the MacOS 2.0 as Note: The method of comparing statistical eigenvalues is inefficient. It is recommended to use the MD5 row-by-row comparison method. +0. Apply for a license + + ```shell + ./mvd_macos_x86_64 --license-apply + ``` + + You need to enter the email address for receive the license during execution. + 1. Compare the structures and data between Oracle and MogDB. ```shell diff --git a/product/zh/docs-mvd/v2.4/release-notes.md b/product/zh/docs-mvd/v2.4/release-notes.md index 7fc53f6a..688715cd 100644 --- a/product/zh/docs-mvd/v2.4/release-notes.md +++ b/product/zh/docs-mvd/v2.4/release-notes.md @@ -7,6 +7,30 @@ date: 2021-08-30 # 发布记录 +## v3.0.0 (2022-06-09) + +- [mvd_linux_arm64](https://cdn-mogdb.enmotech.com/mvd/MVD_v3.0.0/mvd_linux_arm64) +- [mvd_linux_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v3.0.0/mvd_linux_x86_64) +- [mvd_macos_x86_64](https://cdn-mogdb.enmotech.com/mvd/MVD_v3.0.0/mvd_macos_x86_64) + +### 新增功能 + +- 增加 "-L", "--license", "--apply-licnese" 选项,用于 License 申请和验证 +- 增加 "--column-list" 参数,支持只对比指定字段的数据 + +### 功能优化 + +- 使用 "--debug-md5" 选项可输出源库和目标库字段列表与主键列表,便于问题分析定位 +- 统计指标对比时,将字段过滤内置到查询之前,部分代码风格调整 +- 调整对象名称中有空字符的显示方式(使用双引号包裹) +- 支持 MySQL 对象名称不带空格与其他库带空格的对比 +- 添加 OG 执行 SQL 时的 Debug 信息 + +### 问题修复 + +- 修复 MogDB 主键数据对比,返回值为 NULL 导致的 Key 值对比失败 +- 将 public 移除出系统用户列表 + ## v2.4.8 (2022-04-22) ### 新增功能 diff --git a/product/zh/docs-mvd/v2.4/usage.md b/product/zh/docs-mvd/v2.4/usage.md index b7ba8d47..180cfce3 100644 --- a/product/zh/docs-mvd/v2.4/usage.md +++ b/product/zh/docs-mvd/v2.4/usage.md @@ -13,41 +13,46 @@ MVD 为纯命令行工具,只能在 Shell 界面中执行。可通过 -h 选 Introduction: MVD is a data verification tool for Heterogeneous Databases. -Options: +Options: -h, --help : Show help message - -v, --version : Show tool version [2.4.0] + -v, --version : Show tool version [3.0.0] -x, --debug : Run in debug mode, means more output logs --debug-md5 : Debug for print data before calculator MD5 -c, --config-file : Using a config file with format json --mtk-config : Using a config file from MTK tool with format json -C, --catagory : Compare catagory: A=All, M=Metadata, D=Data -d, --func-dimension : [Advanced Option] Functions used in data comparison - : Default: avg:a,min:np,max:np,median:np - : Format: : -- Same function name among all database - : := a|p|np, a = all, p = primary table, np = not [p] - : can be ignored, then use default [a] - : Format: :: - : := = | = - : := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS - : Example 'testmin:oracle=min|mogdb=min|mysql=min|db2=min:p' + Default: avg:a,min:np,max:np,median:np + Format: : -- Same function name among all database + := a|p|np, a = all, p = primary table, np = not [p] + can be ignored, then use default [a] + Format: :: + := = | = + := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS + Example 'testmin:oracle=min|mogdb=min|mysql=min|db2=min:p' -s, --source-db : Source database to be verified - : Format: ::::: - : := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS + Format: ::::: + := ORACLE|DB2|MYSQL|POSTGRESQL|MOGDB|OPENGAUSS -t, --target-db : Target database to be verified, format see also '-s' -w, --workers : Parallel workers (1~32), default: 8 - -T, --table : Check a single table - : Format: . - : Tips: if this option was specified, then '-i' and '-e' will be ignored - -i, --include : White list, patterns used for object filter, all patterns combined with comma - : Format: :.,... - : : - : . - : - : Notes: 1. can use: */%/TABLE/VIEW/SEQUENCE/PROCEDURE/FUNCTION/OTHERS - : 2. Can use */% in and field, means to match all - -e, --exclude : Black list, patterns used for object filter, format see also '-i' + -T, --table : Check a single table (source table info) + Format: . + Tips: 1. if this option was specified, then '-i' and '-e' will be ignored + 2. Name with mixed-case means case sensitive + -i, --include : Source White list, patterns used for object filter, all patterns combined with comma + Format: :.,... + : + . + + Tips: 1. can use: */%/TABLE/VIEW/SEQUENCE/PROCEDURE/FUNCTION/OTHERS + 2. Can use */% in and field, means to match all + 3. Name with mixed-case means case sensitive + -e, --exclude : Source Black list, patterns used for object filter, format see also '-i' -r, --remap-schema : Schema transformation in comparision - : Format: :,:... + Format: :,:... + --column-list : Set valid column list for data comparion, combined with comma + Format: ,,,... + Tips: name with mixed-case means case sensitive -f, --result-file : Result file, used to save result, default to print result to screen -F, --result-format : Result file data format: json (default), plain -R, --row-dir : Row directory for differences data (MD5 & KEY) @@ -56,6 +61,8 @@ Options: -z, --zero-char : Specify a char for chr(0) in comparason, Default is empty char -Z, --time-zone : Specify timezone for DB client, set empty use local, default is UTC(+00:00) -l, --logfile : Write output information to logfile + -L, --license : Specify license file, default is: ./license.json + --apply-license : Apply for a new license from server Usage: 1. Verify a single table (Using Statistics Analysis) @@ -83,6 +90,7 @@ Usage: | -i, --include | 需要包含进行对比的对象列表,可指定多个匹配模式,使用逗号分隔。
匹配格式包括:<type>:<owner>.<object_name>, <owner>.<object_name>, <object_name>, ...
可以在 OWNER, OBJECT_NAME 中使用 `*` 或 `%` 来标识通配符
TYPE 类型包括: */%/TABLE/VIEW/SEQUENCE/PROCEDURE/FUNCTION/OTHERS | | -e, --exclude | 需要排除的对象列表,其格式与 `-i` 一样。 | | -r, --remap-schema | 指定对比时的源端与目标端的 Schema 映射关系,默认源端与目标端 Schema 同名无映射 | +| --column-list | 指定只对比本选项列出的字段数据 | | -f, --result-file | 对比结果的输出文件,默认无输出文件,直接在当前执行的命令行窗口展示结果 | | -F, --result-format | 对比结果的格式,支持 json, plain 两种,默认 plain 方式,即便于人工阅读的文本格式 | | -R, --row-dir | 执行逐行 MD5 对比模式,指定行差异结果的输出文件夹,每张有差异的表,都会在该目录中创建一个差异文件 | @@ -91,6 +99,8 @@ Usage: | -z, --zero-char | 指定 chr(0) 字符在对比中的替代字符,默认为空字符,即移除 chr(0) 不可见字符 | | -Z, --time-zone | 指定客户端数据查询的时区,设置空字符串则使用本地操作系统时区,不设置则使用 UTC (+00:00) 时区 | | -l, --logfile | 指定工具运行的日志文件 | +| -L, --license | 指定 License 文件的位置,若 license.json 不在当前目录则需要手动通过本选项指定 | +| -l, --license-apply | 申请 License | ## 常用命令示例 @@ -98,6 +108,14 @@ Usage: 注意: 特征值统计对比方式可能效率较慢,推荐使用 MD5 逐行对比模式。 +0. 申请 License + + ```shell + ./mvd_macos_x86_64 --license-apply + ``` + + 需要在执行过程中输入接收 license 的邮箱地址 + 1. 对比 Oracle 到 MogDB 的结构和数据差异: ```shell -- Gitee