From 8929e75c0969ad1e9f48719e2e6b34d4e26c6c3f Mon Sep 17 00:00:00 2001 From: travelliu Date: Tue, 8 Mar 2022 13:50:35 +0800 Subject: [PATCH 1/5] feta(mtk): add parameter --- product/en/docs-mtk/v2.0/mtk-config.md | 45 +++++++++++++ .../docs-mtk/v2.0/mtk-oracle-to-openGauss.md | 11 ++++ product/zh/docs-mtk/v2.0/mtk-config.md | 64 ++++++++++++++++--- .../docs-mtk/v2.0/mtk-oracle-to-openGauss.md | 11 ++++ 4 files changed, 122 insertions(+), 9 deletions(-) diff --git a/product/en/docs-mtk/v2.0/mtk-config.md b/product/en/docs-mtk/v2.0/mtk-config.md index cd9e8bb6..c0ebcafe 100644 --- a/product/en/docs-mtk/v2.0/mtk-config.md +++ b/product/en/docs-mtk/v2.0/mtk-config.md @@ -93,6 +93,15 @@ The database type is case-insensitive, which includes: | dbName | Specifies the name of a database. | | dsn | Specifies the complete string for connecting a database, which is used in certain scenarios. | +### clientCharset + +string + +Supported after `v2.2.2` version. + +For database encoding conversion scenarios, it is generally not required to be set. +For example, Oracle ZHS16GBK encoding was migrated to openGauss UTF8. Encountered `ORA-29275: partial multibyte character` + ### Parameter ### dropExistingObject @@ -483,6 +492,14 @@ CREATE TABLE mtk.tab_part_list ( ) ``` +### igErrorData + +bool + +Supported after `v2.2.2` version. + +Ignores the data that failed to insert and logs to a file + ### autoAddMaxvaluePart Supported after `v0.0.35` version. @@ -721,6 +738,34 @@ Examples: "templateSeqName": "{{.TabName}}_{{.ColName}}_SEQ" ``` +### charAppendEmptyString + +bool + +Supported after `v2.2.2` version. + +For ORA-29275: Partial multibyte character error. +When parameters are enabled, the Oracle query statement stitches the empty string. Primarily for the following types + +- Char +- Character +- NChar +- Varchar +- NVarchar +- Varchar2 +- NVarchar2 + +Examples: + +```sql +select chr(195) from dual; -- ORA-29275 +select chr(195)||'' from dual; -- normal + +-- Chinese "证券投" GBK encoding +select utl_raw.cast_to_varchar2(hextoraw('D6A4C8AFCDB6D6')) from dual; -- ORA-29275 +select utl_raw.cast_to_varchar2(hextoraw('D6A4C8AFCDB6D6'))||'' from dual; -- normal +``` + ## limit ```json diff --git a/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md b/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md index 86d4a0ea..e8479229 100644 --- a/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md +++ b/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md @@ -298,6 +298,17 @@ The support is as follows: ### Other Problem +- ORA-29275: partial multibyte character + + - AL32UTF8 TO UTF8 + Configure the parameter [charAppendEmptyString](config#charappendemptystring) under `source`-`parameter` to true + - ZHS16GBK TO UTF8 + - Method one + Configure the parameter [charAppendEmptyString](config#charappendemptystring) under `source`-`parameter` to true + - Method two + Configure the parameter [clientCharset](config#clientcharset) under `source` and `target` under `connect` to true + Configure the parameter [igErrorData](config#igerrordata) under `target`-`parameter` to true + - ORA-01805 msg:possible error in date/time operation 1. Query oracle database server timezone_file version diff --git a/product/zh/docs-mtk/v2.0/mtk-config.md b/product/zh/docs-mtk/v2.0/mtk-config.md index a46d13d2..d68dc467 100644 --- a/product/zh/docs-mtk/v2.0/mtk-config.md +++ b/product/zh/docs-mtk/v2.0/mtk-config.md @@ -79,19 +79,29 @@ MTK配置文件主要包含以下内容 "user": "system", "port": 1521, "password": "oracle", - "dbName": "orcl" + "dbName": "orcl", + "clientCharset":"" } ``` | 参数名称 | 参数说明 | -| :-------- | :-------------------------------------- | -| version | 数据库版本,无需指定。连接数据库时自动查询 | -| host | 数据库主机。支持ip、主机名、域名 | -| user | 数据库用户,必须具有查询数据字典和数据权限 | -| port | 数据库端口号 | -| password | 数据库用户密码 | -| dbName | 数据库名称 | -| dsn | 数据库完整连接字符串,特定场景使用 | +| :------------ | :-------------------------------------- | +| version | 数据库版本,无需指定。连接数据库时自动查询 | +| host | 数据库主机。支持ip、主机名、域名 | +| user | 数据库用户,必须具有查询数据字典和数据权限 | +| port | 数据库端口号 | +| password | 数据库用户密码 | +| dbName | 数据库名称 | +| dsn | 数据库完整连接字符串,特定场景使用 | + +### clientCharset + +string + +`v2.2.2`之后的版本支持本参数。 + +针对数据库编码转换场景使用,一般情况下不需要设置. +如 Oracle ZHS16GBK 编码迁移到 openGauss UTF8. 遇到`ORA-29275: partial multibyte character` ### parameter @@ -474,6 +484,14 @@ CREATE TABLE mtk.tab_part_list ( ) ``` +### igErrorData + +bool + +`v2.2.2`之后的版本支持本参数。 + +忽略插入失败的数据并记录到文件 + ### autoAddMaxvaluePart `v0.0.35`之后的版本支持本参数。 @@ -710,6 +728,34 @@ Examples: "templateSeqName": "{{.TabName}}_{{.ColName}}_SEQ" ``` +### charAppendEmptyString + +bool + +`v2.2.2`之后的版本支持本参数。 + +针对ORA-29275: partial multibyte character 错误. +启用参数后在Oracle查询语句会拼接空字符串.主要针对以下列类型 + +- Char +- Character +- NChar +- Varchar +- NVarchar +- Varchar2 +- NVarchar2 + +Examples: + +```sql +select chr(195) from dual; -- 报错 +select chr(195)||'' from dual; -- 不报错 + +-- 中文GBK编码 证券投 +select utl_raw.cast_to_varchar2(hextoraw('D6A4C8AFCDB6D6')) from dual; -- 报错 +select utl_raw.cast_to_varchar2(hextoraw('D6A4C8AFCDB6D6'))||'' from dual; -- 不报错 +``` + ## limit ```json diff --git a/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md b/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md index 457d7ac6..af21e301 100644 --- a/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md +++ b/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md @@ -281,6 +281,17 @@ openGauss数据库系统列: ### 其他问题 +- ORA-29275: partial multibyte character + + - AL32UTF8 TO UTF8 + 在 `source`-`parameter` 下配置参数[charAppendEmptyString](config#charappendemptystring) 为 true + - ZHS16GBK TO UTF8 + - 方法一 + 在 `source`-`parameter` 下配置参数[charAppendEmptyString](config#charappendemptystring) 为 true + - 方法二 + 在 `source`和`target`下的 `connect` 下配置参数[clientCharset](config#clientcharset) 为 true + 在 `target`-`parameter` 下配置参数[igErrorData](config#igerrordata) 为 true + - ORA-01805 msg:possible error in date/time operation 1. query oracle database server timezone_file version -- Gitee From ae16190555ab32bc0687b98c9b5cf309ab90f558 Mon Sep 17 00:00:00 2001 From: travelliu Date: Tue, 8 Mar 2022 15:43:42 +0800 Subject: [PATCH 2/5] feat(mtk): add faqs --- product/en/docs-mtk/v2.0/faqs.md | 46 ++++++++++++++++++++++++++++++++ product/en/docs-mtk/v2.0/toc.md | 1 + product/zh/docs-mtk/v2.0/faqs.md | 46 ++++++++++++++++++++++++++++++++ product/zh/docs-mtk/v2.0/toc.md | 1 + 4 files changed, 94 insertions(+) create mode 100644 product/en/docs-mtk/v2.0/faqs.md create mode 100644 product/zh/docs-mtk/v2.0/faqs.md diff --git a/product/en/docs-mtk/v2.0/faqs.md b/product/en/docs-mtk/v2.0/faqs.md new file mode 100644 index 00000000..2f2cf4ca --- /dev/null +++ b/product/en/docs-mtk/v2.0/faqs.md @@ -0,0 +1,46 @@ +--- +title: FAQs +summary: FAQs +author: Bin.Liu +date: 2021-09-14 +--- + + +# FAQs + +## Column length change? + +Yes. The following scenarios exist. + +- The source database column type is character migration to byte type. The length of the field will be twice as long as the original. + + - MySQL database Migration to openGauss/MogDB non-PG compatible mode will become 3x the original. e.g. varchar(10) becomes varchar(30) + +- Character encoding conversion is present. Database length migration from GBK to UTF-8 increases by 50% and rounds up. + +|Source DB|Source Charset|Source Type|Target Type|Target DB| Target Charset|Target datCompatibility| +|---------|--------------|-----------|-----------|---------|---------------|-----------------------| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(150)|openGauss|UTF8|A| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(300)|openGauss|UTF8|A| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|UTF8|PG| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(100)|openGauss|UTF8|PG| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|GBK |A| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(200)|openGauss|GBK |A| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|GBK |PG| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(100)|openGauss|GBK |PG| +|Oracle |AL32UTF8 |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|UTF8|A| +|Oracle |AL32UTF8 |VARCHAR2(100 CHAR)|VARCHAR(300)|openGauss|UTF8|A| +|Oracle |AL32UTF8 |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|UTF8|PG| +|Oracle |AL32UTF8 |VARCHAR2(100 CHAR)|VARCHAR(100)|openGauss|UTF8|PG| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(300)|openGauss|UTF8|A| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(300)|openGauss|GBK|A| +|MySQL |UTF8 |VARCHAR(100 )|VARCHAR(300)|openGauss|UTF8|A| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|PG| +|MySQL |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(150)|openGauss|UTF8|A| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|A| +|DB2 |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|A| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|PG| +|DB2 |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| diff --git a/product/en/docs-mtk/v2.0/toc.md b/product/en/docs-mtk/v2.0/toc.md index b9939706..368772df 100644 --- a/product/en/docs-mtk/v2.0/toc.md +++ b/product/en/docs-mtk/v2.0/toc.md @@ -62,4 +62,5 @@ + [MySQL to openGauss/MogDB](/mtk-mysql-to-openGauss.md) + [Oracle to openGauss/MogDB](/mtk-oracle-to-openGauss.md) + [DB2 to MySQL](/mtk-db2-to-mysql.md) ++ [常见问题](/faqs.md) + [Release Notes](/release-notes.md) diff --git a/product/zh/docs-mtk/v2.0/faqs.md b/product/zh/docs-mtk/v2.0/faqs.md new file mode 100644 index 00000000..213681cc --- /dev/null +++ b/product/zh/docs-mtk/v2.0/faqs.md @@ -0,0 +1,46 @@ +--- +title: FAQs +summary: FAQs +author: Bin.Liu +date: 2021-09-14 +--- + + +# FAQs + +## 存在字段长度变化? + +会. 主要存在以下场景. + +- 源库列类型是字符迁移到字节型. 字段长度会变成原来的2倍. + + - MySQL 数据库 迁移到 openGauss/MogDB 非PG兼容模式 会变成原来的3倍. 如varchar(10)变为varchar(30) + +- 存在字符编码转换. 从GBK的数据库迁移到UTF-8的数据库长度会增加50%,向上取整. + +|Source DB|Source Charset|Source Type|Target Type|Target DB| Target Charset|Target datCompatibility| +|---------|--------------|-----------|-----------|---------|---------------|-----------------------| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(150)|openGauss|UTF8|A| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(300)|openGauss|UTF8|A| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|UTF8|PG| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(100)|openGauss|UTF8|PG| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|GBK |A| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(200)|openGauss|GBK |A| +|Oracle |ZHS16GBK |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|GBK |PG| +|Oracle |ZHS16GBK |VARCHAR2(100 CHAR)|VARCHAR(100)|openGauss|GBK |PG| +|Oracle |AL32UTF8 |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|UTF8|A| +|Oracle |AL32UTF8 |VARCHAR2(100 CHAR)|VARCHAR(300)|openGauss|UTF8|A| +|Oracle |AL32UTF8 |VARCHAR2(100 BYTE)|VARCHAR(100)|openGauss|UTF8|PG| +|Oracle |AL32UTF8 |VARCHAR2(100 CHAR)|VARCHAR(100)|openGauss|UTF8|PG| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(300)|openGauss|UTF8|A| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(300)|openGauss|GBK|A| +|MySQL |UTF8 |VARCHAR(100 )|VARCHAR(300)|openGauss|UTF8|A| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| +|MySQL |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|PG| +|MySQL |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(150)|openGauss|UTF8|A| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|A| +|DB2 |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|A| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| +|DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|PG| +|DB2 |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| diff --git a/product/zh/docs-mtk/v2.0/toc.md b/product/zh/docs-mtk/v2.0/toc.md index 7b048808..2c352095 100644 --- a/product/zh/docs-mtk/v2.0/toc.md +++ b/product/zh/docs-mtk/v2.0/toc.md @@ -62,4 +62,5 @@ + [MySQL到openGauss/MogDB](/mtk-mysql-to-openGauss.md) + [Oracle到openGauss/MogDB](/mtk-oracle-to-openGauss.md) + [DB2到MySQL](/mtk-db2-to-mysql.md) ++ [常见问题](/faqs.md) + [发布记录](/release-notes.md) -- Gitee From 6a15510cf3b600dd8438e440529d67318e0a5165 Mon Sep 17 00:00:00 2001 From: travelliu Date: Wed, 9 Mar 2022 09:55:27 +0800 Subject: [PATCH 3/5] fix(mtk): add igErrorData desc --- product/en/docs-mtk/v2.0/mtk-config.md | 3 ++- product/zh/docs-mtk/v2.0/mtk-config.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/product/en/docs-mtk/v2.0/mtk-config.md b/product/en/docs-mtk/v2.0/mtk-config.md index c0ebcafe..5e6bbf00 100644 --- a/product/en/docs-mtk/v2.0/mtk-config.md +++ b/product/en/docs-mtk/v2.0/mtk-config.md @@ -498,7 +498,8 @@ CREATE TABLE mtk.tab_part_list ( Supported after `v2.2.2` version. -Ignores the data that failed to insert and logs to a file +Ignores the data that failed to insert and logs to a file. +Only openGauss/MogDB versions after 2.1.0 are supported. ### autoAddMaxvaluePart diff --git a/product/zh/docs-mtk/v2.0/mtk-config.md b/product/zh/docs-mtk/v2.0/mtk-config.md index d68dc467..6101e9ba 100644 --- a/product/zh/docs-mtk/v2.0/mtk-config.md +++ b/product/zh/docs-mtk/v2.0/mtk-config.md @@ -490,7 +490,7 @@ CREATE TABLE mtk.tab_part_list ( `v2.2.2`之后的版本支持本参数。 -忽略插入失败的数据并记录到文件 +忽略插入失败的数据并记录到文件. 只支持openGauss/MogDB 2.1.0 之后版本 ### autoAddMaxvaluePart -- Gitee From 04a95d0caf0c392517fcc1f600a6ce9ffc834e9d Mon Sep 17 00:00:00 2001 From: travelliu Date: Mon, 14 Mar 2022 13:28:45 +0800 Subject: [PATCH 4/5] style(mtk): update mtk oracle to mogdb style --- .../docs-mtk/v2.0/mtk-oracle-to-openGauss.md | 35 +++++++-------- .../docs-mtk/v2.0/mtk-oracle-to-openGauss.md | 44 ++++++++----------- scripts/gitee_build_pr.sh | 5 ++- 3 files changed, 39 insertions(+), 45 deletions(-) diff --git a/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md b/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md index c3263fdf..0d937000 100644 --- a/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md +++ b/product/en/docs-mtk/v2.0/mtk-oracle-to-openGauss.md @@ -298,19 +298,20 @@ The support is as follows: ### Other Problem -- ORA-29275: partial multibyte character +#### ORA-29275: partial multibyte character - - AL32UTF8 TO UTF8 - Configure the parameter [charAppendEmptyString](config#charappendemptystring) under `source`-`parameter` to true - - ZHS16GBK TO UTF8 - - Method one - Configure the parameter [charAppendEmptyString](config#charappendemptystring) under `source`-`parameter` to true - - Method two - Configure the parameter [clientCharset](config#clientcharset) under `source` and `target` under `connect` to true - Configure the parameter [igErrorData](config#igerrordata) under `target`-`parameter` to true +- AL32UTF8 TO UTF8 + Configure the parameter [charAppendEmptyString](config#charappendemptystring) under `source`-`parameter` to true +- ZHS16GBK TO UTF8 + - Method one + Configure the parameter [charAppendEmptyString](config#charappendemptystring) under `source`-`parameter` to true + - Method two + Configure the parameter [clientCharset](config#clientcharset) under `source` and `target` under `connect` to true + Configure the parameter [igErrorData](config#igerrordata) under `target`-`parameter` to true -- ORA-01805 msg:possible error in date/time operation +#### ORA-01805 msg:possible error in date/time operation +- Query timezone_file 1. Query oracle database server timezone_file version ```sql @@ -347,15 +348,11 @@ The support is as follows: Client version: timezlrg_32.dat - Solution: +- Solution: 1. Install the Oracle client. - 2. Upgrade **timezone_file**. - - ``` - [Updated DST Transitions and New Time Zones in Oracle RDBMS and OJVM Time Zone File Patches (Doc ID 412160.1)() - ``` + 2. Upgrade **timezone_file**. Updated DST Transitions and New Time Zones in Oracle RDBMS and OJVM Time Zone File Patches (Doc ID 412160.1) ```bash for oracle Instant client @@ -381,11 +378,11 @@ The support is as follows: Large timezone file = /opt/client_19/oracore/zoneinfo/timezlrg_34.dat ``` -- Segmentation fault on some requests handling ROWID +#### Segmentation fault on some requests handling ROWID - + - Try setting the environment variable ORA_OCI_NO_OPTIMIZED_FETCH to the value 1 before you run the query to avoid the issue +Try setting the environment variable ORA_OCI_NO_OPTIMIZED_FETCH to the value 1 before you run the query to avoid the issue
diff --git a/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md b/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md index 40911326..28d3ead3 100644 --- a/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md +++ b/product/zh/docs-mtk/v2.0/mtk-oracle-to-openGauss.md @@ -281,18 +281,20 @@ openGauss数据库系统列: ### 其他问题 -- ORA-29275: partial multibyte character +#### ORA-29275: partial multibyte character - - AL32UTF8 TO UTF8 - 在 `source`-`parameter` 下配置参数[charAppendEmptyString](config#charappendemptystring) 为 true - - ZHS16GBK TO UTF8 - - 方法一 - 在 `source`-`parameter` 下配置参数[charAppendEmptyString](config#charappendemptystring) 为 true - - 方法二 - 在 `source`和`target`下的 `connect` 下配置参数[clientCharset](config#clientcharset) 为 true - 在 `target`-`parameter` 下配置参数[igErrorData](config#igerrordata) 为 true +- AL32UTF8 TO UTF8 + 在 `source`-`parameter` 下配置参数[charAppendEmptyString](config#charappendemptystring) 为 true +- ZHS16GBK TO UTF8 + - 方法一 + 在 `source`-`parameter` 下配置参数[charAppendEmptyString](config#charappendemptystring) 为 true + - 方法二 + 在 `source`和`target`下的 `connect` 下配置参数[clientCharset](config#clientcharset) 为 true + 在 `target`-`parameter` 下配置参数[igErrorData](config#igerrordata) 为 true -- ORA-01805 msg:possible error in date/time operation +#### ORA-01805 msg:possible error in date/time operation + +- 查询 timezone_file 1. query oracle database server timezone_file version @@ -324,50 +326,42 @@ openGauss数据库系统列: Large timezone file = /opt/client_19/oracore/zoneinfo/timezlrg_32.dat ``` - 如果客户端版本和服务器端版本不一致,请升级timezone_file。 + 如果客户端版本和服务器端版本不一致,请升级timezone_file. 服务器端版 : timezlrg_34.dat 客户端版本 : timezlrg_32.dat - 解决方案: +- 解决方案: 1. 安装Oracle客户端。 - 2. 升级timezone_file。 - - ``` - 具体查看 [Updated DST Transitions and New Time Zones in Oracle RDBMS and OJVM Time Zone File Patches (Doc ID 412160.1)]() - ``` + 2. 升级timezone_file。具体查看Updated DST Transitions and New Time Zones in Oracle RDBMS and OJVM Time Zone File Patches (Doc ID 412160.1) ``` - for oracle Instant client - + # for oracle Instant client # 设置环境变量ORA_TZFILE export ORA_TZFILE=timezlrg_34.dat # 从其他已安装补丁的机器复制过来. cp timezlrg_34.dat $ORACLE_HOME/oracore/zoneinfo/ genezi -v Client Shared Library 64-bit - 19.3.0.0.0 - System name: Darwin Release: 19.6.0 Version: Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 Machine: x86_64 - TIMEZONE INFORMATION -------------------- Operating in Instant Client mode. - Time zone file timezlrg_34.dat set in ORA_TZFILE environment variable will be used. Small timezone file = /opt/client_19/oracore/zoneinfo/timezlrg_34.dat Large timezone file = /opt/client_19/oracore/zoneinfo/timezlrg_34.dat ``` -- Segmentation Fault on some requests handling ROWID +#### Segmentation Fault on some requests handling ROWID - + - Try setting the environment variable ORA_OCI_NO_OPTIMIZED_FETCH to the value 1 before you run the query to avoid the issue +Try setting the environment variable ORA_OCI_NO_OPTIMIZED_FETCH to the value 1 before you run the query to avoid the issue
diff --git a/scripts/gitee_build_pr.sh b/scripts/gitee_build_pr.sh index 96478eca..89c25e4e 100755 --- a/scripts/gitee_build_pr.sh +++ b/scripts/gitee_build_pr.sh @@ -16,8 +16,11 @@ if [ ! -d ${cacheDir} ];then mkdir -p ${cacheDir} fi +echo "giteePullRequestIid : ${giteePullRequestIid}" +echo "giteeTargetBranch : ${giteeTargetBranch}" + if [ ! -d ${publicDir} ];then - if [[ ${giteeSourceBranch} == "master" ]]; then + if [[ ${giteeTargetBranch} == "master" ]]; then rsync -rltgoD --delete /data/mogdb-docs ${publicDir} else echo "mogdb-beta-docs" -- Gitee From 6e07d64d98eee5a84d67f77735d803babc79274e Mon Sep 17 00:00:00 2001 From: travelliu Date: Mon, 14 Mar 2022 13:58:40 +0800 Subject: [PATCH 5/5] feat(mtk): update faqs --- product/en/docs-mtk/v2.0/faqs.md | 26 +++++++++++++++++++ product/en/docs-mtk/v2.0/overview.md | 37 ---------------------------- product/zh/docs-mtk/v2.0/faqs.md | 25 +++++++++++++++++++ product/zh/docs-mtk/v2.0/overview.md | 33 ------------------------- 4 files changed, 51 insertions(+), 70 deletions(-) diff --git a/product/en/docs-mtk/v2.0/faqs.md b/product/en/docs-mtk/v2.0/faqs.md index 2f2cf4ca..e32c98d3 100644 --- a/product/en/docs-mtk/v2.0/faqs.md +++ b/product/en/docs-mtk/v2.0/faqs.md @@ -44,3 +44,29 @@ Yes. The following scenarios exist. |DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| |DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|PG| |DB2 |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| + +## Empty String and NULL conversions ? + +- Oracle '' = null +- DB2 '' = null +- MySQL '' != Null +- PostgreSQL '' != Null +- openGauss + - Compatibility type A: '' = null + - Compatibility type PG: '' != null + +MTK processes databases according to the compatibility mode of the source and target databases. + +- '' = null does not process data. +- '' = null converts a string to '' when the column type is `NOT Null`. + +## Chr(0) 0x00 Change ? + +Special characters Chr(0)/0x00 can be inserted in DB2/Oracle/MySQL. + +However, it cannot be inserted in the postgres class database, and Chr(0) will be replaced with ''. + +## Time zone Change ? + +- Make sure that the migration server is in the same time zone as the application server. +- Make sure that the database nodes are in the same time zone. diff --git a/product/en/docs-mtk/v2.0/overview.md b/product/en/docs-mtk/v2.0/overview.md index 4cc947cb..80919b02 100644 --- a/product/en/docs-mtk/v2.0/overview.md +++ b/product/en/docs-mtk/v2.0/overview.md @@ -88,43 +88,6 @@ For details, run the [show-type](mtk_show-type) command.
-## Precautions - -### Empty String and NULL - -- Oracle '' = null - -- DB2 '' = null - -- MySQL '' != Null - -- PostgreSQL '' != Null - -- openGauss - - - Compatibility type A: '' = null - - Compatibility type PG: '' != null - -MTK processes databases according to the compatibility mode of the source and target databases. - -- '' = null does not process data. -- '' = null converts a string to '' when the column type is `NOT Null`. - -### Chr(0) 0x00 issue - -Special characters Chr(0)/0x00 can be inserted in DB2/Oracle/MySQL. - -However, it cannot be inserted in the postgres class database, and Chr(0) will be replaced with ''. - -### Time zone issue - -- Make sure that the migration server is in the same time zone as the application server. -- Make sure that the database nodes are in the same time zone. - -### CharSet - -
- ## Procedure Conversion MTK supports the following procedure conversion. diff --git a/product/zh/docs-mtk/v2.0/faqs.md b/product/zh/docs-mtk/v2.0/faqs.md index 213681cc..014fda99 100644 --- a/product/zh/docs-mtk/v2.0/faqs.md +++ b/product/zh/docs-mtk/v2.0/faqs.md @@ -44,3 +44,28 @@ date: 2021-09-14 |DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| |DB2 |GBK |VARCHAR(100 )|VARCHAR(100)|openGauss|GBK|PG| |DB2 |UTF8 |VARCHAR(100 )|VARCHAR(100)|openGauss|UTF8|PG| + +## 存在空字符串和NULL转换? + +- Oracle '' = null +- DB2 '' = null +- MySQL '' != Null +- PostgreSQL '' != Null +- openGauss + - A 兼容模式下 '' = null + - PG 兼容模式下 '' != null + +当目标数据库的处理方式和源数据库不一致时,MTK会根据列的属性进行数据转换. + +如列的数据为not null时转为`" "`,允许为null时转为null + +## 存在 Chr(0) 0x00 ? + +在DB2/Oracle/MySQL中可以插入Chr(0)/0x00特殊字符. + +但是在postgres类数据库中无法进行插入,迁移过程中Chr(0)会被替换成''. + +## 存在时区转换 ? + +- 迁移机器和应用服务器时区一致 +- 数据库主机时区一致 diff --git a/product/zh/docs-mtk/v2.0/overview.md b/product/zh/docs-mtk/v2.0/overview.md index dce87ac2..8477f598 100644 --- a/product/zh/docs-mtk/v2.0/overview.md +++ b/product/zh/docs-mtk/v2.0/overview.md @@ -86,39 +86,6 @@ MTK全称为 Database Migration Toolkit,是一个可以将Oracle/DB2/MySQL/ope | AlterSequence | 支持 | 同步序列最后值 | | CollStatistics | 支持 | 收集统计信息 | -## 注意事项 - -### 空字符串和NULL问题 - -- Oracle '' = null - -- DB2 '' = null - -- MySQL '' != Null - -- PostgreSQL '' != Null - -- openGauss - - - A 兼容模式下 '' = null - - - PG 兼容模式下 '' != null - -### Chr(0) 0x00 问题 - -在DB2/Oracle/MySQL中可以插入Chr(0)/0x00特殊字符. - -但是在postgres类数据库中无法进行插入,迁移过程中Chr(0)会被替换成''. - -### 时区问题 - -- 迁移机器和应用服务器时区一致 -- 数据库主机时区一致 - -### 字符集 - -
- ## 存储过程转换 MTK支持以下存储过程转换: -- Gitee