OGG-Oracle 11.2.0.1 ->19.3 pdb 使用Ogg 同步版本相關問題學習整理


一、需求,Oracle Db 11.2.0.1 ->Db19.3 pdb 使用Ogg 同步

根據上述需求!

 

二、問題

這個需求取決於很多客戶想上19c了,ogg屬於可以0停機窗口|跨平台|跨字符集|跨數據庫版本,多個優點於一體的遷移升級方案!

使用Oracle Db 10.2.0.5                   <=>   Oracle Db 19.3,ogg 如何配置?

使用Oracle Db 11.2.0.1 ,ogg 11.2    <=>   Oracle Db 19.3 ,ogg 19.1 能否進行雙向同步?

使用Oracle Db 11.2.0.4                   <=>   Oracle Db 19.3,ogg 又如何配置呢?

 根據上述問題,查詢相關資料,對部分進行測試整理。

 

三、版本相關資料

https://blog.csdn.net/ghostliming/article/details/72830291
https://www.cnblogs.com/margiex/p/7865024.html
OGG-06221源容器數據庫需要Trail FORMAT 12.3或更高版本(文檔ID 2315957.1)    
兼容性級別為6的Pump abend-OGG-01332文件xxx與當前軟件版本的兼容性級別5不兼容。(Doc ID 2316837.1)    
兼容級別為6的錯誤OGG-01332的復制異常終止與當前軟件版本的兼容級別5不兼容。(文檔ID 2385520.1
GoldenGate Replicat abend with "OGG-01332 File dirdat\xx, with compatibility level 3, is not compatible with the
current software version's compatibility level of 2 (Doc ID 1451840.1) https:
//docs.oracle.com/en/middleware/goldengate/core/19.1/gclir/add-exttrail.html#GUID-C3330B6A-9514-4015-996E-2461BE36273D

3.1)19.1 ogg 官方文檔,描述12.2 DB版本OGG 最低版本兼容性

The following settings are supported for Oracle Database 12.2 and higher:

For Oracle Database 12.2 non-CDB or higher with compatibility set to 12.1, FORMAT RELEASE 12.2 or above is supported.

For Oracle Database 12.2 non-CDB or higher with compatibility set to 12.2, FORMAT RELEASE 12.2 or above is supported.

For Oracle Database 12.2 CDB/PDB or higher with compatibility set to 12.2, only FORMAT RELEASE values 12.3 or higher are supported.
This is due to the use of local undo for PDBs, which requires augmenting the transaction ID with the PDB number to ensure uniqueness
of trx IDs.

FOr DB >=12.2,compatibility <=12.2 AND NO PDB ,OGG 最低的format release 12.2!
上述版本 AND PDB ! 最低format release 12.3!!!

3.2) MOS 2315957.1,DB 12.2 PDB 使用OGG 能不能降低到12.2 ?

Source: Oracle Database 12.2.0.1.0 Multitenant - OGG version 12.3
Target: Oracle Database 12.1.0.2 - OGG version 12.2
Classic Replicat would abend with following message since Source version is higher
2017-10-04 20:56:16 ERROR OGG-01332 File ./dirdat/HIPOS/mb000000001, with compatibility level 6, is not compatible
with the current software version's compatibility level of 5. Modify the file writer's parameter file to generate the
appropriate format using the FORMAT LEVEL 5 option. Classic Extract and Pump configuration was changed on source to change the trail format to 12.2 so that Replicat doesn't error. Extract <Extract name> EXTTRAIL ./dirdat/ea, FORMAT RELEASE 12.2 Extract <Pump> RMTTRAIL ./dirdat/ra, FORMAT RELEASE 12.2 However doing so leads to following issues 1) Extract would error with following OGG-06221 Source container database requires trail FORMAT 12.3 or higher. 2) Pump would run fine although trail format still remains in 12.3 since Source Extract never was never able to convert the
format to 12.2 INFO OGG-01478 Output file ./dirdat/HIPOS/mb is using format RELEASE 12.3. SOLUTION CDB in RDBMS binary 12.2 requires trail format to be 12.3 due to features that are not guarded by db compatible, like local undo. Hence Extract has to use 12.3 format for trails when running against Oracle Database 12.2 with CDB/PDB
本例中DB 12.2 ,COM 12.2,PDB OGG 12.3 抽取進程,投遞進程版本都降低為12.2 !!! 但是復制進程報錯,提升版本level =6,需要降低為level 5才ok
mos給出了說法! pdb like local undo trail format to be 12.3 !!! 參數寫12.2沒有用!

