[2021-01-06] Oracle19C RAC 搭建OGG聚合模式同步數據到11.2.0.4詳細記錄


[2021-01-06] Oracle19C RAC 搭建OGG聚合模式同步數據到11.2.0.4詳細記錄

qxy0503 2021-01-06 16:18:58 1133 收藏 2
分類專欄: goldengate oracle 文章標簽: ogg升級 19c到11g ogg搭建 19c RAC 聚合抽取
版權

goldengate
同時被 2 個專欄收錄
4 篇文章0 訂閱
訂閱專欄

oracle
48 篇文章0 訂閱
訂閱專欄
環境說明
源端19.7 RAC OGG版本19.1
node1: 192.168.40.160
node2: 192.168.40.161

RAC安裝OGG使用的是ACFS方式,ACFS搭建可以參考:
https://blog.csdn.net/m15217321304/article/details/112236321

19.1OGG在19.7RAC上面安裝可以參考:

https://blog.csdn.net/m15217321304/article/details/112245469

目標端11.2.0.4單實例 OGG版本12.1(12.1搭建會有兼容問題,最后把12.1升級為19.1)
IP:192.168.40.170

--//此次搭建過程為抽取源端的PDB1的數據

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jan 5 17:15:12 2021
Version 19.7.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL>

SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ WRITE NO
SQL>
--//在pdb1創建被抽取的用戶pg

SQL> alter session set container =PDB1;

Session altered.

SQL>
SQL> create user pg identified by postgres;

User created.

SQL> show user
USER is "SYS"
SQL> grant resource,connect to pg;

Grant succeeded.

SQL>
--//使用pg用戶創建兩張測試表T1、T2

SQL> show user
USER is "PG"
SQL> create table t1(id int);

Table created.

SQL> create table t2(id int, name varchar2(20));

Table created.

SQL>
--//修改tns文件,通過tns可以直接連接pdb1的pg用戶,tnsnames.ora文件添加如下內容

PDB1=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dm-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
--//連接測試

[oracle@dm01 admin]$ sqlplus pg/postgres@PDB1

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jan 5 17:34:51 2021
Version 19.7.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL>
--//創建goldengate數據庫用戶(源和目標)
create user goldengate identified by goldengate;
grant connect,resource to goldengate;
grant execute on utl_file to goldengate;

--//便於測試賦予DBA權限
grant dba to goldengate;


SQL> alter session set container=PDB1;

Session altered.

SQL> create user goldengate identified by goldengate;

User created.

SQL> grant connect,resource to goldengate;

Grant succeeded.

SQL> grant execute on utl_file to goldengate;

Grant succeeded.

SQL> grant dba to goldengate;

Grant succeeded.

SQL>
--//源端配置MGR,參數文件如下:

PORT 7809
DYNAMICPORTLIST 7800-7900
AUTORESTART EXTRACT *, RETRIES 5, WAITMINUTES 2, RESETMINUTES 60
PURGEOLDEXTRACTS /ogg/ogg/trails/w1*, USECHECKPOINTS, MINKEEPFILES 10
PURGEDDLHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5, FREQUENCYMINUTES 30
PURGEMARKERHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5, FREQUENCYMINUTES 30
lagreporthours 1
laginfominutes 30
lagcriticalminutes 45
--//注冊logminer server DB

GGSCI (dm01 as goldengate@qxy1/PDB1) 11> dblogin userid goldengate@PDB1 password goldengate


GGSCI (dm01 as goldengate@qxy1/PDB1) 12> register extract exint database

2021-01-06 10:40:20 ERROR OGG-08223 ERROR: One or more containers must be specified when registering Extract for a container database.


GGSCI (dm01 as goldengate@qxy1/PDB1) 13>
參考MOS
ERROR: One Or More Containers Must Be Specified When Registering Extract For A Container Database. (Doc ID 2453732.1)

--//報錯的意思就是需要創建一個全局用戶,就是c##開頭的,跨所有PDB的

--//創建一個全局用戶

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> create user c##goldengate identified by goldengate;

User created.

SQL> exec dbms_goldengate_auth.grant_admin_privilege('C##GOLDENGATE',container=>'all');

PL/SQL procedure successfully completed.

SQL>
SQL> grant connect, resource to c##goldengate container=all;

Grant succeeded.

SQL>
--//賦值權限的時候,如果不加container=all,連接測試會提示ORA-01045: user C##GOLDENGATE lacks CREATE SESSION privilege; logon denied

--//測試連接PDB1

[oracle@dm01 ogg]$ sqlplus c##goldengate/goldengate@PDB1

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 6 10:47:33 2021
Version 19.7.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL>
--//ggsci上面測試

[oracle@dm01 ogg]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.



GGSCI (dm01) 1> dblogin userid goldengate@PDB1 password goldengate
Successfully logged into database PDB1.

GGSCI (dm01 as goldengate@qxy2/PDB1) 2>
--//再次注冊抽取進程

GGSCI (dm01) 3> dblogin userid c##goldengate,password goldengate
Successfully logged into database CDB$ROOT.

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 5> REGISTER EXTRACT EXTORA DATABASE CONTAINER(PDB1)

