If you are looking for a one-premises Oracle Database to Oracle Exadata migration using a GoldenGate Hub architecture, the typical design is as follows:
Source Oracle DB|| (Extract)v+------------------+| GoldenGate HUB || Server || - Extract || - Data Pump || - Trail Files |+------------------+|| (Trail Files)vTarget Exadata DB|| (Replicat)vOracle Exadata
- Enable supplemental logging on the source database.
- Add schema/table supplemental logging (SCHEMATRANDATA/TABLETRANDATA).
- Create and start GoldenGate Extract process.
- Capture the current SCN from the source database.
- Export the schema using Data Pump with
FLASHBACK_SCN.- Extract schema DDL (user, tablespaces, grants, synonyms, etc.).
- Copy dump files and DDL scripts to Exadata using SCP.
- Create required tablespaces on Exadata.
- Create the target schema/user and apply grants.
- Import the schema dump into Exadata using IMPDP.
- Create the GoldenGate Replicat process on the target.
- Start Replicat using
AFTERCSN <Export_SCN>.- Validate data and monitor replication lag.
- Stop application writes and wait for lag to reach zero.
- Perform final validation and cutover application connections to Exadata.
- Decommission GoldenGate after business sign-off.
Step 1: Enable supplemental logging on the source database.
SQL> create tablespace gg_tbs datafile '+DATA/ORCL/gg_tbs01.dbf' size 2G;
SQL> create user ggadmin identified by ggadmin default tablespace gg_tbs;
sql> grant connect,resource to ggadmin;
SQL> alter user ggadmin quota unlimited on gg_tbs;
SQL> grant dba to ggadmin;
SQL> exec dbms_goldengate_auth.grant_admin_privilege ('GGADMIN');
SQL> alter database add supplemental log data (all) columns;---------------> CDB level and also in pdb level
SQL> select supplemental_log_data_min from v$database;
SQL> alter system set STREAMS_POOL_SIZE=1G scope=BOTH;---------------------> CDB level
SQL> alter system set enable_goldengate_replication=TRUE;------------------> CDB level
/home/oracle/@sequence.sql -- Run
GRANT EXECUTE on ggadmin.updateSequence TO ggadmin;-----------------------> in PDB level
ALTER TABLE sys.seq$ ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;-----------no need to run this one
ALTER PLUGGABLE DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;-------------> source is pdb then only we need to run this one
Step 2: Add schema/table supplemental logging (SCHEMATRANDATA/TABLETRANDATA).
Why it is required?
- Captures UPDATEs and DELETEs correctly.
- Provides primary key/unique key values in redo logs.
- Allows Replicat to identify the exact target row.
Without TRANDATA, GoldenGate may fail with:
OGG-01432 No unique key defined
2. Scheduling Columns
When Scheduling Columns is enabled, GoldenGate logs columns used to determine transaction ordering and dependency tracking.
Purpose:
- Maintains correct commit order.
- Improves parallel Replicat processing.
- Prevents data consistency issues when dependent transactions are applied in parallel.
Common Usage:
- Integrated Replicat
- Parallel Replicat
- High-volume OLTP databases
Example:
3. All Columns
When All Columns is selected, GoldenGate logs all column values for UPDATE operations.
Instead of only logging changed columns:
Before:
Oracle normally logs only the modified column.
With All Columns enabled:
Benefits
- Better conflict detection.
- Supports active-active replication.
- Easier data comparison and troubleshooting.
- Required for some replication topologies.
Enable supplemental logging on the Target database.
SQL> create tablespace gg_tbs datafile '+DATA/ORCL/gg_tbs01.dbf' size 2G;
SQL> create user ggadmin identified by ggadmin default tablespace gg_tbs;
sql> grant connect,resource to ggadmin;
SQL> alter user ggadmin quota unlimited on gg_tbs;
SQL> grant dba to ggadmin;
SQL> exec dbms_goldengate_auth.grant_admin_privilege ('GGADMIN');
SQL> alter database add supplemental log data (all) columns;---------------> CDB level and also in pdb level
SQL> select supplemental_log_data_min from v$database;
SQL> alter system set STREAMS_POOL_SIZE=1G scope=BOTH;---------------------> CDB level
SQL> alter system set enable_goldengate_replication=TRUE;------------------> CDB level
/home/oracle/@sequence.sql -- Run
GRANT EXECUTE on ggadmin.updateSequence TO ggadmin;-----------------------> in PDB level
ALTER PLUGGABLE DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;-------------> source is pdb then only we need to run this one
[oracle@rac1 AMIT]# ls -lrt
total 222931048
-rwxrwxr-x 1 oracle oinstall 75 Jul 16 14:12 EXP_AMIT_SCHEMA.sh
-rwxrwxr-x 1 oracle oinstall 171 Jul 18 03:49 EXP_AMIT_SCHEMA.par
-rw-r----- 1 oracle asmadmin 20815839232 Jul 18 05:03 EXP_AMIT_SCHEMA_01.dmp
-rw-r----- 1 oracle asmadmin 10212769792 Jul 18 05:03 EXP_AMIT_SCHEMA_04.dmp
-rw-r----- 1 oracle asmadmin 35046813696 Jul 18 05:03 EXP_AMIT_SCHEMA_06.dmp
-rw-r----- 1 oracle asmadmin 19759411200 Jul 18 05:03 EXP_AMIT_SCHEMA_03.dmp
-rw-r----- 1 oracle asmadmin 12735889408 Jul 18 05:03 EXP_AMIT_SCHEMA_05.dmp
-rw-r----- 1 oracle asmadmin 17126072320 Jul 18 05:03 EXP_AMIT_SCHEMA_02.dmp
-rw-r--r-- 1 oracle asmadmin 108981 Jul 18 05:03 AMIT_SCHMA.log
-rw-r----- 1 oracle asmadmin 67296854016 Jul 18 05:03 EXP_AMIT_SCHEMA_08.dmp
-rw-r----- 1 oracle asmadmin 13521874944 Jul 18 05:03 EXP_AMIT_SCHEMA_10.dmp
-rw-r----- 1 oracle asmadmin 14047080448 Jul 18 05:03 EXP_AMIT_SCHEMA_09.dmp
-rw-r----- 1 oracle asmadmin 17718259712 Jul 18 05:03 EXP_AMIT_SCHEMA_07.dmp
-rw------- 1 oracle oinstall 216006 Jul 18 05:03 nohup.out
[oracle@rac1-oracle AMIT]# cat EXP_AMIT_SCHEMA.sh
nohup expdp parfile=/mnt/exadata_export/AMIT/EXP_AMIT_SCHEMA.par &
[PROD:oracle@rac1-oracle AMIT]# cat EXP_AMIT_SCHEMA.par
userid="/ as sysdba"
directory=AMIT
dumpfile=EXP_AMIT_SCHEMA_%U.dmp
logfile=EXP_AMIT_SCHEMA.log
schemas=AMIT
parallel=10
EXCLUDE=STATISTICS
FLASHBACK_SCN=1234567890
[oracle@rac1-oracle AMIT] sh EXP_AMIT_SCHEMA.sh ----> executing sh script for taking Export on Source
Elapsed Time
Start Total Time Remain
SID SERIAL# Module SQL_ID Time Operation Object Work Sofar (Mins) (Sec)
------- ---------- ------------------ ------------- ------------ ------------ -------------------- ----------- ----------- --------- ----------
766 36729 Data Pump Master bjf05cwcj5s6p 18-jul:03:53 SYS_EXPORT_S 178227 153468 31 304
4873 12780 Data Pump Worker 335q3w4mk0rwt 18-jul:03:53 Rowid Range AMIT.ORDER_01 4294967296 83962686 32 95341
No comments:
Post a Comment