SlideShare a Scribd company logo
3
Most read
5
Most read
7
Most read
Oracle Goldengate 11g Schema replication from Standby Database
GoldenGate is touted by Oracle as its future for data replication. It will slowly phase out Oracle
Streams and will be more closely coupled with Oracle products. Golden Gate is relatively simpler
to use and monitor than Oracle streams. Below I will demonstrate how to configure ASYNC
Schema Replication one side using Oracle GoldenGate 11g on Oracle 11gR2 database.
SID of SOURCE: TP --> Primary Database
SID of SOURCE: TS --> Standby Database
SID of target: SOURCE
SOURCE Server name: testdb01, testdb02
Target Server name: testdb01
Source Schema name: SCOTT
Target Schema name: SCOTT
Tables: All tables
1. Tell database to log more (supplemental logging ~10% of more redo writing) on source
database only.
Enable supplemental log in Primary database, automatic enable in Standby database
alter database add supplemental log data;
Output same as both Primary and Standby database
SQL> SELECT supplemental_log_data_min "Minimum",
supplemental_log_data_pk "Primary key",
supplemental_log_data_ui "Unique Key",
supplemental_log_data_fk "Foregin Key",
supplemental_log_data_all "All"
FROM v$database; 2 3 4 5 6
Minimum Pri Uni For All
-------- --- --- --- ---
YES NO NO NO NO
2. Set the Environment variables in .bash_profile of user gguser on
both source and target database servers.
— source —
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/opt/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TP; export ORACLE_SID
PATH=$ORACLE_HOME/bin:/usr/sbin:/usr/local/bin:$PATH
export PATH
export OGG_HOME=/export/home/oracle/OGG
export PATH=${OGG_HOME}:${OGG_HOME}/tools:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/export/home/oracle/OGG
alias g="${OGG_HOME}/ggsci"
— Detination —
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/opt/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TS; export ORACLE_SID
PATH=$ORACLE_HOME/bin:/usr/sbin:/usr/local/bin:$PATH
export PATH
export OGG_HOME=/export/home/oracle/OGG
export PATH=${OGG_HOME}:${OGG_HOME}/tools:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/export/home/oracle/OGG
alias g="${OGG_HOME}/ggsci"
3. Create the tablespace for both databases (source + target ) like:
Create in Primary database which auto replicate in Standby database, in target data also
create tablespace as like ggate user
Create tablespace ggate datafile ‘/opt/oracle/app/oracle/oradata/TP/ggate01.dbf’ size 1000M
autoextend on next 100M;
4. GoldenGate schema creation into source and target database
create user ggate identified by ggate default tablespace ggate
temporary tablespace TEMP profile DEFAULT;
alter user ggate QUOTA UNLIMITED ON ggate;
grant CONNECT to ggate;
grant CREATE SESSION to ggate;
grant RESOURCE to ggate;
grant SELECT ANY TABLE to ggate;
grant ALTER SESSION to ggate;
grant CREATE TABLE to ggate;
grant FLASHBACK ANY TABLE to ggate;
grant SELECT ANY DICTIONARY to ggate;
grant DBA to ggate;
5. Enable DDL in both Source and target database
login as sysdba on both source and target run following steps…
SQL> grant execute on utl_file to ggate;
SQL> @marker_setup.sql
SQL> @ddl_setup.sql
SQL> @role_setup.sql
SQL> grant GGS_GGSUSER_ROLE to ggate;
And more important grant on dictionay views otherwise extract will keep on abending on both
source and target schema (in our case IVR and IVR on both source and target. Schema name is
same on both databases)
— on source —
SQL> grant select any dictionary to SCOTT;
— on target —
SQL> grant select any dictionary to SCOTT;
6. Manager Configuration in Source Side
— Source Configuration that is testbed02 from TS (Standby database) —
GGSCI (testdb02) 1> status all
GGSCI (testdb02) 1> edit params mgr
PORT 5000
lagreportminutes 5
laginfominutes 1
lagcriticalminutes 2
purgeoldextracts ./dirdat/t*, minkeepdays 2, usecheckpoints
GGSCI (testdb02) 1> start mgr
GGSCI (testdb02) 1> info all
If manager is running then manager configuration is ok.
7. Trans data enable in table level
GGSCI (testdb02) 1> dblogin userid ggate, password ggate
GGSCI (testdb02 as ggate@TS) 20> list tables scott.*
SCOTT.BONUS
SCOTT.DEPT
SCOTT.EMP
SCOTT.SALGRADE
Found 4 tables matching list criteria.
If you see the list of tables then your configuration is good and you can continue:
GGSCI (testdb02 as ggate@TS) 22> info trandata scott.*
Logging of supplemental redo log data is disabled for table SCOTT.BONUS.
Logging of supplemental redo log data is disabled for table SCOTT.DEPT.
Logging of supplemental redo log data is disabled for table SCOTT.EMP.
Logging of supplemental redo log data is disabled for table SCOTT.SALGRADE.
Enable table level supplemental log from Primary Database
alter table SCOTT.BONUS add supplemental log data (ALL) columns;
alter table SCOTT.DEPT add supplemental log data (ALL) columns;
alter table SCOTT.EMP add supplemental log data (ALL) columns;
alter table SCOTT.SALGRADE add supplemental log data (ALL) columns;
Now check in Source Standby Database
GGSCI (testdb02 as ggate@TS) 23> info trandata scott.*
Logging of supplemental redo log data is enabled for table SCOTT.BONUS.
Columns supplementally logged for table SCOTT.BONUS: ALL.
Logging of supplemental redo log data is enabled for table SCOTT.DEPT.
Columns supplementally logged for table SCOTT.DEPT: ALL.
Logging of supplemental redo log data is enabled for table SCOTT.EMP.
Columns supplementally logged for table SCOTT.EMP: ALL.
Logging of supplemental redo log data is enabled for table SCOTT.SALGRADE.
Columns supplementally logged for table SCOTT.SALGRADE: ALL.
8. Extract Process ADD in Source Side connection in Standby Database
Let’s create and configure now the extractor process, edit add these files and save:
GGSCI (testdb02 as ggate@TS) 24> add extract extst1, tranlog, begin now
EXTRACT added.
GGSCI (testdb02 as ggate@TS) 25> add exttrail ./dirdat/k1, extract extst1, megabytes 100
EXTTRAIL added.
GGSCI (testdb01 as ggate@SOURCE) 11> edit params EXTST1
extract extst1
SETENV (ORACLE_SID = "TS")
userid ggate@TS, password ggate
discardfile ./dirrpt/exts1.dsc,purge
reportcount every 15 minutes, rate
exttrail ./dirdat/k1
TRANLOGOPTIONS MINEFROMACTIVEDG
CACHEMGR CACHESIZE 1GB
table SCOTT.*;
9. After starting the extract process get error
Extract on ADG: OGG-00868 The number of Oracle redo threads (2) is not the same as the
number of checkpoint threads (1). (Doc ID 2004661.1)
SQL> select group#, THREAD#, SEQUENCE#,STATUS from v$standby_log;
GROUP# THREAD# SEQUENCE# STATUS
---------- ---------- ---------- ----------
5 1 52 ACTIVE
6 1 0 UNASSIGNED
7 0 0 UNASSIGNED
8 0 0 UNASSIGNED
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database drop standby logfile group 7;
Database altered.
SQL> alter database drop standby logfile group 8;
Database altered.
SQL> alter database recover managed standby database using current logfile disconnect;
Database altered.
10. PUMP Process ADD in Source Side connection in Standby Database
Extract process created, now we create the data pump process:
GGSCI (testdb02) 8> add extract dpest1, exttrailsource ./dirdat/k1
EXTRACT added.
GGSCI (testdb02) 9> add rmttrail ./dirdat/k1, extract dpest1, megabytes 100
RMTTRAIL added.GGSCI (testdb01 as ggate@SOURCE) 1> edit param dpest1
extract dpest1
passthru
rmthost testdb01, mgrport 8000
rmttrail ./dirdat/k1
table SCOTT.*;
//rmthost is the target server name or ip address. Ensure port 8000 is open on target server
11. Replicate Process ADD in Target Database
— Destination Configuration —
Target side on your ggsci prompt:
GGSCI (testdb01) 2> dblogin userid ggate@SOURCE , password ggate
Successfully logged into database.
GGSCI (testdb01 as ggate@SOURCE) 3> ADD CHECKPOINTTABLE GGATE.CHKPTAB
GGSCI (testdb01 as ggate@SOURCE) 4> add replicat repst1, exttrail ./dirdat/k1
CHECKPOINTTABLE GGATE.CHKPTAB
REPLICAT added.
Manager created and verified, now we are going to create replicate processes.
GGSCI (testdb01 as ggate@SOURCE) 11> view param REPST1
replicat repst1
SETENV (ORACLE_SID = "SOURCE")
userid ggate@SOURCE, password ggate
discardfile ./dirrpt/rep1.dsc, purge
assumetargetdefs
reportcount every 15 minutes, rate
batchsql
deferapplyinterval 5 mins
map SCOTT.*, target SCOTT.*;
12. Check the stats OGG is working Fine
Source Standby Database
Target Database
Oracle goldengate 11g schema replication from standby database

