Configuring An Oracle Goldengate Downstream Integrated Extract/Replicat
Configuring An Oracle Goldengate Downstream Integrated Extract/Replicat
Configuring An Oracle Goldengate Downstream Integrated Extract/Replicat
This note describes the steps involved in configuring an Oracle GoldenGate replication environment using a Downstream Capture database.
Environment
In this example we will be deploying Integrated Extract in a downstream mining database using real-time mining.
For this we need to create standby redo logs so that the source database can use Oracle Data Guard redo transport to send redo to the
downstream mining database as it is written to the online redo log at the source.
On the source database obtain the size and number of online redo log files
16 rows selected.
On the Downstream Capture database, we will create standby redo log file groups. The size of the standby redo log file groups should be same as
the online redo log file and the number of standby redo log file groups needs to be one more in number than the number of online redo log file
groups.
So in this case we will create the Redo log files also of size 1000 MB and create 2 groups of Standby Redo log files with 9 members in each group
(8+1) and of size 1000 MB.
On the source database enable supplemental logging as well as force logging if not already enabled.
SUPPLEME FORCE_LOGGING
-------- ---------------------------------------
NO YES
Database altered.
Important – Redo log file size should be the same as the size of the Standby Redo Log file size
Create the GoldenGate user in both the source as well as Downstream database
On both the Source as well as Downstream Capture database add the following parameters
System altered.
System altered.
System altered.
System altered.
Create the Standby Redo Log Files on the Downstream Capture database
Note since the Source database is a two node RAC cluster, we need to create two threads of Standby Log files
SQL>
alter database add standby logfile thread 1
group 29 size 1000m,
group 30 size 1000m,
group 31 size 1000m,
group 32 size 1000m,
group 33 size 1000m,
group 34 size 1000m,
group 35 size 1000m,
group 36 size 1000m,
group 37 size 1000m;
Database altered.
Database altered.
Copy the password file from Source database $ORACLE_HOME/dbs to the $ORACLE_HOME/dbs directory on the server hosting the
OGGDB Downstream Capture database
Create a separate directory which will hold the archive log files received from the Source database. The Downstream Capture database
will also generate some archive log files which are stored in the location specified by the parameter DB_RECOVERY_FILE_DEST
ASMCMD> pwd
+BSCS_AUX_FRA/OGGDB/ARCHIVELOG
ASMCMD> ls
2015_12_08/
ASMCMD> cd REMOTE
ASMCMD> pwd
System altered.
System altered.
System altered.
On the server hosting the Source database, $ORACLE_HOME/network/admin add the entries to the tnsnames.ora
SOURCEDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host01-scan)(PORT = 1524))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SOURCEDB)
)
)
OGGDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host02-scan)(PORT = 20070))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oggdb)
On the server hosting the Downstream database, $ORACLE_HOME/network/admin add the entries to the tnsnames.ora
OGGDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host02-scan)(PORT = 20070))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oggdb)
)
)
PRODDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host02-scan)(PORT = 20070))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = srv_PRODDB)
)
)
SOURCEDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host01-scan)(PORT = 1524))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SOURCEDB)
)
)
Ensure that we are able to connect as the user OGGSUSER to both the source database as well as the Downstream Capture database on
server host01 and as user OGGSUSER to the Downstream Capture database, Target PRODDB database as well as the source SOURCEDB
database on server host02.
DESTINATION
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
VALID
oggdb
VALID
Alias: oggsuser_PRODDB
Userid: oggsuser@PRODDB
GGSCI (host02) 2> alter credentialstore add user oggsuser@sourcedb alias oggsuser_sourcedb
Password:
GGSCI (host02) 3> alter credentialstore add user oggsuser@oggdb alias oggsuser_oggdb
Password:
2015-12-08 04:33:54 INFO OGG-01788 SCHEMATRANDATA has been added on schema SAPCD3.
2015-12-08 04:35:45 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema
SAPCD3.
GGSCI (host02 as oggsuser@SOURCEDB) 3> add extract eSOURCEDB integrated tranlog begin now
EXTRACT added.
GGSCI (host02 as oggsuser@SOURCEDB) 12> add replicat rSOURCEDB integrated exttrail ./dirdat/SOURCEDB/rt
REPLICAT (Integrated) added.
Parameter files
EXTRACT eSOURCEDB
USERIDALIAS oggsuser_sourcedb
EXTTRAIL ./dirdat/SOURCEDB/lt
TABLE SAPCD3.*;
EXTRACT pSOURCEDB
USERIDALIAS oggsuser_sourcedb
RMTTRAIL ./dirdat/SOURCEDB/rt
PASSTHRU
TABLE SAPCD3.*;
REPLICAT rSOURCEDB
Check that the Capture process has been created in the Downstream database and not the Source database
no rows selected
CAPTURE_NAME
--------------------------------------------------------------------------------
OGG$CAP_ESOURCEDB
Take the Export from Source and Import into the Target database. Obtain the CURRENT_SCN from V$DATABASE.