2021-01-06 11:14:22 ERROR OGG-02060 The Oracle mining database is not configured properly to support integrated capture. The following configuration error must be fixed: Operation not supported because enable_goldengate_replication is not set to true.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 6>
--//上面這步操作的時候,注冊的extract寫的是EXTORA,下面會因為這步不一致導致了錯誤

--//設置enable_goldengate_replication為true

SQL> set lin 200
SQL> show parameter enable_goldengate_replication

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
enable_goldengate_replication boolean FALSE
SQL>
SQL> alter system set enable_goldengate_replication=TRUE;

System altered.
--//再次注冊提示表空間沒有權限

GGSCI (dm01) 1> dblogin userid c##goldengate,password goldengate
Successfully logged into database CDB$ROOT.

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 2> REGISTER EXTRACT EXTORA DATABASE CONTAINER(PDB1)

2021-01-06 11:17:29 ERROR OGG-08221 Cannot register or unregister EXTRACT EXTORA because of the following SQL error: OCI Error ORA (status = 1950-ORA-01950: no privileges on tablespace 'USERS'
ORA-06512: at "SYS.DBMS_STREAMS_ADM_IVK", line 766
ORA-06512: at "SYS.DBMS_AQADM", line 415
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 3491
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 4059
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 3103
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 327
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 135
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 227
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 286
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 3074
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 3801
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 3469
ORA-06512: at "SYS.DBMS_AQADM", line 406
ORA-06512: at "SYS.DBMS_STREAMS_ADM_IVK", line 635
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 269
ORA-06512: at line 1
).
--//把users的表空間權限賦值給c##goldengate用戶

//第一次授權報錯
SQL> alter user c##goldengate quota unlimited on users;
alter user c##goldengate quota unlimited on users
*
ERROR at line 1:
ORA-65048: error encountered when processing the current DDL statement in
pluggable database PDB1
ORA-00959: tablespace 'USERS' does not exist


SQL>
--//加上container再次設置
alter user c##goldengate quota unlimited on users container=current;


SQL> alter user c##goldengate quota unlimited on users container=current;

User altered.

SQL>
解決參考:
ORA-65048 ORA-01918 error with Create User or Alter User in CDB (Doc ID 2105890.1)

--//再次注冊成功


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 2> REGISTER EXTRACT EXTORA DATABASE CONTAINER(PDB1)

2021-01-06 11:25:00 INFO OGG-02003 Extract EXTORA successfully registered with database at SCN 11788516.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 3>
--//對應數據庫alert日志如下

PDB1(3):Wed Jan 06 11:24:44 2021
PDB1(3):Logminer Bld: Build started
PDB1(3):Wed Jan 06 11:24:44 2021
PDB1(3):Logminer Bld: Lockdown Complete. DB_TXN_SCN is 0 11788516 LockdownSCN is 11788516
2021-01-06T11:24:45.426903+08:00
PDB1(3):Wed Jan 06 11:24:45 2021
PDB1(3):Logminer Bld: Done
2021-01-06T11:24:45.427500+08:00
ALTER SYSTEM SWITCH ALL LOGFILE start (qxy1)
2021-01-06T11:24:52.972062+08:00
GoldenGate Capture OGG$CAP_EXTORA CAPTURE Created
2021-01-06T11:24:53.140285+08:00
GoldenGate CAPTURE OGG$CAP_EXTORA: Start SCN: 11788516 (0x00b3e0e4.00000000)
2021-01-06T11:24:53.140436+08:00
GoldenGate CAPTURE OGG$CAP_EXTORA: First SCN: 11788155 (0x00b3df7b.00000000)
2021-01-06T11:24:53.140506+08:00
GoldenGate CAPTURE OGG$CAP_EXTORA: Required Checkpoint SCN: 0 (0x00000000.00000000)
2021-01-06T11:24:53.140544+08:00
GoldenGate CAPTURE OGG$CAP_EXTORA: Captured SCN: 0 (0x00000000.00000000)
2021-01-06T11:24:53.140589+08:00
GoldenGate CAPTURE OGG$CAP_EXTORA: Applied SCN: 0 (0x00000000.00000000)
CAPTURE OGG$CAP_EXTORA: Capture Type: LOCAL
CAPTURE OGG$CAP_EXTORA: Logminer Id: 1
CAPTURE OGG$CAP_EXTORA: Source Database: PDB1
CAPTURE OGG$CAP_EXTORA: Source Root Name: QXY
2021-01-06T11:24:54.740208+08:00
Resize operation completed for file# 1, old size 1157120K, new size 1167360K
2021-01-06T11:24:55.487363+08:00
GoldenGate Apply: OGG$EXTORA APPLY Created
2021-01-06T11:24:56.749693+08:00
APPLY OGG$EXTORA: Apply User: C##GOLDENGATE
2021-01-06T11:24:56.749758+08:00
APPLY OGG$EXTORA: Apply Tag: 00
2021-01-06T11:24:57.904076+08:00
GoldenGate CAPTURE OGG$CAP_EXTORA:Setting XOUT_CLIENT_EXISTS to Y
2021-01-06T11:24:58.513969+08:00
GoldenGate CAPTURE CP01 for OGG$CAP_EXTORA started with pid=101, OS id=71774
2021-01-06T11:24:58.697817+08:00
Streams CAPTURE OGG$CAP_EXTORA: Start SCN: 11788516 (0x00b3e0e4.00000000)
2021-01-06T11:24:58.697867+08:00
Streams CAPTURE OGG$CAP_EXTORA: First SCN: 11788155 (0x00b3df7b.00000000)
2021-01-06T11:24:58.697992+08:00
Streams CAPTURE OGG$CAP_EXTORA: Required Checkpoint SCN: 0 (0x00000000.00000000)
2021-01-06T11:24:58.698066+08:00
Streams CAPTURE OGG$CAP_EXTORA: Captured SCN: 0 (0x00000000.00000000)
2021-01-06T11:24:58.698105+08:00
Streams CAPTURE OGG$CAP_EXTORA: Applied SCN: 0 (0x00000000.00000000)
CAPTURE OGG$CAP_EXTORA: Capture Type: LOCAL
CAPTURE OGG$CAP_EXTORA: Logminer Id: 1
CAPTURE OGG$CAP_EXTORA: Source Database: PDB1
CAPTURE OGG$CAP_EXTORA: Source Root Name: QXY
--//添加參數文件