More Related Content

DOC
Schema replication using oracle golden gate 12c
PDF
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
PDF
Greenplum Architecture
PDF
Better than you think: Handling JSON data in ClickHouse
PDF
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
PPSX
RAC - The Savior of DBA
PDF
Best practices for MySQL High Availability Tutorial
PPTX
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Schema replication using oracle golden gate 12c
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Greenplum Architecture
Better than you think: Handling JSON data in ClickHouse
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
RAC - The Savior of DBA
Best practices for MySQL High Availability Tutorial
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...

What's hot (20)

PPTX
High Performance, High Reliability Data Loading on ClickHouse
PPTX
Oracle Goldengate for Big Data - LendingClub Implementation
PDF
Redo internals ppt
PDF
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander Zaitsev
PDF
Efficient Data Storage for Analytics with Apache Parquet 2.0
PPTX
PostgreSQL Database Slides
PDF
Open Source 101 2022 - MySQL Indexes and Histograms
PDF
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
PDF
Mastering PostgreSQL Administration
 
PDF
ClickHouse Introduction by Alexander Zaitsev, Altinity CTO
PDF
ClickHouse Intro
PDF
Building robust CDC pipeline with Apache Hudi and Debezium
PDF
Harnessing the Power of Optimizer Hints
PDF
"Changing Role of the DBA" Skills to Have, to Obtain & to Nurture - Updated 2...
PPSX
Oracle Performance Tuning Fundamentals
PDF
Linux tuning to improve PostgreSQL performance
PDF
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
PDF
Presto: Optimizing Performance of SQL-on-Anything Engine
PDF
Oracle statistics by example
PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
High Performance, High Reliability Data Loading on ClickHouse
Oracle Goldengate for Big Data - LendingClub Implementation
Redo internals ppt
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander Zaitsev
Efficient Data Storage for Analytics with Apache Parquet 2.0
PostgreSQL Database Slides
Open Source 101 2022 - MySQL Indexes and Histograms
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Mastering PostgreSQL Administration
 
