Professional Documents
Culture Documents
Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c On Linux PDF
Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c On Linux PDF
Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
Overview
Purpose
This Oracle-By-Example (OBE) tutorial covers configuring Oracle GoldenGate 12c data capture and data delivery, using Integrated Extract and Integrated Replicat.
Time to Complete
Approximately 45 minutes.
Introduction
Oracle GoldenGate provides very fast replication of heterogeneous databases by reading transaction logs and writing the changes to one or more target databases.
Oracle GoldenGate 11g introduced the Integrated Extract feature; Integrated Replicat was delivered with Oracle GoldenGate 12c.
In integrated capture mode, the Oracle GoldenGate Extract process interacts directly with the database log mining server which mines or reads the database redo log
files and captures the changes in the form of Logical Change Records (LCRs.) LCRs are written to the GoldenGate trail files.
In integrated mode, the Replicat process leverages the apply processing functionality that is available within the Oracle database. In this mode, Replicat operates as
follows:
This OBE instructs on how to configure data capture using Integrated Extract and how to configure data delivery using Integrated Replicat.
Scenario
There is one Linux host (or one Virtual Machine) running a 64 bit version of Linux (OL 6.x,) which runs the Oracle RDBMS 12cR1 (12.1.0). Two instances of the Oracle
GoldenGate 12c software run on the same host, one which simulates the replication source and the second which simulates the replication target.
ogguser - Password: Welcome1. The Oracle GoldenGate user. This user has DBA privileges and its schema does not contain replication objects. Oracle
GoldenGate uses this user to perform replication from the source schema to the target schema.
oggsrc - Password: Welcome1. The replication source schema. This user only has connect and resource privileges and its schema defines all replication
source objects.
oggtrg - Password: Welcome1. The replication target shcema. This user only has connect and resource privileges and its schema defines all replication
target objects.
The figure below gives a pictorial representation of the OBE environment from a logical standpoint:
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 1/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
NOTE: please pay attention to the color of the screen banners to know which commands are going to which environment. The convention is that the replication source
environment has red banners, while the replication target environment has green banners. Also note whether you are entering GGSCI commands, SQL commands, or
OS commands (the prompt at the beginning of each line will guide you).
The Oracle RDBMS must be installed in "standard" directory locations, according to the Optimal Flexible Architecture (OFA) guidelines. ORACLE_HOME points to
/u01/app/oracle/product/12.1.0/dbhome_1.
Hardware
One Linux host: it can be a virtual machine. This OBE uses Oracle Linux OL 6.5, 64-bit.
A different version of the Linux OS can also be used, as long as it is supported by Oracle Corporation such as RedHat and RedHat-based distributions. CentOS
can also be used.
Software
Oracle GoldenGate on Oracle, Linux-64 ( Oracle Software Delivery Cloud ), version 12.1.2.0.0, part number V40146-01. This is the part number for 64-bit Linux.
Oracle 12cR1 Database installed on the host.
Oracle DDL and DML files needed by this OBE, which can be downloaded here.
Prerequisites
IMPORTANT: This OBE assumes the presence on the computer of the software listed below:
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 2/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
p p
There are two OBEs in this section (Oracle Learning Library - Oracle GoldenGate) which cover creating the Oracle Database instance and installing the Oracle
Goldengate software:
Creating the Oracle Database Release 12c (12.1.0.1.0) Instance for Data Synchronization Using Oracle GoldenGate 12c on Linux
Installing Oracle GoldenGate for Oracle 12.1.2 on Linux EL 6.x/RHEL 6.x/CentOS 6.x
Before starting this OBE you are strongly advised to either complete the two OBEs mentioned above or, at least, make sure that you have a running Oracle database
instance called OGG12. The instance parameter STREAMS_POOL_SIZE should be set to at least 512M and the instance must be running in ARCHIVELOG mode. In
addition, this OBE assumes that the Oracle GoldenGate software is installed in the two directories /u01/app/oracle/product/ogg_src and
/u01/app/oracle/product/ogg_trg.
Bear in mind that there is one host, but there are two environments:
Each environment has three windows, to allow interaction with the OS, the Oracle GoldenGate Software Command Interface (GGSCI) and SQL, through sqlplus. That
makes six different places in which you could be typing! Try to be extra careful about which command you enter in which location. The wrong command in the wrong
context is the most common error.
Typographic Conventions
Text color and font in the directions and in the screens should be interpreted as follows:
Some_Command
You type this as a command or a value. Example:
" Enter ./ggsci to start the command line interpreter. "
Some_Prompt
The system responds with this as a prompt or reply. Example:
" After the welcome splash banner, you can enter commands at the GGSCI (host01) 1> prompt. "
Some_Button
Click this on-screen button. Example:
" After selecting the version you want, click Continue to start the download. "
Some_Variable
A variable that you substitute with a real value. Example:
" Enter your userid/password at the prompt. "
Some_Filename
A filename, path, or folder/directory. Example:
" Edit the hosts file in the /etc directory. "
Some_Code
A keyword or code element. Example:
" Change the parameter HandleCollisions to NoHandleCollisions after the initial load. "
File and process naming conventions can be whatever works for you or your company. Here are the sample conventions used in this OBE:
pxxxxhh.ext
where:
p=process=
e(xtract), p(ump), r(eplicat), i(nitial), d(efgen), s(tartup).
xxxx=project=
All files related to a common project xxxx, for example hr, sales, engr.
hh=host-to-host=
aa, ab, ba, bb, as indicated by source and target host names where a=host01, and b=host02. Later on you will see that you cannot use numbers as part of
some file names, so better not to go there at all.
ext=extension=
prm=parameter (stored in dirprm/), dsc=discard, rpt=report (stored in dirrpt/), def=definition (stored in dirdef/), oby=obey (stored in installation
directory), sql=SQL (stored in dirsql/).
1. Creating and Preparing the Database Users and Schemas for Replication.
1. The user ogguser. This user has a heightened level of privileges to allow the Oracle GoldenGate software to perform replication.
2. The user oggsrc. This is the unprivileged replication source user.
3. The user oggtrg. This is the unprivileged replication target user.
Additionally, you must download and unpack the SQL scripts used by this OBE to create database objects and data to be replicated between the replication source and
the replication target.
1. Position your mouse pointer somewhere in the main Gnome background and right-click. A pop-up window appears. Select and click "Open in Terminal"
twice to create two terminal windows:
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 3/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
2. Click and drag the second window to align it next to the first one:
3. Click the border of the left-most window to make it active, then click Terminal, and then select the Set Title option from the drop-down window:
4. Name the window OGGSRC. You will run the Oracle sqlplus utility connected to the source schema in this window:
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 4/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
5. Select the right-most window and click Terminal, then select Set Title and enter OGGTRG as the title for the window. You will run the Oracle sqlplus
utility connected to the target schema in this window:
6. Open a third terminal window. Click and drag the third window below the other two windows and name it "ROOT." You will connect to the "root" user and
perform commands which require superuser privileges in this window:
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 5/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
1. Select the "ROOT" window and use the su command to acquire superuser privileges. As per OBE requirements, the password for the OS user "root" is
"oracle.
Host01 - ROOT
[root@host01 ~]# su -
Password: ******
root@ologg ~]#
2. Create the /u02/oradata/ogg12/obe directory. Change ownership of the newly created directory to the oracle user.
Host01 - ROOT
Host01 - OGGSRC
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
LOG_MODE
------------
ARCHIVELOG
SQL>
The result should be ARCHIVELOG. You specified ARCHIVELOG mode when you created the database using DBCA. If you did not create the database in
ARCHIVELOG mode, do the following:
Host01 - OGGSRC
LOG_MODE
------------
NOARCHIVELOG
Database mounted.
SQL> ALTER DATABASE ARCHIVELOG;
Database altered.
LOG_MODE
------------
ARCHIVELOG
SQL>
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 6/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
2. Create two tablespaces, SRCDATA to host the replication source database objects, and TRGDATA to host the replication target database objects.
Host01 - OGGSRC
Tablespace created.
Tablespace created.
SQL>
3. Create an Oracle GoldenGate user that can connect to the source and target databases for transactional data (OGGUSER). An Oracle GoldenGate user
requires a database user with at least the following privileges:
SESSION
RESOURCE X X
or X
FLASHBACK ON <owner.table>
or X X
SELECT ON <owner.table>
CREATE TABLE X
EXECUTE on
DBMS_FLASHBACK package X
Host01 - OGGSRC
Host01 - OGGSRC
In order to save all this work and to keep the OBE simple, this step will "cheat" and assign the OGGUSER user the DBA privilege.
Host01 - OGGSRC
User created.
Grant succeeded.
SQL>
4. Create the OGGSRC and OGGTRG database users. The default tablespace for OGGSRC is SRCDATA. The default tablespace for OGGTRG is TRGDATA.
Th t l d th CO C d SO C i il O l 12 d th li i d i il f th SO C l
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 7/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
These two users only need the CONNECT and RESOURCE privileges. Oracle 12c removed the unlimited quota privilege from the RESOURCE role, so
you must now grant quota unlimited to the user.
Host01 - OGGSRC
User created.
Grant succeeded.
User altered.
User created.
User altered.
Grant succeeded.
5. You must enable minimal supplemental logging by executing the following commands:
Host01 - OGGSRC
Database altered.
System altered.
SUPPLEME FORCE_LOGGING
-------- ---------------------------------------
YES YES
SQL>
6. To ensure that the redo and archive logs contain supplemental log data, switch the logs by executing the following command:
Host01 - OGGSRC
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@host01 Desktop]$ cd ~
[oracle@host01 ~]$ mkdir obe
Download the OBE_DDL_FILES.zip file containing the sql scripts for this OBE.
Copy the zip file into the obe directory. The downloaded file is by default stored into the /home/oracle/Downloads directory.
Host01 - OGGSRC
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 8/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
2. On the Linux host, chnge directory to the obe directory under the default directory (/home/oracle) and expand the OBE_DDL_FILES.zip file there.
In this example the OBE_DDL_FILES.zip file is downloaded by the browser into the /tmp directory. The obe directory is created under /home/oracle
and then the zip file OBE_DDL_FILES.zip is extracted into the obe directory:
Host01 - OGGSRC
[oracle@host01 obe]$ ls
OBE_DDL_files.zip
[oracle@host01 obe]$ unzip OBE_DDL_FILES.zip
Archive: OBE_DDL_files.zip
inflating: drop_tables.sql
inflating: economic_entity.sql
inflating: gdp_by_year.sql
inflating: gdp_by_year_2008.sql
inflating: gdp_by_year_2009.sql
inflating: gdp_by_year_2010.sql
inflating: gdp_growth_by_year.sql
inflating: gdp_growth_by_year_2008.sql
inflating: gdp_growth_by_year_2009.sql
inflating: gdp_growth_by_year_2010.sql
inflating: oracle_table_creation.sql
[oracle@ologg obe]$
Host01 - OGGSRC
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
2. Run the the oracle_table_creation.sql script to create the required database objects. Make sure three tables have been created:
1. ECONOMIC_ENTITY
2. GDP_BY_YEAR
3. GDP_GROWTH_BY_YEAR
Host01 - OGGSRC
SQL> @oracle_table_creation.sql
Table created.
Table created.
Table created.
TABLE_NAME
--------------------------------------------------------------------------------
ECONOMIC_ENTITY
GDP_BY_YEAR
GDP_GROWTH_BY_YEAR
SQL>
Host01 - OGGSRC
SQL> @economic_entity.sql
1 row created.
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 9/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
1 row created.
1 row created.
Commit complete.
COUNT(*)
----------
235
SQL>
4. Select the OGGTRG window. Make sure your default directory is /home/oracle/obe and launch sqlplus, connecting to the replication target user
(OGGTRG.)
Host01 - OGGTRG
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
5. Run the the oracle_table_creation.sql script to create the required database objects in the replication target schema. Make sure three tables
have been created:
1. ECONOMIC_ENTITY
2. GDP_BY_YEAR
3. GDP_GROWTH_BY_YEAR
Host01 - OGGTRG
SQL> @oracle_table_creation.sql
Table created.
Table created.
Table created.
TABLE_NAME
--------------------------------------------------------------------------------
ECONOMIC_ENTITY
GDP_BY_YEAR
GDP_GROWTH_BY_YEAR
SQL>
Host01 - OGGTRG
SQL> @economic_entity.sql
1 row created.
1 row created.
1 row created.
Commit complete.
COUNT(*)
----------
235
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 10/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
SQL>
In this section you use the Oracle GoldenGate Software Command Interface (GGSCI) to set the parameters for the Oracle GoldenGate manager processes, and you
create a password wallet to avoid typing passwords in clear (and in the various scripts.) Later, you use the Oracle GoldenGate TRANDATA option to enable additional
logging, needed by the software to uniquely identify each row that has been changed in the database.
OGGSRC
OGGTRG
GGSCI_SRC
GGSCI_TRG
ROOT
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:$LD_LIBRARY_PATH
to the file ~/.bashrc and source that file. Change directory to the directory where the Oracle GoldenGate software has been installed (replication
source, /u01/app/oracle/product/ogg_src) and launch ggsci. Enter the info mgr command to verify that the manager is running.
Host01 - GGSCI_SRC
Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 11/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
3. Select the GGSCI_TRG window. Change directory to the directory where the Oracle GoldenGate software has been installed (replication target,
/u01/app/oracle/product/ogg_trg) and launch ggsci. Enter the info mgr command to verify that the manager is running.
Host01 - GGSCI_TRG
Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
4. Select the GGSCI_SRC window. Edit the parameter file for the manager. You can choose to edit the file using gedit instead of vi. In this case, enter the
command set editor gedit before entering the command edit param mgr. You specify the list of TCP/IP ports available to the manager process,
you request to purge the old extracts and you instruct the manager process to automatically start all Extracts whenever the manager process starts.
Additionally, the manager will try to restart failed processes three times, every minute until all retries are attempted. The parameters used are:
DynamicPortList
PurgeOldExtracts
Autostart
AutoRestart
Host01 - GGSCI_SRC
5. Select the GGSCI_TRG window. Add the same parameters you just added for the replication source. In this case, however, you set the auto start and auto
restart parameters for Replicats, rather than Etxracts.
Host01 - GGSCI_TRG
6. Select the GGSCI_SRC window. Stop and restart the manager to force it to re-read the newly defined parameters.
Host01 - GGSCI_SRC
7. Select the GGSCI_TRG window. Stop and restart the manager to force it to re-read the newly defined parameters.
Host01 - GGSCI_TRG
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 12/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
1. Select the GGSCI_SRC window. Create the wallet, add a credential store to it and add the user credentials for the OGGUSER user.
Host01 - GGSCI_SRC
Domain: OracleGoldenGate
Alias: ogg_user
Userid: ogguser@ogg12
2. Make sure the Oracle GoldenGate user can connect to the Oracle database using a credential alias.
Host01 - GGSCI_SRC
3. Select the GGSCI_TRG window. Leave ggsci. At the OS prompt, copy the wallet and credential files from GGSCI_SRC to GGSCI_TRG.
Host01 - GGSCI_TRG
4. Launch ggsci again and make sure the Oracle GoldenGate user can connect to the Oracle database using a credential alias also from the replication
target instance.
Host01 - GGSCI_TRG
Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
1. Select the GGSCI_SRC window. The last command entered was a succesful database connection for the Oracle GoldenGate user OGGUSER. Enter the
Add TranData command for all tables defined in the OGGSRC schema.
Host01 - GGSCI_SRC
Data capture, also known as Extract, is done on the source side. A primary extract is required; a secondary extract, known as a Data Pump, is optional but highly
recommended. To configure data capture, specifically an Integrated Extract, perform the following steps:
3.1 Configuring the Primary Integrated Extract on the Oracle source schema
1. Select the GGSCI_SRC window to create the primary Extract parameter file.
Using the naming conventions discussed in the Overview, the path/filename.ext will be dirprm/einta.prm. The path and extension will be
added automatically.
Host01 - GGSCI_SRC
Save the parameter file and leave the editor. Note the two parameters LOGALLSUPCOLS and UPDATERECORDFORMAT. The Integrated Replicat, which
you are going to configure shortly, requires the source extract parameter file to contain these new parameters introduced in 12c.
LOGALLSUPCOLS causes Extract to do the following with these supplementally logged columns:
Automatically includes in the trail record the before image for UPDATE operations.
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 14/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
Automatically includes in the trail record the before image for UPDATE operations.
Automatically includes in the trail record the before image of all supplementally logged columns for both UPDATE and DELETE operations
When two records are generated for an update to a single row, it incurs additional disk I/O and processing for both Extract and Replicat. If supplemental
logging is enabled on all columns, the unmodified columns may be repeated in both the the before and after records. The overall size of the trail is larger,
as well. This overhead is reduced by using UPDATERECORDFORMAT COMPACT
2. Login to the database, register the Integrated Extract and create the Extract group and the local Extract trail file.
Host01 - GGSCI_SRC
GGSCI (host01.example.com) > add extract einta, integrated tranlog, begin now
EXTRACT added.
Your SCN will be different. The Megabytes 10 is optional. The default is 100 Megabytes.
The primary Extract has been created and configured, but not started. Leave GGSCI running for the next step.
Using the naming conventions discussed in the Overview, the path/filename.ext will be dirprm/pinta.prm. The path and extension will be
added automatically.
The remote host RmtHost is host01 in the example. If you are running this OBE in one environment simulating both source and target hosts, be sure to
have host01 defined in /etc/hosts, pointing to 127.0.0.1. Alternatively, use localhost.
Perform a ping host01 to make sure that the address is correctly resolved to 127.0.0.1.
If the hostname host01 cannot be resolved into a valid IP Address, the Extract pump won't start.
Host01 - GGSCI_SRC
Extract pinta
SETENV (ORACLE_SID='ogg12')
UserIdAlias ogg_user
rmthost localhost, mgrport 7909
rmttrail ./dirdat/pn
table OGGSRC.*;
Save the file leaving the editor. You can check your work by entering View Param pinta any time.
2. Create the data pump group and the remote Extract trail file.
Host01 - GGSCI_SRC
The data pump reads from the local trail file in and writes to the remote trail file pn. The remote trail file that will be created will be named
dirdat/pn000000,
then when that one fills up the next will be dirdat/pn000001, then dirdat/pn000002, and so on.
The secondary Extract has been created and configured, but not started. Leave GGSCI running for the next step.
3.3 Starting the Primary Extract and the Data Pump Processes
1. Start the two Extract processes Einta and Pinta.
Host01 - GGSCI_SRC
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 15/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
2. Enter the Info All command to assess the status of the two Extract processes. It is not unusual for the Integrated Extract to take a few seconds to
start. In this case, the status for the Integrated Extract is STARTING.
Host01 - GGSCI_SRC
MANAGER RUNNING
EXTRACT STARTING EINTA 00:00:00 20:43:37
EXTRACT RUNNING PINTA 00:00:00 00:00:03
MANAGER RUNNING
EXTRACT STARTING EINTA 00:00:00 20:43:41
EXTRACT RUNNING PINTA 00:00:00 00:00:07
MANAGER RUNNING
EXTRACT RUNNING EINTA 20:44:16 00:00:01
EXTRACT RUNNING PINTA 00:00:00 00:00:03
Make sure both Extract processes are in a RUNNING status before going to the next step.
When the replication target is a database, data delivery is accomplished by a Replicat process. This OBE simulates replication between
two schemas (oggsrc, the replication source and oggtrg, the replication target ) of the same database (ogg12.)
To configure data delivery, perform the following steps:
Host01 - GGSCI_TRG
Replicat rinta
SETENV(ORACLE_SID='ogg12')
DBOPTIONS INTEGRATEDPARAMS(parallelism 6)
AssumeTargetDefs
DiscardFile ./dirrpt/rpdw.dsc, Purge
UserIdAlias ogg_user
Map oggsrc.*, target oggtrg.*;
The parameter DBOPTIONS INTEGRATEDPARAMS(parallelism 6) denotes that for this Integrated Replicat, you are specifying that the minimum
number of parallel apply processes will be 6.
2. Connect to the database and add the Replicat rinta, connecting it to the Exttrail ./dirdat/pn
Host01 - GGSCI_TRG
MANAGER RUNNING
REPLICAT RUNNING RINTA 00:00:00 00:00:39
Host01 - GGSCI_TRG
The output specifies that rinta is an Integrated Replicat process. You can also enter "Info rinta, Detail" to display the most detailed information.
Host01 - GGSCI_TRG
INTEGRATED Replicat
DBLOGIN Provided, inbound server name is OGG$RINTA in ATTACHED state
In all cases, the Status should be RUNNING, and the time since the last update or checkpoint should be under 10 seconds.
2. Select the OGGSRC window, where sqlplus is running connected to the replication source schema. Connect as sysdba to be able to access the data
dictionary tables. The rinta Replicat process is "Integrated," which means that the Oracle database knows about it. There are several Oracle
GoldenGate views defined in the database data dictionary which can be queried to display information about Oracle GoldenGate queues and processes.
Host01 - OGGSRC
REPLICAT_NAME SERVER_NAME
----------------------------- ------------------------------
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 17/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
RINTA OGG$RINTA
APPLY_NAME QUEUE_NAME
------------------------------ ------------------------------
OGG$RINTA OGGQ$RINTA
OGG$EINTA OGG$Q_EINTA
SQL>
3. Select the GGSCI_SRC window. Display information about all processes on the replication source instance.
Host01 - GGSCI_SRC
MANAGER RUNNING
EXTRACT RUNNING EINTA 00:00:05 00:00:01
EXTRACT RUNNING PINTA 00:00:00 00:00:05
Host01 - GGSCI_SRC
Similar to the Extract on the Green Host, the Status should be RUNNING, and the time since the last update or checkpoint should be under 10 seconds.
Host01 - GGSCI_SRC
./dirdat/pn 0 0 10 RMTTRAIL
Everything should show a status of RUNNING. The source tables are still empty. No data has flowed yet, nothing has replicated yet.
There is a difference in how you replicate an existing table (more complicated) versus starting with a new empty table (simpler). To generate sample data against an
empty set of tables, perform the following steps:
Select the OGGSRC window, where sqlplus is running connected as sysdba. Leave sqlplus and make sure that the default directory at the OS prompt
is /home/oracle/obe. If /home/oracle/obe is not yur default directory, change directory to /home/oracle/obe before launching sqlplus.
Launch sqlplus again, connecting to the Oracle database as OGGSRC.
Execute the gdp_by_year_2008.sql script, then compute the number of rows in the table GDP_BY_YEAR.
Host01 - OGGSRC
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> @gdp_by_year_2008.sql
1 row created.
1 row created.
1 row created.
Commit complete.
COUNT(*)
----------
235
SQL>
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 19/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
There should not be any errors. Leave SQL*Plus running for the next step.
2. Verify that the rows were inserted into the table in the replication target schema (oggtrg.) Select the OGGTRG window, which should already be running
sqlplus connected to the Oracle database as OGGTRG. If that is not the case, launch sqlplus connecting to the Oracle database as OGGTRG.
Host01 - OGGTRG
COUNT(*)
----------
235
SQL>
3. Verify that the source GGSCI Extract processes are still running.
Host02 - GGSCI_SRC
MANAGER RUNNING
EXTRACT RUNNING EINTA 00:00:06 00:00:01
EXTRACT RUNNING PINTA 00:00:00 00:00:07
If the Status says ABENDED, then check the process reports to see what the error was.You should use the
command "view report einta" or "view report pinta" to find out what happened to the Extract group.
4. Use the Stats command to request the Extract processes EINTA and PINTA to display to the screen statistics
about their run so far:
Host01 - GGSCI_SRC
Output to ./dirdat/in:
End of Statistics.
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 20/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
Sending STATS request to EXTRACT PINTA ...
Output to ./dirdat/pn:
End of Statistics.
5. Verify that the target GGSCI Integrated Replicat process is still running.
Select the GGSCI_TRG window, GGSCI should still be running. Enter the following command:
Host01 - GGSCI_TRG
MANAGER RUNNING
REPLICAT RUNNING RINTA 00:00:00 00:00:05
If the Status says ABENDED, then check the process reports to see what the error was. You should use the command
view report rinta to find out what happened to the Replicat group.
6. Use the Stats command to request the Replicat process RINTA to display to the screen statistics about its run so far:
Host01 - GGSCI_TRG
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 21/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
*** Daily statistics since 2014-02-04 00:12:58 ***
Total inserts 235.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 235.00
End of Statistics.
Host01 - OGGSRC
SQL> UPDATE ECONOMIC_ENTITY set CONTINENT = 'Not a continent' WHERE CONTINENT = 'N/A';
36 rows updated.
SQL> commit;
Commit complete.
SQL>
2. Select the GGSCI_SRC window. Use the Stats command to request the Extract processes EINTA and PINTA to display to the screen statistics about
their run so far:
Host01 - GGSCI_SRC
Output to ./dirdat/in:
End of Statistics.
Output to ./dirdat/pn:
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 23/25
6/20/2019 Configuring Integrated Extract and Integrated Replicat Using Oracle GoldenGate 12c on Linux
End of Statistics.
3. Verify that the target GGSCI Integrated Replicat process is still running.
Host01 - GGSCI_TRG
MANAGER RUNNING
REPLICAT RUNNING RINTA 00:00:00 00:00:00
If the Status says ABENDED, then check the process reports to see what the error was. You should use the command
view report rinta to find out what happened to the Replicat group
4. Use the Stats command to request the Replicat process RINTA to display to the screen statistics about its run so far:
Host01 - GGSCI_TRG
End of Statistics.
This completes the configuration and operation of the basic heterogeneous unidirectional functionality of Oracle GoldenGate: Extract, Data Pump, and Delivery
Replicat.
Summary
Oracle GoldenGate can do far more than was demonstrated in this simple exercise.
Configure and start Integrated Extract, Data Pump, and data delivery Integrated Replicat processes.
Generate sample data and test the validity of the replication
Generate simple statistics on the rows transferred by the replication processes (both Extract and Replicat)
Resources
Oracle GoldenGate Product Documentation version 12.1.2 ( http://docs.oracle.com/goldengate/1212/gg-winux/docs.htm) and other older versions
Courses from Oracle University
External Web sites for related information
To learn more about Oracle GoldenGate, refer to additional OBEs in the Oracle Learning Library
Credits
https://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/goldengate/12c/OGG12c_Integrated_Replicat/index.html 25/25