Configuring Oracle Goldengate Ogg 11Gr2 Downstream Integrated Capture
Configuring Oracle Goldengate Ogg 11Gr2 Downstream Integrated Capture
Configuring Oracle Goldengate Ogg 11Gr2 Downstream Integrated Capture
capture
Introduced in OGG 11gR2, the integrated extract uses Oracle Streams API to
integrate with an Oracle logminig server to capture data changes as logical
change records (LCR). The transaction log capture used in OGG versions prior
to OGG 11gR2 was renamed to a CLASSIC extract. Downstream integrated capture
requires a dedicated downstream database, offloading the source database, and
deploys a redo shipping mechanism, conceptually similar to the redo transport
in an Oracle Data Guard, for transferring the redo changes from the source
database to the downstream database. The downstream database is responsible
for running the logmining server mining the redo received from the primary
database. Thus, the source and downstream mining database must be on the same
platform. For example, if the source database is running on Linux 64-bit, the
downstream database must also be on the Linux 64-bit platform.
1. Extract capture data changes against the source database and write them
to the trail file
2. Replicat applies the changes from the trail file
Zooming into the integration of the Source database, downstream database and
OGG extract we have the additional links:
The downstream database should be 11.2.0.3 with patch as per MOS Doc ID
1411356.1. The source database can be any Oracle database supported by OGG
11gR2. The source database cannot be a version higher than the downstream
database. Look at the certification matrix for detail information for
certified combination of OS and databases here or in MOS.
RACDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RACDB)
)
)
2. Set redo shipment on the source database to the downstream database for
all instances
The article makes an assumption that OGG 11gR2 is installed and configured
and database users are dedicated on both source database for extract and the
target database for replicat. For an example how to install OGG in an Oracle
RAC 11.2.0.3 cluster environment look at here.
1. Make sure that the downstream database has a local archiving enabled.
Explicitly specify the location if FRA is used.
4. Add standby redo logs on the downstream database. There are two things
to consider. Size of the standby redo log should be same or bigger as
the size of the redo logs on the source database(s). Add one more (n+1)
standby log groups as the existing (n) on the source database.
There are two source redo log groups per thread are as follows on the
source.
SQL>
I created 3 redo log groups size with the same size as on the
downstream database.
6 rows selected .
7. Make sure that the downstream database is 11.2.0.3 with patch specified
in MOS Doc ID 1411356.1 and COMPATIBLE=’11.2.0.3’.
8. On all nodes running both source and downstream database create
password file for authentication in $ORACLE_HOME/dbs. Make sure that
you use ignorecase=y option.
9. Done.
1. Create a test table for the replication on the source and target
database.
GGSCI (raclinux1.gj.com) 11> add extract extdown, integrated tranlog, begin now
EXTRACT added.
replicat repdown
--reperror(default,ignore)
SETENV (ORACLE_SID = "RACDB1")
userid ogg_replicat, password ogg_replicat
assumetargetdefs
discardfile ./dirrpt/repdown.dsc, purge
map test4.seat_booking, target test4.seat_booking;
8. Add a Replicat
On RACD1
On RACD2
ID PASSENGER_NAME TIMESTAMP
---------- -------------------------------------------------- ---------
FLIGHT_NO SEAT_NO FLIGHT_TI
---------- ------------------- ---------
1 28-OCT-12
200 B1 28-OCT-12
2 28-OCT-12
200 B2 28-OCT-12
3 28-OCT-12
200 B3 28-OCT-12
ID PASSENGER_NAME TIMESTAMP
---------- -------------------------------------------------- ---------
FLIGHT_NO SEAT_NO FLIGHT_TI
---------- ------------------- ---------
4 28-OCT-12
200 B4 28-OCT-12
5 28-OCT-12
200 B5 28-OCT-12
6 28-OCT-12
200 B6 28-OCT-12
6 rows selected.
SQL>
ID PASSENGER_NAME TIMESTAMP
---------- -------------------------------------------------- ---------
FLIGHT_NO SEAT_NO FLIGHT_TI
---------- ------------------- ---------
5 Alejandro Garc??a 28-OCT-12
200 B5 28-OCT-12
1 28-OCT-12
200 B1 28-OCT-12
ID PASSENGER_NAME TIMESTAMP
---------- -------------------------------------------------- ---------
FLIGHT_NO SEAT_NO FLIGHT_TI
---------- ------------------- ---------
2 28-OCT-12
200 B2 28-OCT-12
6 rows selected.
6 rows deleted.
SQL> commit;
Commit complete.
SQL>
no rows selected
SQL>
1. Issue 1
2. Issue 2
3. Issue 3
System altered.
SQL>
4. Issue 4
5. Issue 5
BEGIN DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE
(grantee=>'ogg_extract',
privilege_type=>'capture',grant_select_privileges=>true,
do_grants=>TRUE); END;
*
ERROR at line 1:
ORA-04031: unable to allocate 45664 bytes of shared memory
("shared
pool","GGS_DDL_TRIGGER_BEFORE","KKTSR^81131d18","trigger source")
ORA-06512: at "SYS.DBMS_XSTREAM_ADM_INTERNAL", line 2268
ORA-06512: at "SYS.DBMS_GOLDENGATE_AUTH", line 24
ORA-06512: at line 1
SQL>
Make sure that you have a proper memory allocation at database level
and at OS level /dev/shm if OEL 5.X is used.
6. Issue 6
Errors in file /u01/app/oracle/diag/rdbms/racd/RACD1/trace/RACD1_m000_10405.trc:
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","unknown
object","KKSSP^98","kglseshtSegs")
Process m000 died, see its trace file
2012-10-28 14:32:16.520000 +02:00
Dumping diagnostic data in directory=[cdmp_20121028143222], requested by
(instance=2, osid=20338 (M000)), summary=[incident=88665].
2012-10-28 14:32:42.376000 +02:00
Errors in file /u01/app/oracle/diag/rdbms/racd/RACD1/trace/RACD1_mmon_9935.trc:
ORA-04031: unable to allocate 1072 bytes of shared memory ("shared pool","select
o.owner#,o.name,o.nam...","sga heap(1,1)","KQR L PO")
2012-10-28 14:32:49.260000 +02:00
Errors in file /u01/app/oracle/diag/rdbms/racd/RACD1/trace/RACD1_mmon_9935.trc:
ORA-04031: unable to allocate 1072 bytes of shared memory ("shared pool","select
i.obj#,i.ts#,i.file#,...","sga heap(1,1)","KQR L PO")
2012-10-28 14:33:08.989000 +02:00
Errors in file /u01/app/oracle/diag/rdbms/racd/RACD1/trace/RACD1_m001_10479.trc:
ORA-04031: unable to allocate 760 bytes of shared memory ("shared pool","unknown
object","KKSSP^29","kglss")
Process m001 died, see its trace file
2012-10-28 14:33:23.739000 +02:00
Starting background process CJQ0
CJQ0 started with pid=29, OS id=10494
2012-10-28 14:33:30.072000 +02:00
Restarting dead background process CJQ0
CJQ0 started with pid=29, OS id=10518
2012-10-28 14:33:33.473000 +02:00
Starting ORACLE instance (normal)
2012-10-28 14:33:37.766000 +02:00
Errors in file /u01/app/oracle/diag/rdbms/racd/RACD1/trace/RACD1_smon_9927.trc:
ORA-00604: error occurred at recursive SQL level 2
ORA-04031: unable to allocate 1072 bytes of shared memory ("shared pool","select
i.obj#,i.ts#,i.file#,...","sga heap(1,1)","KQR L PO")
Make sure that you have a proper memory allocation at database level
and at OS level /dev/shm if OEL 5.X is used.
Summary
Appendix
GoldenGate downstream capture: turning on downstream_real_time_mine
GoldenGate CAPTURE CP01 for OGG$CAP_EXTDOWN with pid=35, OS id=10691 is in combined capture and
apply mode.
Starting persistent Logminer Session with sid = 1 for GoldenGate Capture OGG$CAP_EXTDOWN
LOGMINER: EndScn: 0
LOGMINER: session#=1 (OGG$CAP_EXTDOWN), preparer MS03 pid=69 OS id=1 0702 sid=88 started
RFS[7]: Selected log 8 for thread 2 sequence 143 dbid 1643830466 branch 787454697
RFS[8]: Selected log 9 for thread 2 sequence 142 dbid 1643830466 branch 787454697