add extract exint,integrated tranlog,begin now, threads 2

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 4> add extract exint,integrated tranlog,begin now, threads 2
ERROR: THREADS is not allowed for INTEGRATED extract.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 5>

--//去掉threads
GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 7> add extract exint,integrated tranlog,begin now
EXTRACT (Integrated) added.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 8> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
EXTRACT STOPPED EXINT 00:00:00 00:00:05


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 9>
--//編輯參數

edit params exint
extract exint
setenv (ORACLE_SID = "qxy1")
setenv (NLS_LANG = "AMERICAN_AMERICA.AL32UTF8")
userid c##goldengate, password goldengate
TRANLOGOPTIONS INTEGRATEDPARAMS(parallelism 2)
TRANLOGOPTIONS GETCTASDML
DDL INCLUDE MAPPED
exttrail /ogg/ogg/trails/w1
discardfile /ogg/ogg/dirdat/exint.dsc, append, megabytes 100
getupdatebefores
nocompressdeletes
nocompressupdates
--LOGALLSUPCOLS
dboptions allowunusedcolumn
fetchoptions nousesnapshot
fetchoptions fetchpkupdatecols

table pg.*;
--//啟動抽取進程失敗

Source Context :
SourceModule : [ggapp.wildcard]
SourceID : [../gglib/ggapp/wildcard.c]
SourceMethod : [WILDCARD_get_entry]
SourceLine : [2229]
ThreadBacktrace : [12] elements
: [/ogg/ogg/libgglog.so(CMessageContext::AddThreadContext())]
: [/ogg/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
: [/ogg/ogg/libgglog.so(_MSG_String_QualTableName(CSourceContext*, int, char const*, ggs::gglib::ggapp::CQu
alDBObjName<(DBObjType)1> const&, CMessageFactory::MessageDisposition))]
: [/ogg/ogg/extract()]

...skipping one line
: [/ogg/ogg/extract()]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain())]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::Threa
dArgs*))]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/ogg/extract(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/ogg/ogg/extract()]

2021-01-06 12:37:36 ERROR OGG-02636 The TABLE specification 'table pg.*' for the source table pg.* does not include a catalog nam
e. The database requires a catalog name.

2021-01-06 12:37:36 ERROR OGG-01668 PROCESS ABENDING.
--//這個報錯就是前面的參數文件沒有設置SOURCECATALOG導致,可以參考
https://docs.oracle.com/en/middleware/goldengate/core/19.1/oracle-db/configuring-oracle-goldengate-multitenant-container-database-1.html#GUID-26AFC906-E67D-448E-93EC-FE2A54679793

 

--//添加SOURCECATALOG參數之后,再次啟動

GGSCI (dm01) 20> view params exint

extract exint
setenv (ORACLE_SID = "qxy1")
setenv (NLS_LANG = "AMERICAN_AMERICA.AL32UTF8")
userid c##goldengate, password goldengate
TRANLOGOPTIONS INTEGRATEDPARAMS(parallelism 2)
TRANLOGOPTIONS GETCTASDML
DDL INCLUDE MAPPED
exttrail /ogg/ogg/trails/w1,FORMAT RELEASE 12.2
discardfile /ogg/ogg/dirdat/exint.dsc, append, megabytes 100
getupdatebefores
nocompressdeletes
nocompressupdates
--LOGALLSUPCOLS
dboptions allowunusedcolumn
fetchoptions nousesnapshot
fetchoptions fetchpkupdatecols

SOURCECATALOG PDB1
table pg.*;


GGSCI (dm01) 21>
--//啟動再次報錯