3.3) 2316837.1,源端12.2,目標端12.3,低到高版本,低版本指定release 12.2 的情況

SYMPTOMS
While configure replication between 12.2.0.1.0 (source) and 12.3 (target) with the following "format release" parameter in 
the parameter files and then
while starting pump fails with the following errors and it is an abended: Extract: EXTTRAIL dirdat/ex, format release 12.2 Pump: RMTTRAIL RMTTRAIL dirdat/ms, format release 12.2 017-10-11 09:35:04 INFO OGG-06569 Remote Collector/Server version 12.3 receiving data is a different version than this
Extract 12.2 sending data. 2017-10-11 09:35:09 INFO OGG-01226 Socket buffer size set to 27985 (flush size 27985). 2017-10-11 09:35:09 INFO OGG-01055 Recovery initialization completed for target file dirdat/ms000000000, at RBA 1379. 2017-10-11 09:35:09 INFO OGG-01478 Output file dirdat/ms is using format RELEASE 12.2. ............................................... 2017-10-11 09:35:09 ERROR OGG-01332 File dirdat/ms000000000, with compatibility level 6, is not compatible with the current
software version's compatibility level of 5. Modify the file writer's parameter file to generate the appropriate format using
the FORMAT LEVEL 5 option. 2017-10-11 09:35:09 ERROR OGG-01668 PROCESS ABENDING. GGSCI (GZW-WJ-DB) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT ABENDED <PUMP-NAME> 00:00:00 00:25:23 EXTRACT RUNNING <EXTRACT-NAME> 00:00:00 00:00:09 CAUSE This can happen if you use parameter FORMAT RELEASE 12.2 when source GG version is 12.2(Lower) and target GG version is 12.3(higher). SOLUTION To resolve the issue, You do not have to use FORMAT RELEASE parameter when source GG version (Example: 12.2) is lower then target GG version(Example: 12.3) so remove the 'FORMAT RELEASE 12.2' parameter from extract/pump parameter file and then re-start the
process. NOTE: In the images and
/or the document content above, the user information and data used represents fictitious data from the
Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead,
is purely coincidental
and not intended in any manner.

這個案例也很有意思!
12.2.0.1.0 (source) and 12.3 (target) with the following "format release" 
就是源端ogg 版本12.2.0.1 ->目標端ogg 12.3,低版本到高版本,並且抽取投遞進程中都使用了版本release 12.2!!! 但是復制進程報錯!
官方的意思就是,低版本的文件,到高版本Ogg去應用,無需使用版本參數,畫蛇添足! 重點,低到高無需進行版本轉換!

 

3.4 ) 1451840.1, Ogg 11.2 源端抽取的trail的文件ogg 11.1  , 10.4無法解析

