- You must create three users on the ogg12 database:
- The user ogguser. This user has a heightened level of privileges to allow the Oracle GoldenGate software to perform replication.
- The user oggsrc. This is the unprivileged replication source user.
- The user oggtrg. This is the unprivileged replication target user.
1.1 Creating Terminal Shells for "root", "oggsrc" and "oggtrg."
- Login to the Linux computer using a Gnome environment connected as oracle.






1.2 Creating Directories for the database files.
- Create the containers for the database files. You will create two tablespaces, the first to host the objects for the replication source, and the second to host the replicated objects on the replication target.
Host01 - ROOT |
[root@host01 ~]# su - Password: ****** root@ologg ~]# |
Host01 - ROOT |
[root@host01 ~]# mkdir -p /u02/oradata/ogg12/obe [root@host01 ~]# chown oracle.oinstall /u02/oradata/ogg12/obe |
1.3 Creating database tablespaces and users.
Host01 - OGGSRC |
[oracle@host01 ~]$ export ORACLE_SID=ogg12 [oracle@host01 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Sun Feb 2 13:28:59 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. 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> SELECT log_mode FROM v$database; LOG_MODE ------------ ARCHIVELOG SQL> |
Host01 - OGGSRC |
LOG_MODE ------------ NOARCHIVELOG SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 2137886720 bytes Fixed Size 2290416 bytes Variable Size 1744833808 bytes Database Buffers 385875968 bytes Redo Buffers 4886528 bytes Database mounted. SQL> ALTER DATABASE ARCHIVELOG; Database altered. SQL> ALTER DATABASE OPEN; Database altered. SQL> SELECT log_mode FROM v$database; LOG_MODE ------------ ARCHIVELOG SQL> |
Host01 - OGGSRC |
SQL> create tablespace srcdata datafile '/u02/oradata/ogg12/obe/srcdata01.dbf' size 50M autoextend on extent management local uniform size 256k; Tablespace created. SQL> create tablespace trgdata datafile '/u02/oradata/ogg12/obe/trgdata01.dbf' size 50M autoextend on extent management local uniform size 256k; Tablespace created. SQL> |
User Privilege
|
Extract (Source Side)
|
Replicat (Target Side)
|
CREATE SESSION, ALTER
SESSION
|
X
|
X
|
RESOURCE
|
X
|
X
|
SELECT ANY DICTIONARY
|
X
|
X
|
FLASHBACK ANY TABLE
or
FLASHBACK ON <owner.table>
|
X
| |
SELECT ANY TABLE
or
SELECT ON <owner.table>
|
X
|
X
|
INSERT, UPDATE, DELETE ON <target tables>
|
X
| |
CREATE TABLE
|
X
| |
EXECUTE on DBMS_FLASHBACK package
|
X
|
Host01 - OGGSRC |
SQL> EXEC DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('OGGUSER');
|
Host01 - OGGSRC |
SQL> set pages 100 SQL> desc dbms_goldengate_auth SQL> SELECT text FROM all_source WHERE name='DBMS_GOLDENGATE_AUTH'; SQL> |
Host01 - OGGSRC |
SQL> create user OGGUSER identified by Welcome1 default tablespace USERS temporary tablespace TEMP; User created. SQL> grant DBA to OGGUSER; Grant succeeded. SQL> |
Host01 - OGGSRC |
SQL> create user OGGSRC identified by Welcome1 default tablespace SRCDATA temporary tablespace TEMP; User created. SQL> grant CONNECT,RESOURCE to OGGSRC; Grant succeeded. SQL> alter user OGGSRC quota unlimited on SRCDATA; User altered. SQL> create user OGGTRG identified by Welcome1 default tablespace TRGDATA temporary tablespace TEMP; User created. SQL> alter user OGGTRG quota unlimited on TRGDATA; User altered. SQL> grant CONNECT,RESOURCE to OGGTRG; Grant succeeded. |
Host01 - OGGSRC |
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; Database altered. SQL> ALTER DATABASE FORCE LOGGING; Database altered. SQL> ALTER SYSTEM SWITCH LOGFILE; System altered. SQL> SELECT supplemental_log_data_min, force_logging FROM v$database; SUPPLEME FORCE_LOGGING -------- --------------------------------------- YES YES SQL> |
Host01 - OGGSRC |
SQL> ALTER SYSTEM SWITCH LOGFILE;
System altered.
SQL>
|
1.4 Unloading and Unpacking the SQL scripts
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 [oracle@host01 Desktop]$ cd ~ [oracle@host01 ~]$ mkdir obe |
Copy the zip file into the obe directory. The downloaded file is by default stored into the /home/oracle/Downloads directory.
Host01 - OGGSRC |
[oracle@host01 ~]$ cp ./Downloads/OBE_DDL_FILES.zip ./obe
[oracle@host01 ~]$
|
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 ~]$ cd obe [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]$ |
1.5 Creating Database Objects and Loading Data
- 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
- DynamicPortList
- PurgeOldExtracts
- Autostart
- AutoRestart
2.1 Configuring the Oracle GoldenGate Manager Process.