Source Context :
SourceModule : [er.redo.oraxo]
SourceID : [er/redo/oracle/redooraix.c]
SourceMethod : [validateConfig]
SourceLine : [11612]
ThreadBacktrace : [15] elements
: [/ogg/ogg/libgglog.so(CMessageContext::AddThreadContext())]
: [/ogg/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
: [/ogg/ogg/libgglog.so(_MSG_(CSourceContext*, int, CMessageFactory::MessageDisposition))]
: [/ogg/ogg/extract()]
: [/ogg/ogg/extract(RedoAPI::createInstance(ggs::gglib::ggdatasource::DataSource*, ggs::gglib::ggapp::Repli
cationContext*))]

...skipping one line
: [/ogg/ogg/extract(ggs::gglib::ggapp::ReplicationContext::establishStartPoints(char, ggs::gglib::ggdatasou
rce::DataSourceParams const&))]
: [/ogg/ogg/extract(ggs::gglib::ggapp::ReplicationContext::initializeDataSources(ggs::gglib::ggdatasource::
DataSourceParams&))]
: [/ogg/ogg/extract()]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain())]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::Threa
dArgs*))]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/ogg/extract(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/ogg/ogg/extract()]

2021-01-06 12:41:33 ERROR OGG-02022 Logmining server does not exist on this Oracle database.

2021-01-06 12:41:33 ERROR OGG-01668 PROCESS ABENDING.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 17>
參考:
ERROR OGG-02022 Logmining server does not exist on this Oracle database. (Doc ID 1525272.1)
--//檢查發現extract名字有問題,剛開始注冊的時候是EXTORA,抽取進程為exint,重新注冊為exint(所以注冊的名字要和抽取的名字一致)

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 17> REGISTER EXTRACT EXINT DATABASE CONTAINER(PDB1)

2021-01-06 12:47:06 INFO OGG-02003 Extract EXINT successfully registered with database at SCN 11842588.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 18>
--//再次啟動抽取進程,啟動正常

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 24> view report exint


***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:58

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.

Starting at 2021-01-06 12:47:34
***********************************************************************

Operating System Version:
Linux
Version #1 SMP Thu Oct 29 17:29:29 EDT 2015, Release 3.10.0-327.el7.x86_64
Node: dm01
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited

Process id: 87038

Description:

***********************************************************************
** Running with the following parameters **
***********************************************************************

2021-01-06 12:47:34 INFO OGG-03059 Operating system character set identified as UTF-8.

2021-01-06 12:47:34 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.

2021-01-06 12:47:34 INFO OGG-02095 Successfully set environment variable ORACLE_SID=qxy1.

2021-01-06 12:47:34 INFO OGG-02095 Successfully set environment variable NLS_LANG=AMERICAN_AMERICA.AL32UTF8.

2021-01-06 12:47:34 INFO OGG-01360 EXTRACT is running in Integrated mode.
extract exint
setenv (ORACLE_SID = "qxy1")
setenv (NLS_LANG = "AMERICAN_AMERICA.AL32UTF8")
userid c##goldengate, password ***
TRANLOGOPTIONS INTEGRATEDPARAMS(parallelism 2)
TRANLOGOPTIONS GETCTASDML
DDL INCLUDE MAPPED
exttrail /ogg/ogg/trails/w1
discardfile /ogg/ogg/dirdat/exint.dsc, append, megabytes 100
getupdatebefores
nocompressdeletes
nocompressupdates
dboptions allowunusedcolumn
fetchoptions nousesnapshot
fetchoptions fetchpkupdatecols
SOURCECATALOG PDB1
table pg.*;

2021-01-06 12:47:40 INFO OGG-02623 Default source catalog name PDB1 will be used for source table name pg.* mapping.

2021-01-06 12:47:41 INFO OGG-01635 BOUNDED RECOVERY: not used. NORMAL RECOVERY only used due to altered checkpoint.

2021-01-06 12:47:41 INFO OGG-01815 Virtual Memory Facilities for: BR
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/ogg/ogg/BR/EXINT.

Bounded Recovery Parameter:
BRINTERVAL = 4HOURS
BRDIR = /ogg/ogg/

2021-01-06 12:47:41 INFO OGG-01851 filecaching started: thread ID: 140049302783744.

2021-01-06 12:47:41 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/ogg/ogg/dirtmp.

2021-01-06 12:47:41 INFO OGG-25340
Database Version:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production.

2021-01-06 12:47:41 INFO OGG-25341
Database Language and Character Set:
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "AL32UTF8".

2021-01-06 12:47:47 INFO OGG-06604 Database QXY CPU info: CPU Count 4, CPU Core Count 4, CPU Socket Count 2.

2021-01-06 12:47:47 INFO OGG-06618 Database QXY Platform: Linux x86 64-bit.



GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 25> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
EXTRACT RUNNING EXINT 00:00:00 00:17:20


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 26>
--//一會又abend,發現是配置路徑沒有修改 忘記創建本地trail文件, 創建本地trail文件

2021-01-06 12:48:48 ERROR OGG-01044 The trail '/ogg/ogg/trails/w1' is not assigned to extract 'EXINT'. Assign the trail to the ex
tract with the command "ADD EXTTRAIL/RMTTRAIL /ogg/ogg/trails/w1, EXTRACT EXINT".

2021-01-06 12:48:48 ERROR OGG-01668 PROCESS ABENDING.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 28> ADD EXTTRAIL/RMTTRAIL /ogg/ogg/trails/w1, EXTRACT EXINT
ERROR: Invalid command.

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 29> ADD EXTTRAIL /ogg/ogg/trails/w1, EXTRACT EXINT
EXTTRAIL added.

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 30>
--//重新啟動正常