GoldenGate Replicat abend with "OGG-01332 File dirdat\xx, with compatibility level 3, is not compatible with the current
software version's compatibility level of 2 (Doc ID 1451840.1) Oracle GoldenGate - Version 10.0.0.0 and later
SYMPTOMS Replicat abending with the following error after a source OGG upgrade. 2012-04-06 09:21:56 ERROR OGG-01332 File dirdat\pj000088, with compatibility level 3, is not compatible with the
current software version's compatibility level of 2. Modify the file writer's parameter file to generate the appropriate
format using the FORMAT LEVEL 2 option. OR 2012-04-05 19:49:22 GGS ERROR ZZ-0QE File header failed to parse tokens. File dirdat\pj000025, last offset 905, data:
905: 000000013A00000200003B000004000000013C0000140000001014141414141414141414141411141414330000773000000A0008454
F42415232363131000002000332000002000B33000002000234000002000135000002000036000002000137000041003F56657273696F6E2031
312E322E312E302E30204F4747434F5245. The same error could happen when doing a initial load with different OGG versions CAUSE The trail formats between OGG v11.
2 and old OGG versions ( v11.1 / 10.4)are different and so a replicat running
with OGG v11.1 / 10.4 cannot read a trail file written by 11.2 extract / pump extract. SOLUTION If the target OGG version is lower than 11.2 and the source is OGG v11.2, we need to use the FORMAT RELEASE parameter
in the master extract(Exttrail) and the pump extract( rmttrail). For ex: Assume that the source is running with OGG v11.2 and the target is running with OGG v11.1, we need the following In master extract exttrail dirdat/pj, format release 11.1 In pump extract RMTTRAIL dirdat\jp, format release 11.1 --------- If the error is been encountered when doing the initial load, we need to add the "Format Release" parameter with the
RMTFILE or RMTTASK accordingly. Please refer the OGG reference guide to more about the FORMAT RELEASE parameter and its usage

總結就是如果源端OGG 11.2,目標端OGG 11.1 OR 10.4無法讀取11.2的trail文件,oracle ogg在11.2版本進行了調整,trail文件格式不一樣了,如果需要處理!
本例中需要降低版本trail到11.1 !!!

 

3.5) 2385520.1,Db12.2c Ogg 12.3 to Db11g Ogg 12.2 ,同步是否有什么問題???

SYMPTOMS
Setting up a Bidirectoinal replication between Databases 11.2.0.4.0 and 12.2.0.1.0 multitenant database
The Oracle Goldengate versions used:
Oracle GoldenGate Capture for Oracle
Version 12.3.0.1.2 OGGCORE_12.3.0.1.0_PLATFORMS_171208.0005_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 9 2017 01:02:18
Oracle GoldenGate Delivery for Oracle
Version 12.2.0.2.2 OGGCORE_12.2.0.2.0_PLATFORMS_170630.0419_FBO
AIX 6, ppc, 64bit (optimized), Oracle 11g on Jul 3 2017 14:14:26
The replicat that is set-up for 11.2.0.4 database abends with error: ERROR OGG-01332 File /dirdat/rt000000000, 
with compatibility level 6, is not compatible with the current software version's compatibility level of 5.
Modify the file writer
's parameter file to generate the appropriate format using the FORMAT LEVEL 5 option. CAUSE OGG configured on source DB is 12.3 and on target database is 12.2. The trail files which are written in 12.3 format
cannot be used by the target. CDB
in RDBMS binary 12.2 requires trail format to be 12.3. Hence Extract has to use 12.3 format for trails when running
against Oracle Database 12.2 with CDB/PDB This format cannot be used by the target replicat which is on version 12.2 SOLUTION The recommended solution would be to use OGG 12.3 on both source and target environments. If the use of OGG 12.3 on the target is not feasible due to certification limitations, you could consider one of the
below options to replicat to the target.
1) Set up a remote replicat to replicat changes from the 12.2 multitenant database to the 11.2 target database. 2) Set up a middle tier database. Use this database to setup a downstream mining environment to extract data from the 12.2 CDB.
OGG 12.2 can be used on the downstream mining database and the trails in 12.2 format can be transported to the source 11.2 database
for processing. 3) Set source redo compatibility on 12.2 DB to 12.1. Once the redo compatibility is 12.1, you can use OGG 12.2 with the 12.2 DB
as well
本例中:Db12.2c Ogg 12.3 to Db11g Ogg 12.2 復制進程abend提示 版本level6 ,需要降低1個版本到Level 5
官方建議:
1.都使用同一個OGG 12.3 這樣就不存在Ogg產生的trail文件版本問題了;
2.對抽取進程的12.3 OGG軟件上面,配置一個遠程復制,這樣就不存在版本的問題了;
3.配置一個中間服務器,第一條鏈路 DB 12.2 Ogg 12.3 -> 中間庫DB 11g or 12c;
第二條鏈路 DB 11g or 12c OGG 12.2 ->目標庫11.2.0.4 ;
4.將數據庫兼容性版本設置為12.1 !!!
Set source redo compatibility on 12.2 DB to 12.1

 