IMPORTANT! GGSCI for Oracle will not start if the LD_LIBRARY_PATH environment variable is either undefined or if it does not point to the ${ORACLE_HOME}/lib directory.
Make sure LD_LIBRARY_PATH is correctly set before launching GGSCI. The preferred way to accomplish this is by adding the line: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 |
[oracle@host01 Desktop]$ cd /u01/app/oracle/product/ogg_src/ [oracle@host01 ogg_src]$ pwd /u01/app/oracle/product/ogg_src [oracle@host01 ogg_src]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 12.1.2.0.0 17185003 OGGCORE_12.1.2.0.0_PLATFORMS_130924.1316_FBO Linux, x64, 64bit (optimized), Oracle 12c on Sep 25 2013 02:33:54 Operating system character set identified as UTF-8. Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved. GGSCI (host01.example.com) 1> info mgr Manager is running (IP port ologg.example.com.7809, Process ID 17583). GGSCI (host01.example.com) 2> |
Host01 - GGSCI_TRG |
[oracle@host01 Desktop]$ cd /u01/app/oracle/product/ogg_trg/ [oracle@host01 ogg_trg]$ pwd /u01/app/oracle/product/ogg_trg [oracle@host01 ogg_trg]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 12.1.2.0.0 17185003 OGGCORE_12.1.2.0.0_PLATFORMS_130924.1316_FBO Linux, x64, 64bit (optimized), Oracle 12c on Sep 25 2013 02:33:54 Operating system character set identified as UTF-8. Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved. GGSCI (host01.example.com) 1> info mgr Manager is running (IP port ologg.example.com.7909, Process ID 13645). GGSCI (host01.example.com) 2> |
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) 2> edit param mgr
PORT 7809
DynamicPortList 20000-20099
PurgeOldExtracts ./dirdat/*, UseCheckPoints, MinKeepHours 2
Autostart Extract E*
AUTORESTART Extract *, WaitMinutes 1, Retries 3
|
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) 2> edit param mgr
Port 7909
DynamicPortList 20100-20199
PurgeOldExtracts ./dirdat/pe*, UseCheckPoints, MinKeepHours 2
Autostart Replicat R*
AUTORESTART Replicat *, WaitMinutes 1, Retries 3
|
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) 3> stop mgr Manager process is required by other GGS processes. Are you sure you want to stop it (y/n)?y Sending STOP request to MANAGER ... Request processed. Manager stopped. GGSCI (host01.example.com) 4> start mgr Manager started. GGSCI (host01.example.com) 5> info mgr detail Manager is running (IP port host01.example.com.7809, Process ID 52948). GGSCI (host01.example.com) 6> |
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) 3> stop mgr Manager process is required by other GGS processes. Are you sure you want to stop it (y/n)?y Sending STOP request to MANAGER ... Request processed. Manager stopped. GGSCI (host01.example.com) 4> start mgr Manager started. GGSCI (host01.example.com) 5> info mgr detail Manager is running (IP port host01.example.com.7909, Process ID 53712). GGSCI (host01.example.com) 6> |
2.2 Using the Oracle GoldenGate Wallet Facility.
- To avoid storing passwords in clear text in the various Extract and Replicat parameter files, OracleGoldenGate 12c offers the new wallet facility. You can store encrypted credentials in the wallet credential store and refer them through an alias, rather than the combination username/password.
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) 4> Create Wallet Created wallet at location 'dirwlt'. Opened wallet at location 'dirwlt'. GGSCI (host01.example.com) 5> Add CredentialStore Credential store created in ./dircrd/. GGSCI (host01.example.com) 6> Alter CredentialStore Add User ogguser@ogg12 Password Welcome1 Alias ogg_user Credential store in ./dircrd/ altered. GGSCI (host01.example.com) 7> Info CredentialStore Reading from ./dircrd/: Domain: OracleGoldenGate Alias: ogg_user Userid: ogguser@ogg12 GGSCI (host01.example.com) 8> |
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) 8> DBLogin UserIDAlias ogg_user
Successfully logged into database.
GGSCI (host01.example.com) 9>
|
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) 4> exit [oracle@host01 ogg_trg]$ cp /u01/app/oracle/product/ogg_src/dircrd/* ./dircrd [oracle@host01 ogg_trg]$ ls ./dircrd cwallet.sso [oracle@host01 ogg_trg]$ cp /u01/app/oracle/product/ogg_src/dirwlt/* ./dirwlt [oracle@host01 ogg_trg]$ ls ./dirwlt cwallet.sso [oracle@host01 ogg_trg]$ |
Host01 - GGSCI_TRG |
[oracle@host01 ogg_trg]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 12.1.2.0.0 17185003 OGGCORE_12.1.2.0.0_PLATFORMS_130924.1316_FBO Linux, x64, 64bit (optimized), Oracle 12c on Sep 25 2013 02:33:54 Operating system character set identified as UTF-8. Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved. GGSCI (host01.example.com) 1> DBLogin UserIDAlias ogg_user Successfully logged into database. GGSCI (host01.example.com) 2> |
2.3 Using the Oracle GoldenGate TranData Option.
- You must enable supplemental logging on the source database for the specified tables. Before you can start capturing real-time data, the Oracle database must be set to log the table key values whenever it logs a rows change, so that they are available to Oracle GoldenGate in Redo. By default, the database logs only those column values that change. This is required so Oracle GoldenGate can locate the correct row on the target for update and delete operations.
Host01 - GGSCI_SRC |
Successfully logged into database. GGSCI (host01.example.com) 9> Add TranData OGGSRC.* ALLCOLS TRANDATA for scheduling columns has been added on table 'OGGSRC.ECONOMIC_ENTITY'.TRANDATA for all columns has been added on table 'OGGSRC.ECONOMIC_ENTITY'. Logging of supplemental redo data enabled for table OGGSRC.GDP_BY_YEAR. TRANDATA for scheduling columns has been added on table 'OGGSRC.GDP_BY_YEAR'.TRANDATA for all columns has been added on table 'OGGSRC.GDP_BY_YEAR'. Logging of supplemental redo data enabled for table OGGSRC.GDP_GROWTH_BY_YEAR. TRANDATA for scheduling columns has been added on table 'OGGSRC.GDP_GROWTH_BY_YEAR'.TRANDATA for all columns has been added on table 'OGGSRC.GDP_GROWTH_BY_YEAR'. GGSCI (host01.example.com) 10> Info TranData OGGSRC.* Logging of supplemental redo log data is enabled for table OGGSRC.ECONOMIC_ENTITY. Columns supplementally logged for table OGGSRC.ECONOMIC_ENTITY: ALL. Logging of supplemental redo log data is enabled for table OGGSRC.GDP_BY_YEAR. Columns supplementally logged for table OGGSRC.GDP_BY_YEAR: ALL. Logging of supplemental redo log data is enabled for table OGGSRC.GDP_GROWTH_BY_YEAR. Columns supplementally logged for table OGGSRC.GDP_GROWTH_BY_YEAR: ALL. |
- 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
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
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 |
GGSCI (host01.example.com) 2> edit param einta
Extract einta
SETENV (ORACLE_SID='ogg12')
UserIdAlias ogg_user
TranlogOptions IntegratedParams (max_sga_size 256)
Exttrail ./dirdat/in
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
Table OGGSRC.*;
|
LOGALLSUPCOLS causes Extract to do the following with these supplementally logged columns:
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) >dblogin useridalias ogg_user Successfully logged into database. GGSCI (host01.example.com) > register extract einta database Extract EINTA successfully registered with database at SCN 1905933. GGSCI (host01.example.com) > add extract einta, integrated tranlog, begin now EXTRACT added. GGSCI (host02.example.com) > add exttrail ./dirdat/in, extract einta, megabytes 10 EXTTRAIL added. GGSCI (host02.example.com) > |
3.2 Configuring the Data Pump
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 |
GGSCI (host01.example.com) > Edit Param pinta Extract pinta SETENV (ORACLE_SID='ogg12') UserIdAlias ogg_user rmthost localhost, mgrport 7909 rmttrail ./dirdat/pn table OGGSRC.*; |
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > add extract pinta, exttrailsource ./dirdat/in EXTRACT added. GGSCI (host01.example.com) > add rmttrail ./dirdat/pn, extract pinta, megabytes 10 RMTTRAIL added. GGSCI (host01.example.com) > |
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.
3.3 Starting the Primary Extract and the Data Pump Processes
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > start Extract einta Sending START request to MANAGER ... EXTRACT EINTA starting GGSCI (host01.example.com) > start extract pinta Sending START request to MANAGER ... EXTRACT PINTA starting GGSCI (host01.example.com) > |
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > Info All Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT STARTING EINTA 00:00:00 20:43:37 EXTRACT RUNNING PINTA 00:00:00 00:00:03 GGSCI (host01.example.com) > Info All Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT STARTING EINTA 00:00:00 20:43:41 EXTRACT RUNNING PINTA 00:00:00 00:00:07 GGSCI (host01.example.com) > Info All Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING EINTA 20:44:16 00:00:01 EXTRACT RUNNING PINTA 00:00:00 00:00:03 GGSCI (host01.example.com) > |
Leave GGSCI running for the next steps.
- 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:
4.1 Configuring the Replicat process
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) >Edit Param rinta
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.
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) > DBlogin UserIdAlias ogg_user Successfully logged into database. GGSCI (host01.example.com) > Add Replicat rinta Integrated exttrail ./dirdat/pn REPLICAT (Integrated) added. GGSCI (host01.example.com) > Start Replicat rinta Sending START request to MANAGER ... REPLICAT RINTA starting GGSCI (host01.example.com) > info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING RINTA 00:00:00 00:00:39 GGSCI (host01.example.com) > |
4.2 Obtaining Information About All Processes
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) > Info rinta
REPLICAT RINTA Last Started 2014-02-03 22:34 Status RUNNING
INTEGRATED
Checkpoint Lag 00:00:00 (updated 00:00:04 ago)
Process ID 50022
Log Read Checkpoint File ./dirdat/pn000000
First Record RBA 0
GGSCI (host01.example.com) >
|
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) > Info rinta, Detail
REPLICAT RINTA Last Started 2014-02-03 22:34 Status RUNNING
INTEGRATED
Checkpoint Lag 00:00:00 (updated 00:00:01 ago)
Process ID 50022
Log Read Checkpoint File ./dirdat/pn000000
First Record RBA 0
INTEGRATED Replicat
DBLOGIN Provided, inbound server name is OGG$RINTA in ATTACHED state
Current Log BSN value: <NULL>
Extract Source Begin End
./dirdat/pn000000 * Initialized * First Record
./dirdat/pn000000 * Initialized * First Record
./dirdat/pn000000 * Initialized * First Record
Current directory /u01/app/oracle/product/ogg_trg
Report file /u01/app/oracle/product/ogg_trg/dirrpt/RINTA.rpt
Parameter file /u01/app/oracle/product/ogg_trg/dirprm/rinta.prm
Checkpoint file /u01/app/oracle/product/ogg_trg/dirchk/RINTA.cpr
Process file /u01/app/oracle/product/ogg_trg/dirpcs/RINTA.pcr
Error log /u01/app/oracle/product/ogg_trg/ggserr.log
GGSCI (host01.example.com) >
|
Host01 - OGGSRC |
SQL> connect / as sysdba Connected. SQL> column replicat_name format a30 SQL> column server_name format a30 SQL> select replicat_name,server_name from DBA_GOLDENGATE_INBOUND; REPLICAT_NAME SERVER_NAME ----------------------------- ------------------------------ RINTA OGG$RINTA SQL> column apply_name format a30 SQL> column queue_name format a30 SQL> select apply_name,queue_name from DBA_APPLY; APPLY_NAME QUEUE_NAME ------------------------------ ------------------------------ OGG$RINTA OGGQ$RINTA OGG$EINTA OGG$Q_EINTA SQL> |
Display summary information:
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > Info All
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EINTA 00:00:05 00:00:01
EXTRACT RUNNING PINTA 00:00:00 00:00:05
GGSCI (host01.example.com) >
|
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > Info Extract *
EXTRACT EINTA Last Started 2014-02-03 21:51 Status RUNNING
Checkpoint Lag 00:00:05 (updated 00:00:05 ago)
Process ID 49304
Log Read Checkpoint Oracle Integrated Redo Logs
2014-02-03 23:57:35
SCN 0.2032340 (2032340)
EXTRACT PINTA Last Started 2014-02-03 21:51 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Process ID 49316
Log Read Checkpoint File ./dirdat/in000000
First Record RBA 1429
GGSCI (host01.example.com) >
|
Display even more detailed information:
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > Info Extract *, Detail
EXTRACT EINTA Last Started 2014-02-03 21:51 Status RUNNING
Checkpoint Lag 00:00:06 (updated 00:00:04 ago)
Process ID 49304
Log Read Checkpoint Oracle Integrated Redo Logs
2014-02-03 23:59:24
SCN 0.2032590 (2032590)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
./dirdat/in 0 1429 10 EXTTRAIL
Integrated Extract outbound server first scn: 0.1905933 (1905933)
Extract Source Begin End
Not Available 2014-02-03 01:07 2014-02-03 23:59
Not Available * Initialized * 2014-02-03 01:07
Current directory /u01/app/oracle/product/ogg_src
Report file /u01/app/oracle/product/ogg_src/dirrpt/EINTA.rpt
Parameter file /u01/app/oracle/product/ogg_src/dirprm/einta.prm
Checkpoint file /u01/app/oracle/product/ogg_src/dirchk/EINTA.cpe
Process file /u01/app/oracle/product/ogg_src/dirpcs/EINTA.pce
Error log /u01/app/oracle/product/ogg_src/ggserr.log
EXTRACT PINTA Last Started 2014-02-03 21:51 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:07 ago)
Process ID 49316
Log Read Checkpoint File ./dirdat/in000000
First Record RBA 1429
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
./dirdat/pn 0 0 10 RMTTRAIL
Extract Source Begin End
./dirdat/in000000 * Initialized * First Record
./dirdat/in000000 * Initialized * First Record
Current directory /u01/app/oracle/product/ogg_src
Report file /u01/app/oracle/product/ogg_src/dirrpt/PINTA.rpt
Parameter file /u01/app/oracle/product/ogg_src/dirprm/pinta.prm
Checkpoint file /u01/app/oracle/product/ogg_src/dirchk/PINTA.cpe
Process file /u01/app/oracle/product/ogg_src/dirpcs/PINTA.pce
Error log /u01/app/oracle/product/ogg_src/ggserr.log
GGSCI (host01.example.com) >
|
- 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:
5.1 Generating INSERTs
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 [oracle@host01 obe]$ pwd /home/oracle/obe [oracle@host01 obe]$ sqlplus oggsrc/Welcome1@ogg12 SQL*Plus: Release 12.1.0.1.0 Production on Tue Feb 4 00:11:22 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Last Successful login time: Mon Feb 03 2014 23:21:44 +11:00 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. ... many lines omitted for clarity ... 1 row created. Commit complete. SQL> select count(*) from gdp_by_year; COUNT(*) ---------- 235 SQL> |
Host01 - OGGTRG |
SQL> show user USER is "OGGTRG" SQL> select count(*) from gdp_by_year; COUNT(*) ---------- 235 SQL> |
Select the GGSCI_SRC window and enter the following command:
Host02 - GGSCI_SRC |
GGSCI (host01.example.com) > Info All
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EINTA 00:00:06 00:00:01
EXTRACT RUNNING PINTA 00:00:00 00:00:07
GGSCI (host01.example.com) >
|
command "view report einta" or "view report pinta" to find out what happened to the Extract group.
about their run so far:
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > Stats einta Sending STATS request to EXTRACT EINTA ... Start of Statistics at 2014-02-04 00:28:42. Output to ./dirdat/in: Extracting from OGGSRC.GDP_BY_YEAR to OGGSRC.GDP_BY_YEAR: *** Total statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 *** Daily statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 *** Hourly statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 *** Latest statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 End of Statistics. GGSCI (host02.example.com) > Stats pinta Sending STATS request to EXTRACT PINTA ... Start of Statistics at 2014-02-04 00:29:20. Output to ./dirdat/pn: Extracting from OGGSRC.GDP_BY_YEAR to OGGSRC.GDP_BY_YEAR: *** Total statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 *** Daily statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 *** Hourly statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 *** Latest statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 235.00 End of Statistics. GGSCI (host01.example.com) > |
Select the GGSCI_TRG window, GGSCI should still be running. Enter the following command:
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) > Info All
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING RINTA 00:00:00 00:00:05
GGSCI (host01.example.com) >
|
view report rinta to find out what happened to the Replicat group.
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) > Stats rinta
Sending STATS request to REPLICAT RINTA ...
Start of Statistics at 2014-02-04 00:35:16.
Integrated Replicat Statistics:
Total transactions 1.00
Redirected 0.00
DDL operations 0.00
Stored procedures 0.00
Datatype functionality 0.00
Event actions 0.00
Direct transactions ratio 0.00%
Replicating from OGGSRC.GDP_BY_YEAR to OGGTRG.GDP_BY_YEAR:
*** Total 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
*** 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
*** Hourly 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
*** Latest 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.
GGSCI (host01.example.com) >
|
5.2 Generating UPDATEs/DELETEs
In the ECONOMIC_ENTITY table all economic entities which are not single countries, like "East Asia Less Japan" or "Other Western Europe" are listed as "N/A" in the CONTINENT column. Change "N/A" to "Not a continent".
In addition, the GDP_BY_YEAR table contains economic data for the years 2008, which was inserted to generate some replication activity. Erase all entries pertaining to the year 2008 in the GDP_BY_YEAR table.
Host01 - OGGSRC |
SQL> UPDATE ECONOMIC_ENTITY set CONTINENT = 'Not a continent' WHERE CONTINENT = 'N/A'; 36 rows updated. SQL> DELETE FROM GDP_BY_YEAR where GDP_YEAR=2008; 235 rows deleted. SQL> commit; Commit complete. SQL> |
Host01 - GGSCI_SRC |
GGSCI (host01.example.com) > Stats einta Sending STATS request to EXTRACT EINTA ... Start of Statistics at 2014-02-04 00:49:37. Output to ./dirdat/in: Extracting from OGGSRC.GDP_BY_YEAR to OGGSRC.GDP_BY_YEAR: *** Total statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 *** Daily statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 *** Hourly statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 *** Latest statistics since 2014-02-04 00:12:26 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 Extracting from OGGSRC.ECONOMIC_ENTITY to OGGSRC.ECONOMIC_ENTITY: *** Total statistics since 2014-02-04 00:12:26 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 *** Daily statistics since 2014-02-04 00:12:26 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 *** Hourly statistics since 2014-02-04 00:12:26 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 *** Latest statistics since 2014-02-04 00:12:26 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 End of Statistics. GGSCI (host01.example.com) > Stats pinta Sending STATS request to EXTRACT PINTA ... Start of Statistics at 2014-02-04 00:50:34. Output to ./dirdat/pn: Extracting from OGGSRC.GDP_BY_YEAR to OGGSRC.GDP_BY_YEAR: *** Total statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 *** Daily statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 *** Hourly statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 *** Latest statistics since 2014-02-04 00:12:34 *** Total inserts 235.00 Total updates 0.00 Total deletes 235.00 Total discards 0.00 Total operations 470.00 Extracting from OGGSRC.ECONOMIC_ENTITY to OGGSRC.ECONOMIC_ENTITY: *** Total statistics since 2014-02-04 00:12:34 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 *** Daily statistics since 2014-02-04 00:12:34 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 *** Hourly statistics since 2014-02-04 00:12:34 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 *** Latest statistics since 2014-02-04 00:12:34 *** Total inserts 0.00 Total updates 36.00 Total deletes 0.00 Total discards 0.00 Total operations 36.00 End of Statistics. GGSCI (host01.example.com) > |
Select the GGSCI_TRG window. Enter the following command:
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) > Info All
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING RINTA 00:00:00 00:00:00
GGSCI (host01.example.com) >
|
view report rinta to find out what happened to the Replicat group
Host01 - GGSCI_TRG |
GGSCI (host01.example.com) > Stats rinta
Sending STATS request to REPLICAT RINTA ...
Start of Statistics at 2014-02-04 00:56:17.
Integrated Replicat Statistics:
Total transactions 2.00
Redirected 0.00
DDL operations 0.00
Stored procedures 0.00
Datatype functionality 0.00
Event actions 0.00
Direct transactions ratio 0.00%
Replicating from OGGSRC.GDP_BY_YEAR to OGGTRG.GDP_BY_YEAR:
*** Total statistics since 2014-02-04 00:12:58 ***
Total inserts 235.00
Total updates 0.00
Total deletes 235.00
Total discards 0.00
Total operations 470.00
*** Daily statistics since 2014-02-04 00:12:58 ***
Total inserts 235.00
Total updates 0.00
Total deletes 235.00
Total discards 0.00
Total operations 470.00
*** Hourly statistics since 2014-02-04 00:12:58 ***
Total inserts 235.00
Total updates 0.00
Total deletes 235.00
Total discards 0.00
Total operations 470.00
*** Latest statistics since 2014-02-04 00:12:58 ***
Total inserts 235.00
Total updates 0.00
Total deletes 235.00
Total discards 0.00
Total operations 470.00
Replicating from OGGSRC.ECONOMIC_ENTITY to OGGTRG.ECONOMIC_ENTITY:
*** Total statistics since 2014-02-04 00:12:58 ***
Total inserts 0.00
Total updates 36.00
Total deletes 0.00
Total discards 0.00
Total operations 36.00
*** Daily statistics since 2014-02-04 00:12:58 ***
Total inserts 0.00
Total updates 36.00
Total deletes 0.00
Total discards 0.00
Total operations 36.00
*** Hourly statistics since 2014-02-04 00:12:58 ***
Total inserts 0.00
Total updates 36.00
Total deletes 0.00
Total discards 0.00
Total operations 36.00
*** Latest statistics since 2014-02-04 00:12:58 ***
Total inserts 0.00
Total updates 36.00
Total deletes 0.00
Total discards 0.00
Total operations 36.00
End of Statistics.
GGSCI (host01.example.com) >
|
Do you want to pass 1Z0-447 exam in 1st try? Pass your OPN Certified Specialist 1Z0-447 easily by the help of latest 1Z0-447 dumps questions & answers. Your Oracle GoldenGate 12c Implementation Essentials success is guaranteed with our 100% money back guarantee. Braindumps4IT provide real 1Z0-447 exam questions and latest 1Z0-447 exam braindumps.
ReplyDelete