SharePlex如何從Oracle 11g CLOB中的XML轉換到目標端Oracle 19c 的SecureFile



今天朋友問了一個問題,SharePlex可以支援Oracle 11g CLOB中的XML轉換到目標端Oracle 19c Securefile?
首先認識一下什麼是SecureFile? SecureFileOracle 針對LOB改良後的資料型態,新增可以壓縮LOB資料的功能。

準備測試環境:
來源端: Oracle Linux 6.10 + Oracle 11.2.0.4 + SharePlex 9.2.1
create table test.XMLAA
(RECID VARCHAR2(255),
XMLRECORD sys.XMLTYPE)
XMLTYPE XMLRECORD STORE AS CLOB;

目標端: Oracle Linux 7.6 + Oracle 19.3 + SharePlex 9.2.5
create table test.XMLBB
(RECID VARCHAR2(255),
XMLRECORD sys.XMLTYPE)
XMLTYPE XMLRECORD STORE AS SECUREFILE BINARY XML;

SharePlex config file
測試過程:
在來源端使用下面語法新增資料
insert into test.XMLAA
values('AAAAAAAA','<?xml version="1.0" encoding="big5" ?>              
<catalog>                                                          
    <product>
        <pname>HP server</pname>                       
        <price currency="NT">50000</price>
        <mark>7% discount</mark>                                                    
    </product>
    <hr />
    <product>
        <pname>IBM Server</pname>
        <price currency="NT">100000</price>                     
        <mark>20% discount</mark>
    </product>
</catalog> ');
commit;
在來源端可以正常看到XML 資料

驗證目標端的資料型態
驗證目標端的資料
從結果可以看到正常轉換資料

補充資料:
接著在官方文件中找到SharePlex 9.2.5 release notes24頁說明。

1. XMLTYPE stored as BINARY is not supported when the storage is defined as SecureFile LOB with compressionSecureFile LOB without compression is supported

Binary XMLTYPE資料型態並且定義成可壓縮的SecureFile LOB是不支援,如果沒定義壓縮則支援。

2. Binary XMLTypes are not supported by Compare/Repair when the source and target character sets are different and require character set conversion

當來源和目標端的字元集不同時,不支援Binary XMLTYPE資料型態的 Compare/Repair功能。

4. Compare/Repair does not support comparison of XMLTYPE when the source and target have different storage clauses Compare/Repair only supports compare/repair when source and target are both stored as BINARY or both are stored as CLOB

只有當來源和目標端兩邊都是Binary或者兩邊都是CLOB,才支援Compare/Repair功能,如果一邊Binary一邊CLOB則不支援Compare/Repair功能。


留言

這個網誌中的熱門文章

MSSQL 瘦身 : 壓縮資料庫

[SAP] 什麼是SAP? R/3 and S/4 是什麼意思? 差別在哪? (勿轉臉書)

InTrust 自動幫您蒐集 AD 帳號的登入/登出紀錄,長時間保存並保護