四、場景測試

4.1 Source Db 19.3 Ogg 19.1 toTarget  Db11.2.0.4 Ogg 11.1  

ERROR   OGG-00664  OCI Error during OCIServerAttach (status = 12162-Error while trying to retrieve text for error ORA-12162).
$ oerr ora 12162
12162, 00000, "TNS:net service name is incorrectly specified"
// *Cause:  The connect descriptor corresponding to the net service name in
// TNSNAMES.ORA or in the directory server (Oracle Internet Directory) is
// incorrectly specified.
// *Action: If using local naming make sure there are no syntax errors in
// the corresponding connect descriptor in the TNSNAMES.ORA file. If using
// directory naming check the information provided through the administration
// used for directory naming.

報錯,配置文件中沒有使用tns遠程的方式! 無解

4.2 Source Db 19.3 Ogg 19.1 toTarget  Db11.2.0.4 Ogg 12.2

> start ext_t1
EXTTRAIL /u01/ogg1/base/dirdat/t2utf8/t1/t1,format release 12.2
2021-05-12 04:26:07  ERROR   OGG-06221  Source container database requires trail FORMAT 12.3/18.1 or higher.
抽取進程投遞進程降低版本到12.3,復制進程依然報錯!

ERROR OGG-01332 File /home/oggtest2/base/dirdat/t1/t1000000000, with compatibility level 7, is not compatible with the current sof
tware version's compatibility level of 5. Modify the file writer's parameter file to generate the appropriate format using the FORMAT LEVEL 5 option.

 

4.3 Source Db 19.3 Ogg 19.1 toTarget  Db11.2.0.4 Ogg 12.3

 源端

EXTTRAIL /u01/ogg1/base/dirdat/t2utf8/t1/t1 ,FORMAT RELEASE 12.3
rmttrail /home/oggtest3/base/dirdat/t1/t1 ,FORMAT 12.3
> unregister extract ext_t1 database
> register extract ext_t1 database CONTAINER(pdbodb)
OGG-01232 Receive TCP params error: TCP/IP error 104 (Connection reset by peer), endpoint:
> alter EXTRACT DP_T3,etrollover

抽取進程、投遞進程均進行版本降級處理!   抽取進程遇到600無處理方法,刪除重建進程重新注冊;

投遞進程投遞寫入可能需要使用參數重新寫入,版本修改后,寫入的文件可能需要重新覆蓋寫入目標端

需要alter 指定使用版本后的文件,否則默認還是使用之前老的版本,則報錯
ERROR   OGG-02598  File /home/oggtest3/base/dirdat/t1/t1000000000, with trail format release LEVEL 7, is not compatible
with the current software version
's trail file format release RELEASE 12.3. Modify the file writer's parameter file to
generate the
appropriate format using the FORMAT RELEASE RELEASE 12.3 option. GGSCI (t1) 9> alter REPLICAT rep_t3,extseqno 1,extrba 0

 

4.4 Source Db 10.2.0.5 Ogg 11.1 toTarget  Db19.2 Ogg 19.1

 

復制進程參數需要使用
assumetargetdefs 否則可能會報OGG-00423
OGG可以正向傳輸!!! 低版本->高版本,沒啥子問題,沒毛病!

 

五、OGG Trail文件從6位轉換為9位,我們需要注意些什么,什么版本引入的改變?

5.1) OGG什么版本Trail文件位數轉換為9位?

ogg11.1
t1000000