--//pdb1中的pg用戶插入數據測試

[oracle@dm01 ogg]$ sqlplus pg/postgres@PDB1

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 6 12:52:29 2021
Version 19.7.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

Last Successful login time: Wed Jan 06 2021 10:39:33 +08:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL> show user
USER is "PG"
SQL> show con_name

CON_NAME
------------------------------
PDB1
SQL> desc t1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(38)

SQL> insert into t1 values (10);

1 row created.

SQL> commit;

Commit complete.

SQL>
--//查看抽取進程,抽取成功

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 35> stats exint

Sending STATS request to EXTRACT EXINT ...

Start of Statistics at 2021-01-06 12:54:11.

DDL replication statistics (for all trails):

*** Total statistics since extract started ***
Operations 0.00
Mapped operations 0.00
Unmapped operations 0.00
Other operations 0.00
Excluded operations 0.00

Output to /ogg/ogg/trails/w1:

Extracting from PDB1.PG.T1 to PDB1.PG.T1:

*** Total statistics since 2021-01-06 12:53:55 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Daily statistics since 2021-01-06 12:53:55 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Hourly statistics since 2021-01-06 12:53:55 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Latest statistics since 2021-01-06 12:53:55 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

End of Statistics.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 36>
--//在RAC的2節點 插入一條數據

[oracle@dm02 ~]$ o

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 6 13:58:29 2021
Version 19.7.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL> set lin 200
SQL> show parameter instance

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
active_instance_count integer
cluster_database_instances integer 2
instance_abort_delay_time integer 0
instance_groups string
instance_mode string READ-WRITE
instance_name string qxy2
instance_number integer 2
instance_type string RDBMS
open_links_per_instance integer 4
parallel_instance_group string
SQL> alter session set container=PDB1;

Session altered.

SQL> conn pg/postgres@PDB1
Connected.
SQL> select * from t1;

ID
----------
10

SQL> insert into t1 values (11);

1 row created.

SQL> commit;

Commit complete.

SQL>
--//在實例1查看exint抽取進程,發現數據已經抽取到

GSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 36> stats exint

Sending STATS request to EXTRACT EXINT ...

Start of Statistics at 2021-01-06 13:59:39.

DDL replication statistics (for all trails):

*** Total statistics since extract started ***
Operations 0.00
Mapped operations 0.00
Unmapped operations 0.00
Other operations 0.00
Excluded operations 0.00

Output to /ogg/ogg/trails/w1:

Extracting from PDB1.PG.T1 to PDB1.PG.T1:

*** Total statistics since 2021-01-06 12:53:55 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Daily statistics since 2021-01-06 12:53:55 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Hourly statistics since 2021-01-06 13:00:00 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Latest statistics since 2021-01-06 12:53:55 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

End of Statistics.
--//配置投遞進程
--//源端配置:聚合模式 Pump Extract
--//添加一個pump進程,並指定遠程trail文件
--//exttrailsource的內容就是exint抽取進程的exttrail /ogg/ogg/trails/w1
add extract exppint,exttrailsource /ogg/ogg/trails/w1

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 38> add extract exppint,exttrailsource /ogg/ogg/trails/w1
EXTRACT added.


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 39>
--//編輯pump文件
--//rmthost為目標端的ip地址
--//rmttrail目標端存放trail文件的目錄,提前在目標端創建好
edit params exppint

EXTRACT exppint
passthru
rmthost 192.168.40.170, mgr port 7809
rmttrail /home/oracle/OGG/19ctrails/pi
table pg.*;
--//目標端的信息

[oracle@QXY 19ctrails]$ ifconfig -a | grep 'inet addr' | grep 170
inet addr:192.168.40.170 Bcast:192.168.40.255 Mask:255.255.255.0
inet addr:192.168.170.128 Bcast:192.168.170.255 Mask:255.255.255.0
[oracle@QXY 19ctrails]$ pwd
/home/oracle/OGG/19ctrails
[oracle@QXY 19ctrails]$
--//指定目標端的trail文件

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 45> add rmttrail /home/oracle/OGG/19ctrails/pi, extract exppint
RMTTRAIL added.

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 46>

--//啟動投遞進程

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 57> start exppint

Sending START request to MANAGER ...
EXTRACT EXPPINT starting


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 58> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
EXTRACT RUNNING EXINT 00:00:00 00:00:09
EXTRACT RUNNING EXPPINT 00:00:00 00:00:44
--//投遞進程abend

2021-01-06 14:15:51 WARNING OGG-06600 The remote peer for remote trail /home/oracle/OGG/19ctrails/pi does not support 9 digit seqle
n feature. Continuing with 6 digit seqlen.

2021-01-06 14:15:51 INFO OGG-01052 No recovery is required for target file /home/oracle/OGG/19ctrails/pi000000, at RBA 0 (file n
ot opened).

***********************************************************************
** Run Time Messages **
***********************************************************************


2021-01-06 14:15:51 INFO OGG-02243 Opened trail file /ogg/ogg/trails/w1000000000 at 2021-01-06 14:15:51.793280.

2021-01-06 14:15:51 INFO OGG-01478 Output file /home/oracle/OGG/19ctrails/pi is using format RELEASE 19.1.

Source Context :
SourceModule : [ggapp.wildcard]
SourceID : [../gglib/ggapp/wildcard.c]
SourceMethod : [WILDCARD_check_table]
SourceLine : [1759]
ThreadBacktrace : [15] elements
: [/ogg/ogg/libgglog.so(CMessageContext::AddThreadContext())]
: [/ogg/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
: [/ogg/ogg/libgglog.so(_MSG_QualTableName_QualTableName(CSourceContext*, int, ggs::gglib::ggapp::CQualDBOb
jName<(DBObjType)1> const&, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, CMessageFactory::MessageDisposition))]
: [/ogg/ogg/extract()]
: [/ogg/ogg/extract(ggs::er::ERContext::findSourceMetadata(ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1>
const&, int, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool))]
: [/ogg/ogg/extract(ggs::gglib::ggapp::ReplicationContext::sourceMetadataLookup(ggs::gglib::gglcr::CommonLC
R const*))]
: [/ogg/ogg/extract(ggs::er::ExtractContext::processPumpLoop())]
: [/ogg/ogg/extract(ggs::er::ExtractContext::run())]
: [/ogg/ogg/extract()]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain())]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::Threa
dArgs*))]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/ogg/extract(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/ogg/ogg/extract()]

2021-01-06 14:15:51 ERROR OGG-02650 Source wildcard specification pg.* does not include a catalog name, but the source table name
PDB1.PG.T1 includes a catalog name.

***********************************************************************
* ** Run Time Statistics ** *
*********************************************************************
--//添加SOURCECATALOG參數

edit params exppint

EXTRACT exppint
passthru
rmthost 192.168.40.170, mgr port 7809
rmttrail /home/oracle/OGG/19ctrails/pi
SOURCECATALOG pdb1
table pg.*;
--//再次啟動成功

GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 64> start exppint

Sending START request to MANAGER ...
EXTRACT EXPPINT starting


GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 65> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
EXTRACT RUNNING EXINT 00:00:00 00:00:05
EXTRACT RUNNING EXPPINT 00:00:00 00:02:34
GGSCI (dm01 as c##goldengate@qxy1/CDB$ROOT) 72> stats exppint

Sending STATS request to EXTRACT EXPPINT ...

Start of Statistics at 2021-01-06 14:18:46.

Output to /home/oracle/OGG/19ctrails/pi:

Extracting from PDB1.PG.T1 to PDB1.PG.T1:

*** Total statistics since 2021-01-06 14:18:32 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Daily statistics since 2021-01-06 14:18:32 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Hourly statistics since 2021-01-06 14:18:32 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Latest statistics since 2021-01-06 14:18:32 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

End of Statistics.

--//配置目標庫,目標庫是11g的單實例
--//trails文件已經投遞進來

[oracle@QXY 19ctrails]$ ls -ltr
total 4
-rw-r-----. 1 oracle oinstall 1917 Jan 6 14:18 pi000000
[oracle@QXY 19ctrails]$
--//目標庫本身已經有ogg,這里只需要配置replicat進程
--//目標庫ogg版本為12.1
--//配置checkpoint(非必須)

edit params ./GLOBALS
ggschema goldengate
checkpointtable goldengate.ggschkpt

--//配置replicat抽取進程

add replicat w1rep19c,exttrail /home/oracle/OGG/19ctrails/pi,checkpointtable goldengate.ggschkpt


GGSCI (QXY.localdomain) 4> add replicat w1rep19c,exttrail /home/oracle/OGG/19ctrails/pi,checkpointtable goldengate.ggschkpt
REPLICAT added.


GGSCI (QXY.localdomain) 5>
--//編輯參數
--//目標庫已經存在pg用戶且該用戶下面有t1表

edit params w1rep19c

replicat w1rep19c
SETENV (NLS_LANG ="AMERICAN_AMERICA.ZHS16GBK")
USERID goldengate, PASSWORD goldengate
--assumetargetdefs
ReportCount Every 30 Minutes, Rate
Report at 01:00
ReportRollover at 01:15
reperror default,abend
discardfile ./dirout/w1rep19c.dsc, append, megabytes 100
DiscardRollover at 02:00 ON SUNDAY
--ddl include all
ddlerror default discard retryop maxretries 2 retrydelay 5
dynamicresolution
--MAP goldengate.*, TARGET goldengate.*;
DBOPTIONS NOSUPPRESSTRIGGERS
ALLOWNOOPUPDATES
ASSUMETARGETDEFS
map pg.*, target pg.*;
--//啟動應用進程
--//啟動報錯

2021-01-06 14:28:51 ERROR OGG-01332 File /home/oracle/OGG/19ctrails/pi000000, with compatibility level 7, is not compatible with
the current software version's compatibility level of 4. Modify the file writer's parameter file to generate the appropriate format u
sing the FORMAT LEVEL 4 option.

***********************************************************************
* ** Run Time Statistics ** *
***********************************************************************

Reading /home/oracle/OGG/19ctrails/pi000000, current RBA 0, 0 records

Report at 2021-01-06 14:28:51 (activity since 2021-01-06 14:28:48)
可以參考MOS
GG Pump abend with Error OGG-01332 (Doc ID 2219940.1)
Source container database requires trail FORMAT 12.3/18.1 or higher.

--//如果修改抽取段的release格式,FORMAT RELEASE 12.2,會提示Source container database requires trail FORMAT 12.3/18.1 or higher.

GGSCI (dm01) 19> view params exint

extract exint
setenv (ORACLE_SID = "qxy1")
setenv (NLS_LANG = "AMERICAN_AMERICA.AL32UTF8")
userid c##goldengate, password goldengate
TRANLOGOPTIONS INTEGRATEDPARAMS(parallelism 2)
TRANLOGOPTIONS GETCTASDML
DDL INCLUDE MAPPED
exttrail /ogg/ogg/trails/w1,FORMAT RELEASE 12.2 <=====增加FORMAT RELEASE 12.2
discardfile /ogg/ogg/dirdat/exint.dsc, append, megabytes 100
getupdatebefores
nocompressdeletes
nocompressupdates
--LOGALLSUPCOLS
dboptions allowunusedcolumn
fetchoptions nousesnapshot
fetchoptions fetchpkupdatecols

SOURCECATALOG PDB1
table pg.*;
--//啟動rep進程失敗

2021-01-06 15:01:49 INFO OGG-01851 filecaching started: thread ID: 140111624648448.

2021-01-06 15:01:49 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/ogg/ogg/dirtmp.

2021-01-06 15:01:49 INFO OGG-25340
Database Version:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production.

2021-01-06 15:01:49 INFO OGG-25341
Database Language and Character Set:
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "AL32UTF8".

2021-01-06 15:01:51 INFO OGG-06604 Database QXY CPU info: CPU Count 4, CPU Core Count 4, CPU Socket Count 2.

2021-01-06 15:01:51 INFO OGG-06618 Database QXY Platform: Linux x86 64-bit.

2021-01-06 15:01:55 WARNING OGG-02909 CTAS not supported with replicat versions lower than 12.1.2.1.0.

2021-01-06 15:01:56 WARNING OGG-02045 Database does not have streams_pool_size initialization parameter configured.

2021-01-06 15:01:57 INFO OGG-02248 Logmining server DDL filtering enabled.

2021-01-06 15:01:58 INFO OGG-02339 Integrated capture successfully attached to logmining server OGG$CAP_EXINT using 60 second st
reaming duration.

2021-01-06 15:01:58 INFO OGG-02089 Source redo compatibility version is: 18.0.0.

...skipping one line
2021-01-06 15:01:58 INFO OGG-02086 Integrated Dictionary will be used.

Source Context :
SourceModule : [er.redo.oraxo]
SourceID : [er/redo/oracle/redooraix.c]
SourceMethod : [validateOutTrailFileCompatibility]
SourceLine : [11962]
ThreadBacktrace : [16] elements
: [/ogg/ogg/libgglog.so(CMessageContext::AddThreadContext())]
: [/ogg/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
: [/ogg/ogg/libgglog.so(_MSG_String(CSourceContext*, int, char const*, CMessageFactory::MessageDisposition)
)]
: [/ogg/ogg/extract()]
: [/ogg/ogg/extract(RedoIE::validateConfig(log_context_t*, ggs::gglib::ggocicpp::ORAConnection*, ggs::gglib
::ggdatasource::DataSource*, ggs::gglib::ggapp::ReplicationContext*))]
: [/ogg/ogg/extract(RedoAPI::createInstance(ggs::gglib::ggdatasource::DataSource*, ggs::gglib::ggapp::Repli
cationContext*))]
: [/ogg/ogg/extract(ggs::er::OraTranLogDataSource::setup())]
: [/ogg/ogg/extract(ggs::gglib::ggapp::ReplicationContext::establishStartPoints(char, ggs::gglib::ggdatasou
rce::DataSourceParams const&))]
: [/ogg/ogg/extract(ggs::gglib::ggapp::ReplicationContext::initializeDataSources(ggs::gglib::ggdatasource::
DataSourceParams&))]
: [/ogg/ogg/extract()]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::ExecMain())]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::Threa
dArgs*))]
: [/ogg/ogg/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/ogg/extract(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/ogg/ogg/extract()]

2021-01-06 15:01:59 ERROR OGG-06221 Source container database requires trail FORMAT 12.3/18.1 or higher.

2021-01-06 15:01:59 ERROR OGG-01668 PROCESS ABENDING.
--//這里就升級目標的ogg了,詳細可以參考下面的連接
https://docs.oracle.com/en/middleware/goldengate/core/19.1/upgrading/upgrading-oracle-goldengate-oui.html
Upgrading Oracle GoldenGate from OUI

安裝時要選擇11g,因為目標庫是11g的數據庫

 

選擇一個新的安裝目錄,端口可以選擇和舊的不一致

 

 

 

 

--//使用新版本重新創建復制進程

[oracle@QXY OGG_19C]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.



GGSCI (QXY.localdomain) 1> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING


GGSCI (QXY.localdomain) 2>
--//配置checkpoint
edit params ./GLOBALS
ggschema goldengate
checkpointtable goldengate.ggscheckpiont

GGSCI (QXY.localdomain) 3> dblogin userid goldengate, password goldengate
Successfully logged into database.

GGSCI (QXY.localdomain as goldengate@QXY) 4> add checkpointtable goldengate.ggscheckpiont

Successfully created checkpoint table goldengate.ggscheckpiont.

GGSCI (QXY.localdomain as goldengate@QXY) 5>
--//配置replicat抽取進程

GGSCI (QXY.localdomain as goldengate@QXY) 5> add replicat w1rep19c,exttrail /home/oracle/OGG/19ctrails/pi,checkpointtable goldengate.ggscheckpiont
REPLICAT added.


GGSCI (QXY.localdomain as goldengate@QXY) 6>
--//編輯參數
--//目標庫已經存在pg用戶且該用戶下面有t1表

edit params w1rep19c

replicat w1rep19c
SETENV (NLS_LANG ="AMERICAN_AMERICA.ZHS16GBK")
USERID goldengate, PASSWORD goldengate
--assumetargetdefs
ReportCount Every 30 Minutes, Rate
Report at 01:00
ReportRollover at 01:15
reperror default,abend
discardfile ./dirout/w1rep19c.dsc, append, megabytes 100
DiscardRollover at 02:00 ON SUNDAY
--ddl include all
ddlerror default discard retryop maxretries 2 retrydelay 5
--MAP goldengate.*, TARGET goldengate.*;
DBOPTIONS NOSUPPRESSTRIGGERS
ALLOWNOOPUPDATES
ASSUMETARGETDEFS
map pg.*, target pg.*;
--//啟動應用進程

GGSCI (QXY.localdomain as goldengate@QXY) 7> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
REPLICAT STOPPED W1REP19C 00:00:00 00:01:04


GGSCI (QXY.localdomain as goldengate@QXY) 8> start rep W1REP19C

Sending START request to MANAGER ...
REPLICAT W1REP19C starting


GGSCI (QXY.localdomain as goldengate@QXY) 9> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
REPLICAT ABENDED W1REP19C 00:00:00 00:01:14
--//啟動報錯,雖然目標庫不是CDB格式,還是要指定SOURCECATALOG
--//參考Configuring Oracle GoldenGate in a Multitenant Container Database,地址如下:
https://docs.oracle.com/en/middleware/goldengate/core/19.1/oracle-db/configuring-oracle-goldengate-multitenant-container-database-1.html#GUID-2A72F463-C5B6-4A4C-8BDF-537AAD01BEE4

2021-01-06 15:23:38 ERROR OGG-02650 Source wildcard specification pg.* does not include a catalog name, but the source table name
PDB1.PG.T1 includes a catalog name.

***********************************************************************
* ** Run Time Statistics ** *
***********************************************************************
--//添加上SOURCECATALOG 再次啟動

GGSCI (QXY.localdomain as goldengate@QXY) 11> edit params w1rep19c
replicat w1rep19c
SETENV (NLS_LANG ="AMERICAN_AMERICA.ZHS16GBK")
USERID goldengate, PASSWORD goldengate
--assumetargetdefs
ReportCount Every 30 Minutes, Rate
Report at 01:00
ReportRollover at 01:15
reperror default,abend
discardfile ./dirout/w1rep19c.dsc, append, megabytes 100
DiscardRollover at 02:00 ON SUNDAY
--ddl include all
ddlerror default discard retryop maxretries 2 retrydelay 5
dynamicresolution
--MAP goldengate.*, TARGET goldengate.*;
DBOPTIONS NOSUPPRESSTRIGGERS
ALLOWNOOPUPDATES
ASSUMETARGETDEFS
SOURCECATALOG PDB1
map pg.*, target pg.*;
~
--//啟動成功

GGSCI (QXY.localdomain as goldengate@QXY) 13> start rep W1REP19C

Sending START request to MANAGER ...
REPLICAT W1REP19C starting


GGSCI (QXY.localdomain as goldengate@QXY) 14> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
REPLICAT RUNNING W1REP19C 00:00:00 00:00:01


GGSCI (QXY.localdomain as goldengate@QXY) 15>

GGSCI (QXY.localdomain as goldengate@QXY) 16> stats W1REP19C

Sending STATS request to REPLICAT W1REP19C ...

Start of Statistics at 2021-01-06 15:28:12.

Replicating from PDB1.PG.T1 to PG.T1:

*** Total statistics since 2021-01-06 15:27:50 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Daily statistics since 2021-01-06 15:27:50 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Hourly statistics since 2021-01-06 15:27:50 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

*** Latest statistics since 2021-01-06 15:27:50 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 2.00

End of Statistics.


GGSCI (QXY.localdomain as goldengat

--//進入數據庫查看

[oracle@QXY OGG_19C]$ o

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 6 15:28:39 2021

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> conn pg/postgres
Connected.
SQL> select * from t1;

ID
----------
10
11

SQL>
--//至此,從19c RAC到11.2.0.4 單實例ogg同步搭建完成。
————————————————
版權聲明:本文為CSDN博主「qxy0503」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/m15217321304/article/details/112276914


免責聲明!

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



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