ClickHouse Introduction by Alexander Zaitsev, Altinity CTO
ClickHouse Intro
Building robust CDC pipeline with Apache Hudi and Debezium
Harnessing the Power of Optimizer Hints
"Changing Role of the DBA" Skills to Have, to Obtain & to Nurture - Updated 2...
Oracle Performance Tuning Fundamentals
Linux tuning to improve PostgreSQL performance
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
Presto: Optimizing Performance of SQL-on-Anything Engine
Oracle statistics by example
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Ad

Similar to Oracle goldengate 11g schema replication from standby database (20)

PPT
11thingsabout11g 12659705398222 Phpapp01
PPT
11 Things About11g
TXT
Gg steps
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PPTX
Oracle Database 12c - New Features for Developers and DBAs
DOCX
Oracle GoldenGate
PPT
Less04 Instance
PPT
Rmoug ashmaster
PPTX
DBA Commands and Concepts That Every Developer Should Know - Part 2
PPTX
DBA Commands and Concepts That Every Developer Should Know - Part 2
TXT
data_all_oracle
PPTX
Oracle database 12.2 new features
PDF
配置Golden gate同步ddl语句
PPTX
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
PDF
Setup oracle golden gate 11g replication
PPTX
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PPT
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
PPTX
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
11thingsabout11g 12659705398222 Phpapp01
11 Things About11g
Gg steps
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
Oracle GoldenGate
Less04 Instance
Rmoug ashmaster
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
data_all_oracle
Oracle database 12.2 new features
配置Golden gate同步ddl语句
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Setup oracle golden gate 11g replication
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
Ad

More from uzzal basak (10)

PDF
MongoDB Sharding
PPT
Elk presentation 2#3
PPT
Elk presentation1#3
PDF
12c db upgrade from 11.2.0.4
PDF
Encrypt and decrypt in solaris system
DOCX
Oracle table partition step
PDF
Oracle business intelligence enterprise edition 11g
DOC
EMC Networker installation Document
DOC
Oracle Audit vault
DOC
Oracle data guard configuration in 12c
MongoDB Sharding
Elk presentation 2#3
Elk presentation1#3
12c db upgrade from 11.2.0.4
Encrypt and decrypt in solaris system
Oracle table partition step
Oracle business intelligence enterprise edition 11g
EMC Networker installation Document
Oracle Audit vault
Oracle data guard configuration in 12c

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
KodekX | Application Modernization Development
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Empathic Computing: Creating Shared Understanding
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Programs and apps: productivity, graphics, security and other tools
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
KodekX | Application Modernization Development
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf

Oracle goldengate 11g schema replication from standby database

  • 1. Oracle Goldengate 11g Schema replication from Standby Database GoldenGate is touted by Oracle as its future for data replication. It will slowly phase out Oracle Streams and will be more closely coupled with Oracle products. Golden Gate is relatively simpler to use and monitor than Oracle streams. Below I will demonstrate how to configure ASYNC Schema Replication one side using Oracle GoldenGate 11g on Oracle 11gR2 database. SID of SOURCE: TP --> Primary Database SID of SOURCE: TS --> Standby Database SID of target: SOURCE SOURCE Server name: testdb01, testdb02 Target Server name: testdb01 Source Schema name: SCOTT Target Schema name: SCOTT Tables: All tables 1. Tell database to log more (supplemental logging ~10% of more redo writing) on source database only. Enable supplemental log in Primary database, automatic enable in Standby database alter database add supplemental log data; Output same as both Primary and Standby database SQL> SELECT supplemental_log_data_min "Minimum", supplemental_log_data_pk "Primary key", supplemental_log_data_ui "Unique Key", supplemental_log_data_fk "Foregin Key", supplemental_log_data_all "All" FROM v$database; 2 3 4 5 6 Minimum Pri Uni For All -------- --- --- --- --- YES NO NO NO NO 2. Set the Environment variables in .bash_profile of user gguser on both source and target database servers.
  • 2. — source — TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_BASE=/opt/oracle/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME ORACLE_SID=TP; export ORACLE_SID PATH=$ORACLE_HOME/bin:/usr/sbin:/usr/local/bin:$PATH export PATH export OGG_HOME=/export/home/oracle/OGG export PATH=${OGG_HOME}:${OGG_HOME}/tools:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/export/home/oracle/OGG alias g="${OGG_HOME}/ggsci" — Detination — TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_BASE=/opt/oracle/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME ORACLE_SID=TS; export ORACLE_SID PATH=$ORACLE_HOME/bin:/usr/sbin:/usr/local/bin:$PATH export PATH export OGG_HOME=/export/home/oracle/OGG export PATH=${OGG_HOME}:${OGG_HOME}/tools:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/export/home/oracle/OGG alias g="${OGG_HOME}/ggsci" 3. Create the tablespace for both databases (source + target ) like: Create in Primary database which auto replicate in Standby database, in target data also create tablespace as like ggate user Create tablespace ggate datafile ‘/opt/oracle/app/oracle/oradata/TP/ggate01.dbf’ size 1000M autoextend on next 100M; 4. GoldenGate schema creation into source and target database create user ggate identified by ggate default tablespace ggate temporary tablespace TEMP profile DEFAULT; alter user ggate QUOTA UNLIMITED ON ggate; grant CONNECT to ggate; grant CREATE SESSION to ggate;
  • 3. grant RESOURCE to ggate; grant SELECT ANY TABLE to ggate; grant ALTER SESSION to ggate; grant CREATE TABLE to ggate; grant FLASHBACK ANY TABLE to ggate; grant SELECT ANY DICTIONARY to ggate; grant DBA to ggate; 5. Enable DDL in both Source and target database login as sysdba on both source and target run following steps… SQL> grant execute on utl_file to ggate; SQL> @marker_setup.sql SQL> @ddl_setup.sql SQL> @role_setup.sql SQL> grant GGS_GGSUSER_ROLE to ggate; And more important grant on dictionay views otherwise extract will keep on abending on both source and target schema (in our case IVR and IVR on both source and target. Schema name is same on both databases) — on source — SQL> grant select any dictionary to SCOTT; — on target — SQL> grant select any dictionary to SCOTT; 6. Manager Configuration in Source Side — Source Configuration that is testbed02 from TS (Standby database) —
  • 4. GGSCI (testdb02) 1> status all GGSCI (testdb02) 1> edit params mgr PORT 5000 lagreportminutes 5 laginfominutes 1 lagcriticalminutes 2 purgeoldextracts ./dirdat/t*, minkeepdays 2, usecheckpoints GGSCI (testdb02) 1> start mgr GGSCI (testdb02) 1> info all If manager is running then manager configuration is ok. 7. Trans data enable in table level GGSCI (testdb02) 1> dblogin userid ggate, password ggate GGSCI (testdb02 as ggate@TS) 20> list tables scott.* SCOTT.BONUS SCOTT.DEPT SCOTT.EMP SCOTT.SALGRADE Found 4 tables matching list criteria. If you see the list of tables then your configuration is good and you can continue: GGSCI (testdb02 as ggate@TS) 22> info trandata scott.* Logging of supplemental redo log data is disabled for table SCOTT.BONUS. Logging of supplemental redo log data is disabled for table SCOTT.DEPT. Logging of supplemental redo log data is disabled for table SCOTT.EMP.
  • 5. Logging of supplemental redo log data is disabled for table SCOTT.SALGRADE. Enable table level supplemental log from Primary Database alter table SCOTT.BONUS add supplemental log data (ALL) columns; alter table SCOTT.DEPT add supplemental log data (ALL) columns; alter table SCOTT.EMP add supplemental log data (ALL) columns; alter table SCOTT.SALGRADE add supplemental log data (ALL) columns; Now check in Source Standby Database GGSCI (testdb02 as ggate@TS) 23> info trandata scott.* Logging of supplemental redo log data is enabled for table SCOTT.BONUS. Columns supplementally logged for table SCOTT.BONUS: ALL. Logging of supplemental redo log data is enabled for table SCOTT.DEPT. Columns supplementally logged for table SCOTT.DEPT: ALL. Logging of supplemental redo log data is enabled for table SCOTT.EMP. Columns supplementally logged for table SCOTT.EMP: ALL. Logging of supplemental redo log data is enabled for table SCOTT.SALGRADE. Columns supplementally logged for table SCOTT.SALGRADE: ALL. 8. Extract Process ADD in Source Side connection in Standby Database Let’s create and configure now the extractor process, edit add these files and save: GGSCI (testdb02 as ggate@TS) 24> add extract extst1, tranlog, begin now EXTRACT added. GGSCI (testdb02 as ggate@TS) 25> add exttrail ./dirdat/k1, extract extst1, megabytes 100 EXTTRAIL added.
  • 6. GGSCI (testdb01 as ggate@SOURCE) 11> edit params EXTST1 extract extst1 SETENV (ORACLE_SID = "TS") userid ggate@TS, password ggate discardfile ./dirrpt/exts1.dsc,purge reportcount every 15 minutes, rate exttrail ./dirdat/k1 TRANLOGOPTIONS MINEFROMACTIVEDG CACHEMGR CACHESIZE 1GB table SCOTT.*; 9. After starting the extract process get error Extract on ADG: OGG-00868 The number of Oracle redo threads (2) is not the same as the number of checkpoint threads (1). (Doc ID 2004661.1) SQL> select group#, THREAD#, SEQUENCE#,STATUS from v$standby_log; GROUP# THREAD# SEQUENCE# STATUS ---------- ---------- ---------- ---------- 5 1 52 ACTIVE 6 1 0 UNASSIGNED 7 0 0 UNASSIGNED 8 0 0 UNASSIGNED SQL> alter database recover managed standby database cancel; Database altered. SQL> alter database drop standby logfile group 7;
  • 7. Database altered. SQL> alter database drop standby logfile group 8; Database altered. SQL> alter database recover managed standby database using current logfile disconnect; Database altered. 10. PUMP Process ADD in Source Side connection in Standby Database Extract process created, now we create the data pump process: GGSCI (testdb02) 8> add extract dpest1, exttrailsource ./dirdat/k1 EXTRACT added. GGSCI (testdb02) 9> add rmttrail ./dirdat/k1, extract dpest1, megabytes 100 RMTTRAIL added.GGSCI (testdb01 as ggate@SOURCE) 1> edit param dpest1 extract dpest1 passthru rmthost testdb01, mgrport 8000 rmttrail ./dirdat/k1 table SCOTT.*; //rmthost is the target server name or ip address. Ensure port 8000 is open on target server 11. Replicate Process ADD in Target Database — Destination Configuration — Target side on your ggsci prompt: GGSCI (testdb01) 2> dblogin userid ggate@SOURCE , password ggate Successfully logged into database. GGSCI (testdb01 as ggate@SOURCE) 3> ADD CHECKPOINTTABLE GGATE.CHKPTAB
  • 8. GGSCI (testdb01 as ggate@SOURCE) 4> add replicat repst1, exttrail ./dirdat/k1 CHECKPOINTTABLE GGATE.CHKPTAB REPLICAT added. Manager created and verified, now we are going to create replicate processes. GGSCI (testdb01 as ggate@SOURCE) 11> view param REPST1 replicat repst1 SETENV (ORACLE_SID = "SOURCE") userid ggate@SOURCE, password ggate discardfile ./dirrpt/rep1.dsc, purge assumetargetdefs reportcount every 15 minutes, rate batchsql deferapplyinterval 5 mins map SCOTT.*, target SCOTT.*; 12. Check the stats OGG is working Fine Source Standby Database Target Database