ogg19.1
ta000000000
Goldengate Replicat Process Abending With ERROR OGG-01332 File <filename>, with compatibility level 6, is not compatible
with the current software version's compatibility level of 4 (Doc ID 2538448.1) Oracle GoldenGate - Version 12.1.2.1.0 to 18.1.0.0.0 [Release 12.1 to 12.2] Goldengate Replicat Process Abending With ERROR OGG-01332 File <filename>, with compatibility level 6, is not compatible
with the current software version's compatibility level of 4 CAUSE Customer was using lower target OGG version than source OGG version This error can occur for any OGG version if target OGG version is lower than source , only compatibility value will change
for different OGG versions SOLUTION Please add FORMAT RELEASE parameter in extract or pump Additionally if target OGG version is 12.1 or prior , please add TRAIL_SEQLEN_6D parameter in GLOBALS file of source GGSCI ,
logout/login of ggsci , restart manager and re-create extract / pump process


這篇文檔告訴了我們,第一確認了上述第四部分,OGG目標端比源端OGG版本低的情況下,源端必須降低版本到目標端相同的版本,才能進行復制使用! 反向低到高不存在啥子問題!

另外一個特性就是OGG12.1以及它之前,抽取的位數還是6位! 如果要給12.1以及更早版本OGG使用,除了降低版本兼容性之外! 還需要全局參數添加!
TRAIL_SEQLEN_6D 已確保,抽取進程抽取的位數使用6位!!!

 

5.2) OGG12.1 ->OGG12.2 復制進程不報錯但是不同步數據!

Replicat checkpoint shows 9 digit trail file instead of 6 digits when source OGG version is 12.1.x and target
OGG version is 12.2.x (Doc ID 2120995.1) SYMPTOMS On : 12.2.0.1.0 version, 1 - Oracle DB backend ACTUAL BEHAVIOR --------------- Replicat is running but not applying any data when replicat from source OGG version 12.1.2.0.x to 12.2.0.x EXPECTED BEHAVIOR ----------------------- Replicat is running but not applying any data to target side. CAUSE This is caused due to following setup : Source is 12.1 and target is 12.2. Pump generate 6 digit trail seqno and
replicat was configured to use 9 digit. When source is 12.1 and target is 12.2. When adding the replicat, the checkpoint should be take 6 digit trail file. SOLUTION 1. edit params ./GLOBALS --Add the following parameter and save the file TRAIL_SEQLEN_6D 2. stop mgr 3. exit 4. ggsci>start mgr 5. dblogin userid , password 6. Add the replicat ADD REPLICAT <replicat_name> EXTTRAIL /bscs_dumps/oracle/ggtrails/dirdat/bt ,checkpointtable ggadmin.checkpoint. The above command will make the replicat to start from seqno 0 and RBA 0. If seqno is not available, you may need to
alter the replicat to least available seqno. Eg: If the trail file available is bt000001, then you need to alter the
replicat like the following dblogin userid , password alter replicat
<replicat_name>, extseqno 1, extrba 0 NOTE: Customers running GoldenGate for Teradata may need to perform the same steps a couple of times before it works. If steps do not work the first time then logout ggsci prompt, enter ggsci prompt, execute steps above again and check
point accepts
6 digit trail file. NOTE:1232303.1 - Oracle GoldenGate Best Practice: NFS Mount options for use with GoldenGate

正常情況下,OGG源端低版本,OGG目標端高版本應用是沒有任何問題對吧?
但是12.1=>12.2 ogg是,復制進程不報錯,但是不應用數據! 什么原因呢? 12.1抽取的文件格式6位,12.2OGG版本識別的文件是Trail 9位!
解決辦法就是目標端12.2 OGG mgr進程編輯參數,降低自己識別的位數!TRAIL_SEQLEN_6D

 

5.3)關於位數問題,我們需要關注什么?

第一、對於12.1->12.2 ogg的同步需要參考MOS;

第二、由於4部分進行了測試11.1 ogg ->19.1 ogg同步無異常! 因此可以說明Oracle在較高的版本已經自己修復了這個位數不同導致,低->高版本不兼容的問題!

第三、基於上述情況,只要不報錯就不處理!

低到高,目標端高版本的OGG軟件,global參數設置降低為6位,應用trail文件!

高到低,源端設置global,降低為6位進行抽取及投遞,目標端低版本本身就是6位無需調整;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM