Skip to content

Commit d745f08

Browse files
Merge pull request #38 from oracle-devrel/lift-GG-replication
Lift gg replication
2 parents 8dd2c0d + 45738b6 commit d745f08

File tree

5 files changed

+228
-0
lines changed

5 files changed

+228
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2023 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# GoldenGate N Way Configuration
2+
3+
This document articulates the best practices for OCI Goldengate N-way replication in terms of generic capabilities and provides guidance and options on how those capabilities can be implemented.
4+
5+
## When to use this asset?
6+
7+
This will provide methods and best practices to achieve real-time data replication using OCI GoldenGate for bi-directional cross-region setup and uni-directional setup across the same region between Database Cloud Service(DBCS) and Autonomous Data Warehouse(ADW).
8+
9+
## How to use this asset?
10+
11+
Users of this document should have a working knowledge of GoldenGate and OCI Oracle Databases.
12+
13+
- GoldenGate to set up bi-directional replication between DBCS (Region1) and DBCS(Region2).
14+
- GoldenGate to set up uni-directional replication between DBCS and ADW for both regions.
15+
16+
17+
# License
18+
19+
Copyright (c) 2023 Oracle and/or its affiliates.
20+
21+
Licensed under the Universal Permissive License (UPL), Version 1.0.
22+
23+
See [LICENSE](LICENSE) for more details.
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<!-- Copyright (c) 2023, Oracle and/or its affiliates.
2+
Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
Purpose: Configuration files for GG N-way replication best practice.
4+
@author: Saravanadurai Rajendran & Divya Batra -->
5+
6+
# Parameter files for GG in Region1:
7+
8+
## EXTRACT EXT1 (Extract for bi-directional between Region1 DBCS and Region2 DBCS)
9+
10+
```
11+
EXTRACT EXT1
12+
USERIDALIAS cdbregion1 DOMAIN OracleGoldenGate
13+
EXTTRAIL E1
14+
-- Capture DDL operations for listed schema tables
15+
ddl include mapped
16+
17+
-- Add step-by-step history
18+
-- to the report file. Very useful when troubleshooting.
19+
ddloptions report
20+
21+
-- Write capture stats per table to the report file daily.
22+
report at 00:01
23+
24+
-- Rollover the report file weekly. Useful when IE runs
25+
-- without being stopped/started for long periods of time to
26+
-- keep the report files from becoming too large.
27+
reportrollover at 00:01 on Sunday
28+
29+
-- Report total operations captured, and operations per second
30+
-- every 10 minutes.
31+
reportcount every 10 minutes, rate
32+
tranlogoptions excludeuser REGION1_PDB1.ggadmin
33+
-- Included schemas
34+
TABLE REGION1_PDB1.<<Schema>>.*;
35+
```
36+
37+
## EXTRACT EXT2 (Extract for uni-directional replication between Region1 DBCS and Region1 ADW)
38+
39+
```
40+
EXTRACT EXT2
41+
USERIDALIAS cdbregion1 DOMAIN OracleGoldenGate
42+
EXTTRAIL E2
43+
reportcount every 15 minutes, rate
44+
DDL INCLUDE MAPPED
45+
ddloptions report
46+
-- Included schemas
47+
TABLE REGION1_PDB1.<<Schema>>.*;
48+
```
49+
50+
## REPLICAT REP1 (Replicat for bi-directional between Region1 DBCS and Region2 DBCS)
51+
52+
```
53+
REPLICAT REP1
54+
USERIDALIAS pdbregion2 DOMAIN OracleGoldenGate
55+
reportcount every 15 minutes, rate
56+
DBOPTIONS INTEGRATEDPARAMS(parallelism 2)
57+
DDL INCLUDE MAPPED
58+
MAP REGION1_PDB1.<<Schema>>.*, TARGET REGION2_PDB1.<<Schema>>.*;
59+
```
60+
61+
## REPLICAT REP2 (Replicat for uni-directional replication between Region1 DBCS and Region1 ADW)
62+
63+
```
64+
REPLICAT REP2
65+
USERIDALIAS adwregion1 DOMAIN OracleGoldenGate
66+
reportcount every 15 minutes, rate
67+
DDL INCLUDE MAPPED
68+
MAP REGION1_PDB1.<<Schema>>.*, TARGET .<<Schema>>.*;
69+
```
70+
71+
# Parameter files for GG in Region2:
72+
73+
## EXTRACT EXT3 (Extract for bi-directional between Region2 DBCS and Region1 DBCS)
74+
75+
```
76+
EXTRACT EXT3
77+
USERIDALIAS cdbregion2 DOMAIN OracleGoldenGate
78+
EXTTRAIL E3
79+
-- Capture DDL operations for listed schema tables
80+
ddl include mapped
81+
82+
-- Add step-by-step history
83+
-- to the report file. Very useful when troubleshooting.
84+
ddloptions report
85+
86+
-- Write capture stats per table to the report file daily.
87+
report at 00:01
88+
89+
-- Rollover the report file weekly. Useful when IE runs
90+
-- without being stopped/started for long periods of time to
91+
-- keep the report files from becoming too large.
92+
reportrollover at 00:01 on Sunday
93+
94+
-- Report total operations captured, and operations per second
95+
-- every 10 minutes.
96+
reportcount every 10 minutes, rate
97+
tranlogoptions excludeuser REGION2_PDB1.ggadmin
98+
-- Included schemas
99+
TABLE REGION2_PDB1.<<Schema>>.*;
100+
```
101+
102+
## EXTRACT EXT4 (Extract for uni-directional replication between Region2 DBCS and Region2 ADW)
103+
104+
```
105+
EXTRACT EXT4
106+
USERIDALIAS cdbregion2 DOMAIN OracleGoldenGate
107+
EXTTRAIL E4
108+
reportcount every 15 minutes, rate
109+
DDL INCLUDE MAPPED
110+
-- Included schemas
111+
TABLE REGION2_PDB1.<<Schema>>.*;
112+
```
113+
114+
## REPLICAT REP3 (Replicat for bi-directional between Region2 DBCS and Region1 DBCS)
115+
116+
```
117+
REPLICAT REP3
118+
USERIDALIAS pdbregion1 DOMAIN OracleGoldenGate
119+
reportcount every 15 minutes, rate
120+
DBOPTIONS INTEGRATEDPARAMS(parallelism 2)
121+
DDL INCLUDE MAPPED
122+
MAP REGION2_PDB1.<<Schema>>.*, TARGET REGION1_PDB1.<<Schema>>.*;
123+
```
124+
125+
## REPLICAT REP4 (Replicat for uni-directional replication between Region2 DBCS and Region2 ADW)
126+
127+
```
128+
REPLICAT REP4
129+
USERIDALIAS adwregion2 DOMAIN OracleGoldenGate
130+
reportcount every 15 minutes, rate
131+
DDL INCLUDE MAPPED
132+
MAP REGION2_PDB1.<<Schema.*, TARGET <<Schema>>.*;
133+
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Introduction
2+
3+
This document articulates the best practices for OCI Goldengate N-way replication in terms of generic capabilities and provides guidance and options on how those capabilities can be implemented.
4+
5+
This will provide methods and best practices to achieve real-time data replication using OCI GoldenGate for bi-directional cross-region setup and uni-directional setup across the same region between Database Cloud Service(DBCS) and Autonomous Data Warehouse(ADW).
6+
However, the same asset can be used to perform replication between other Oracle Databases as well.
7+
8+
Owners: Saravanadurai Rajendran and Divya Batra
9+
10+
## Logical Architecture
11+
12+
![Logical Architecture](Architecture.png)
13+
14+
### Scope & Context
15+
16+
This solution has been built to create a resilient infrastructure capable to withstand planned/unplanned outages of any critical component/service for the following scenarios while achieving the recovery point objective (RPO) and recovery time objective (RTO).
17+
18+
- Planned maintenance, including upgrades.
19+
- Recoverable local failure.
20+
- Unrecoverable or site failure.
21+
22+
### Considerations
23+
24+
Application in each region will function independently. However, the databases between the two regions (Region1 and Region2) are synchronized via bi-directional change replication using Oracle GoldenGate. During normal operation, database connection requests will be distributed to one of the systems in either region.
25+
In case of disaster recovery, all requests will be directed to the available database system. This active/active architecture will be able to handle the following planned and unplanned outages.
26+
Also, Uni-directional replication has been set up between DBCS and ADW in the same region (for reporting needs).
27+
28+
#### GoldenGate Configuration
29+
GoldenGate configuration/parameter files for this N-way and cross-region replication between DBCS and ADW can be referred to in “GoldenGate-N-way-replication-config.md”.
30+
31+
32+
33+
34+
35+
36+
37+
762 KB
Loading

0 commit comments

Comments
 (0)