[BEGIN] 2017/4/10 19:46:51
source :192.168.1.7
target :192.168.1.25
源端现有环境:
[oracle@node1 goldengate]$ su - oracle
Password:
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$ cd
[oracle@node1 ~]$ cd $GGHOME
[oracle@node1 goldengate]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
现有配置进程:
GGSCI (node1) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 236:38:44
EXTRACT STOPPED CLASS_PU 00:00:00 236:38:44
EXTRACT STOPPED EDDL1 00:00:00 236:39:30
EXTRACT STOPPED EFORMAT 00:00:00 236:38:43
EXTRACT STOPPED EGGTEST1 00:00:00 236:38:42
EXTRACT STOPPED EOLTP01 00:00:00 236:38:41
EXTRACT STOPPED EPUMP01 00:00:00 236:38:41
EXTRACT STOPPED HREXT 00:00:02 236:38:41
EXTRACT STOPPED HRPUMP 00:00:00 236:38:40
EXTRACT STOPPED MYDP1 00:00:00 236:38:39
EXTRACT STOPPED MYEXT1 00:00:02 236:38:39
EXTRACT STOPPED PDDL1 00:00:00 236:39:21
EXTRACT STOPPED PGGTEST1 00:00:00 236:38:39
REPLICAT STOPPED RDDL2 00:00:00 236:38:49
源端数据库版本:
GGSCI (node1) 2> exit
[oracle@node1 goldengate]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Mon Apr 10 07:47:20 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect /as sysDBA
Connected.
SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL> exit
源端操作系统信息:
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 goldengate]$ uname -a
Linux node1 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[oracle@node1 goldengate]$ arch
x86_64
[oracle@node1 goldengate]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2017, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.12
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2017-04-10_07-48-01AM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2017-04-10_07-48-01AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: node1
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 17030189 : applied on Thu Mar 03 02:42:17 EST 2016
Unique Patch ID: 18964111
Created on 26 May 2015, 07:44:11 hrs PST8PDT
Bugs fixed:
17030189
--------------------------------------------------------------------------------
OPatch succeeded.
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
源端测试用户:
[oracle@node1 goldengate]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Mon Apr 10 07:48:46 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> select username from dba_users where username='TEST';
USERNAME
------------------------------
TEST
SQL> connect test/oracle
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
SQL> select tname from tab;
no rows selected
SQL>
SQL>
SQL>
SQL>
SQL>
SQL>
源端创建测试表:
SQL> create table t1 (id int primary key,name varchar2(20));
Table created.
SQL> show user;
USER is "TEST"
SQL> select tname from tab;
TNAME
------------------------------
T1
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
登录目标端主机:
[oracle@node1 goldengate]$ ssh 192.168.1.25
The authenticity of host '192.168.1.25 (192.168.1.25)' can't be established.
RSA key fingerprint is 28:5d:76:19:60:ac:26:ca:3e:84:83:5e:fe:7e:51:3d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.25' (RSA) to the list of known hosts.
oracle@192.168.1.25's password:
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
目标端goldengate版本:
[oracle@node1 ~]$ cd $GGHOME
[oracle@node1 ogg12c]$ ggsci -v
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 12 2015 02:56:48
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
目标端已有进程:
[oracle@node1 ogg12c]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 12 2015 02:56:48
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (node1) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:09 00:00:01
REPLICAT RUNNING REP1 00:00:00 00:00:05
GGSCI (node1) 2> exit
目标端PDB,这里选择pdb3:
[oracle@node1 ogg12c]$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Mon Apr 10 07:53:11 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ WRITE NO
5 PDB3 READ WRITE NO
6 PDB4 READ WRITE NO
SQL>
SQL>
SQL>
SQL>
目标端数据库版本:
SQL>
SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE 12.1.0.2.0 Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
目标端pdb 别名:
[oracle@node1 ogg12c]$ cd $ORACLE_HOME/network/admin
[oracle@node1 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
DEV12C =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dev12c)
)
)
PDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
PDB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb2)
)
)
PDB3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb3)
)
)
PDB4 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb4)
)
)
[oracle@node1 admin]$
[oracle@node1 admin]$
[oracle@node1 admin]$
[oracle@node1 admin]$
[oracle@node1 admin]$
[oracle@node1 admin]$
[oracle@node1 admin]$
目标端建立测试用户及测试表:
[oracle@node1 admin]$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Mon Apr 10 07:54:16 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> alter session set container=pdb3;
Session altered.
SQL> create user test identified by oracle account unlock;
User created.
SQL> grant connect,resource,dba to test;
Grant succeeded.
SQL> connect test/oracle@pdb3
Connected.
SQL> select tname from tab;
no rows selected
SQL>
SQL>
SQL>
SQL> create table t1 (id int primary key,name varchar2(20));
Table created.
SQL>
SQL>
SQL> select tname from tab;
TNAME
--------------------------------------------------------------------------------
T1
SQL>
SQL>
SQL>
源端测试用户add schematrandata test;
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (node1) 3> view params mgr
port 7809
--autostart er *
--autorestart er *
----ACCESSRULE, PROG REPLICAT, IPADDR 192.168.1.8, ALLOW
GGSCI (node1) 4> dblogin userid ogg,password ogg
Successfully logged into database.
GGSCI (node1 as ogg@orcc1) 5>
GGSCI (node1 as ogg@orcc1) 5>
GGSCI (node1 as ogg@orcc1) 5>
GGSCI (node1 as ogg@orcc1) 5> add trandata test.t1;
ERROR: No viable tables matched specification.
GGSCI (node1 as ogg@orcc1) 6> add schematrandata test
2017-04-10 07:59:11 INFO OGG-01788 SCHEMATRANDATA has been added on schema test.
2017-04-10 07:59:11 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema test.
GGSCI (node1 as ogg@orcc1) 7>
GGSCI (node1 as ogg@orcc1) 7>
GGSCI (node1 as ogg@orcc1) 7>
GGSCI (node1 as ogg@orcc1) 7>
GGSCI (node1 as ogg@orcc1) 7>
GGSCI (node1 as ogg@orcc1) 7>
GGSCI (node1 as ogg@orcc1) 7>
源端配置集成抽取进程
GGSCI (node1 as ogg@orcc1) 7> edit params qext
GGSCI (node1 as ogg@orcc1) 8> view params qext
Extract qext
SETENV (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
--UserIdAlias ogg
UserId ogg@orcc1,password ogg
TranlogOptions IntegratedParams (max_sga_size 512)
Exttrail /u01/goldengate/dirdat/qu
LOGALLSUPCOLS
DDL INCLUDE MAPPED
DDLOPTIONS ADDTRANDATA
UPDATERECORDFORMAT COMPACT
table test.*;
GGSCI (node1 as ogg@orcc1) 9> register extract qext database
2017-04-10 08:00:25 INFO OGG-02003 Extract QEXT successfully registered with database at SCN 2354659.
GGSCI (node1 as ogg@orcc1) 10> add extract qext, integrated tranlog, begin now;
EXTRACT (Integrated) added.
GGSCI (node1 as ogg@orcc1) 11> add exttrail /u01/goldengate/dirdat/qu, extract qext, megabytes 200
EXTTRAIL added.
GGSCI (node1 as ogg@orcc1) 12>
GGSCI (node1 as ogg@orcc1) 12>
GGSCI (node1 as ogg@orcc1) 12>
GGSCI (node1 as ogg@orcc1) 12> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 236:52:33
EXTRACT STOPPED CLASS_PU 00:00:00 236:52:33
EXTRACT STOPPED EDDL1 00:00:00 236:53:20
EXTRACT STOPPED EFORMAT 00:00:00 236:52:32
EXTRACT STOPPED EGGTEST1 00:00:00 236:52:31
EXTRACT STOPPED EOLTP01 00:00:00 236:52:31
EXTRACT STOPPED EPUMP01 00:00:00 236:52:30
EXTRACT STOPPED HREXT 00:00:02 236:52:30
EXTRACT STOPPED HRPUMP 00:00:00 236:52:29
EXTRACT STOPPED MYDP1 00:00:00 236:52:28
EXTRACT STOPPED MYEXT1 00:00:02 236:52:29
EXTRACT STOPPED PDDL1 00:00:00 236:53:10
EXTRACT STOPPED PGGTEST1 00:00:00 236:52:28
EXTRACT STOPPED QEXT 00:00:00 00:00:16
REPLICAT STOPPED RDDL2 00:00:00 236:52:38
GGSCI (node1 as ogg@orcc1) 13>
GGSCI (node1 as ogg@orcc1) 13>
GGSCI (node1 as ogg@orcc1) 13>
源端配置投递进程:
GGSCI (node1 as ogg@orcc1) 13>
GGSCI (node1 as ogg@orcc1) 13> edit params qpump
GGSCI (node1 as ogg@orcc1) 14> view params qpump
Extract qupump
--UserIdAlias ogg
UserId ogg@orcc1,password ogg
rmthost 192.168.1.25, mgrport 7809
rmttrail /u01/ogg12c/dirdat/qu
table test.*;
GGSCI (node1 as ogg@orcc1) 15>
GGSCI (node1 as ogg@orcc1) 15>
GGSCI (node1 as ogg@orcc1) 15>
GGSCI (node1 as ogg@orcc1) 15>
GGSCI (node1 as ogg@orcc1) 15> add extract qupump, exttrailsource /u01/goldengate/dirdat/qu
EXTRACT added.
GGSCI (node1 as ogg@orcc1) 16> add rmttrail /u01/ogg12c/dirdat/qu, extract qupump , megabytes 100
RMTTRAIL added.
GGSCI (node1 as ogg@orcc1) 17>
GGSCI (node1 as ogg@orcc1) 17>
GGSCI (node1 as ogg@orcc1) 17>
源端确认是否添加成功:
GGSCI (node1 as ogg@orcc1) 17> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 236:54:08
EXTRACT STOPPED CLASS_PU 00:00:00 236:54:08
EXTRACT STOPPED EDDL1 00:00:00 236:54:54
EXTRACT STOPPED EFORMAT 00:00:00 236:54:07
EXTRACT STOPPED EGGTEST1 00:00:00 236:54:06
EXTRACT STOPPED EOLTP01 00:00:00 236:54:05
EXTRACT STOPPED EPUMP01 00:00:00 236:54:05
EXTRACT STOPPED HREXT 00:00:02 236:54:05
EXTRACT STOPPED HRPUMP 00:00:00 236:54:03
EXTRACT STOPPED MYDP1 00:00:00 236:54:03
EXTRACT STOPPED MYEXT1 00:00:02 236:54:03
EXTRACT STOPPED PDDL1 00:00:00 236:54:45
EXTRACT STOPPED PGGTEST1 00:00:00 236:54:03
EXTRACT STOPPED QEXT 00:00:00 00:01:50 ##########################
EXTRACT STOPPED QUPUMP 00:00:00 00:00:14 ##########################
REPLICAT STOPPED RDDL2 00:00:00 236:54:13
GGSCI (node1 as ogg@orcc1) 18> exit
登录目标端添加复制进程:
[oracle@node1 goldengate]$ ssh 192.168.1.25
oracle@192.168.1.25's password:
Last login: Mon Apr 10 07:52:53 2017 from 192.168.1.7
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ cd $GGHOME
[oracle@node1 ogg12c]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 12 2015 02:56:48
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (node1) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:03 00:00:08
REPLICAT RUNNING REP1 00:00:00 00:00:03
GGSCI (node1) 2> edit params qrep
GGSCI (node1) 3> view params qrep
Replicat qrep
DBOPTIONS INTEGRATEDPARAMS(parallelism 6)
AssumeTargetDefs
DiscardFile /u01/ogg12c/dirrpt/rpdw.dsc, Purge
--UserIdAlias ogg
USERID c##ggadmin@pdb3, password oracle
BATCHSQL
----HANDLECOLLISIONS
MAP test.*, TARGET pdb3.test.*;
GGSCI (node1) 4>
GGSCI (node1) 4>
GGSCI (node1) 4>
GGSCI (node1) 4> add replicat qrep integrated exttrail /u01/ogg12c/dirdat/qu
REPLICAT (Integrated) added.
GGSCI (node1) 5>
GGSCI (node1) 5>
GGSCI (node1) 5>
GGSCI (node1) 5> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:03 00:00:00
REPLICAT STOPPED QREP 00:00:00 00:00:03
REPLICAT RUNNING REP1 00:00:00 00:00:05
目标端启动复制进程:
GGSCI (node1) 6> start qrep
Sending START request to MANAGER ...
REPLICAT QREP starting
GGSCI (node1) 7> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:10 00:00:01
REPLICAT RUNNING QREP 00:00:00 00:00:14
REPLICAT RUNNING REP1 00:00:00 00:00:06
GGSCI (node1) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:09 00:00:01
REPLICAT RUNNING QREP 00:00:00 00:00:24
REPLICAT RUNNING REP1 00:00:00 00:00:06
GGSCI (node1) 9> exit
[oracle@node1 ogg12c]$ exit
logout
Connection to 192.168.1.25 closed
源端启动抽取投递进程:
.
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (node1) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 236:57:13
EXTRACT STOPPED CLASS_PU 00:00:00 236:57:12
EXTRACT STOPPED EDDL1 00:00:00 236:57:59
EXTRACT STOPPED EFORMAT 00:00:00 236:57:12
EXTRACT STOPPED EGGTEST1 00:00:00 236:57:11
EXTRACT STOPPED EOLTP01 00:00:00 236:57:10
EXTRACT STOPPED EPUMP01 00:00:00 236:57:10
EXTRACT STOPPED HREXT 00:00:02 236:57:09
EXTRACT STOPPED HRPUMP 00:00:00 236:57:08
EXTRACT STOPPED MYDP1 00:00:00 236:57:08
EXTRACT STOPPED MYEXT1 00:00:02 236:57:08
EXTRACT STOPPED PDDL1 00:00:00 236:57:49
EXTRACT STOPPED PGGTEST1 00:00:00 236:57:08
EXTRACT STOPPED QEXT 00:00:00 00:04:55
EXTRACT STOPPED QUPUMP 00:00:00 00:03:18
REPLICAT STOPPED RDDL2 00:00:00 236:57:17
源端启动抽取进程:
GGSCI (node1) 10> start qext
Sending START request to MANAGER ...
EXTRACT QEXT starting
GGSCI (node1) 11> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 237:01:05
EXTRACT STOPPED CLASS_PU 00:00:00 237:01:05
EXTRACT STOPPED EDDL1 00:00:00 237:01:51
EXTRACT STOPPED EFORMAT 00:00:00 237:01:04
EXTRACT STOPPED EGGTEST1 00:00:00 237:01:03
EXTRACT STOPPED EOLTP01 00:00:00 237:01:02
EXTRACT STOPPED EPUMP01 00:00:00 237:01:02
EXTRACT STOPPED HREXT 00:00:02 237:01:02
EXTRACT STOPPED HRPUMP 00:00:00 237:01:00
EXTRACT STOPPED MYDP1 00:00:00 237:01:00
EXTRACT STOPPED MYEXT1 00:00:02 237:01:00
EXTRACT STOPPED PDDL1 00:00:00 237:01:42
EXTRACT STOPPED PGGTEST1 00:00:00 237:01:00
EXTRACT STARTING QEXT 00:00:00 00:08:47
EXTRACT STOPPED QUPUMP 00:00:00 00:07:10
REPLICAT STOPPED RDDL2 00:00:00 237:01:10
GGSCI (node1) 12> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 237:01:24
EXTRACT STOPPED CLASS_PU 00:00:00 237:01:24
EXTRACT STOPPED EDDL1 00:00:00 237:02:10
EXTRACT STOPPED EFORMAT 00:00:00 237:01:23
EXTRACT STOPPED EGGTEST1 00:00:00 237:01:22
EXTRACT STOPPED EOLTP01 00:00:00 237:01:21
EXTRACT STOPPED EPUMP01 00:00:00 237:01:21
EXTRACT STOPPED HREXT 00:00:02 237:01:21
EXTRACT STOPPED HRPUMP 00:00:00 237:01:19
EXTRACT STOPPED MYDP1 00:00:00 237:01:19
EXTRACT STOPPED MYEXT1 00:00:02 237:01:19
EXTRACT STOPPED PDDL1 00:00:00 237:02:01
EXTRACT STOPPED PGGTEST1 00:00:00 237:01:19
EXTRACT RUNNING QEXT 00:00:06 00:00:01
EXTRACT STOPPED QUPUMP 00:00:00 00:07:30
REPLICAT STOPPED RDDL2 00:00:00 237:01:29
源端启动投递进程:
GGSCI (node1) 13> start qupump
Sending START request to MANAGER ...
EXTRACT QUPUMP starting
GGSCI (node1) 14> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 237:01:30
EXTRACT STOPPED CLASS_PU 00:00:00 237:01:30
EXTRACT STOPPED EDDL1 00:00:00 237:02:16
EXTRACT STOPPED EFORMAT 00:00:00 237:01:29
EXTRACT STOPPED EGGTEST1 00:00:00 237:01:28
EXTRACT STOPPED EOLTP01 00:00:00 237:01:27
EXTRACT STOPPED EPUMP01 00:00:00 237:01:27
EXTRACT STOPPED HREXT 00:00:02 237:01:27
EXTRACT STOPPED HRPUMP 00:00:00 237:01:26
EXTRACT STOPPED MYDP1 00:00:00 237:01:25
EXTRACT STOPPED MYEXT1 00:00:02 237:01:25
EXTRACT STOPPED PDDL1 00:00:00 237:02:07
EXTRACT STOPPED PGGTEST1 00:00:00 237:01:25
EXTRACT RUNNING QEXT 00:00:06 00:00:07
EXTRACT RUNNING QUPUMP 00:00:00 00:07:36
REPLICAT STOPPED RDDL2 00:00:00 237:01:35
源端检查lag
GGSCI (node1) 15> lag eqxt
ERROR: Invalid command.
GGSCI (node1) 16> lag qext
2017-04-10 08:10:18 INFO OGG-14054 Lag from heartbeat table requires DBLOGIN.
Sending GETLAG request to EXTRACT QEXT ...
Last record lag 75 seconds.
GGSCI (node1) 17> lag qupump
2017-04-10 08:10:24 INFO OGG-14054 Lag from heartbeat table requires DBLOGIN.
Sending GETLAG request to EXTRACT QUPUMP ...
Last record lag 102 seconds.
At EOF, no more records to process.
GGSCI (node1) 18> lag qext
2017-04-10 08:10:32 INFO OGG-14054 Lag from heartbeat table requires DBLOGIN.
Sending GETLAG request to EXTRACT QEXT ...
Last record lag 1 seconds.
GGSCI (node1) 19> view report qext
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 01:10:08
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Starting at 2017-04-10 08:09:32
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Tue Jan 29 11:47:41 EST 2013, Release 2.6.32-358.el6.x86_64
Node: node1
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 3489
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2017-04-10 08:09:32 INFO OGG-03059 Operating system character set identified as UTF-8.
2017-04-10 08:09:32 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.
2017-04-10 08:09:32 INFO OGG-02095 Successfully set environment variable ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1.
Extract qext
SETENV (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
UserId ogg@orcc1,password ***
2017-04-10 08:09:32 INFO OGG-01971 The previous message, 'INFO OGG-02095', repeated 1 times.
2017-04-10 08:09:32 INFO OGG-03522 Setting session time zone to source database time zone 'GMT'.
TranlogOptions IntegratedParams (max_sga_size 512)
Exttrail /u01/goldengate/dirdat/qu
LOGALLSUPCOLS
2017-04-10 08:09:32 WARNING OGG-04033 LOGALLSUPCOLS has set the NOCOMPRESSDELETES and GETUPDATEBEFORES parameters on.
DDL INCLUDE MAPPED
DDLOPTIONS ADDTRANDATA
UPDATERECORDFORMAT COMPACT
table test.*;
2017-04-10 08:09:32 INFO OGG-01635 BOUNDED RECOVERY: reset to initial or altered checkpoint.
2017-04-10 08:09:32 INFO OGG-01815 Virtual Memory Facilities for: BR
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/goldengate/BR/QEXT.
Bounded Recovery Parameter:
BRINTERVAL = 4HOURS
BRDIR = /u01/goldengate
2017-04-10 08:09:32 INFO OGG-01851 filecaching started: thread ID: 140590654158592.
2017-04-10 08:09:32 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/goldengate/dirtmp.
CACHEMGR virtual memory values (may have been adjusted)
CACHEPAGEOUTSIZE (default): 8M
PROCESS VM AVAIL FROM OS (min): 128G
CACHESIZEMAX (strict force to disk): 96G
Database Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
Database Language and Character Set:
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "AL32UTF8"
2017-04-10 08:09:38 INFO OGG-02248 Logmining server DDL filtering enabled.
2017-04-10 08:09:39 INFO OGG-02068 Integrated capture successfully attached to logmining server OGG$CAP_QEXT using OGGCapture API.
2017-04-10 08:09:39 INFO OGG-02089 Source redo compatibility version is: 11.2.0.4.0.
2017-04-10 08:09:39 INFO OGG-02086 Integrated Dictionary will be used.
2017-04-10 08:09:39 WARNING OGG-02901 Replication of UDT and ANYDATA from redo logs is not supported with the Oracle compatible parameter setting. Using fetch instead.
2017-04-10 08:09:39 WARNING OGG-02083 DDLOPTIONS with ADDTRANDATA is no longer supported.
2017-04-10 08:09:40 INFO OGG-01052 No recovery is required for target file /u01/goldengate/dirdat/qu000000000, at RBA 0 (file not opened).
2017-04-10 08:09:40 INFO OGG-01478 Output file /u01/goldengate/dirdat/qu is using format RELEASE 12.2.
***********************************************************************
** Run Time Messages **
***********************************************************************
2017-04-10 08:09:45 INFO OGG-14049 Heartbeat record resolved.
2017-04-10 08:10:15 INFO OGG-01971 The previous message, 'INFO OGG-14049', repeated 1 times.
2017-04-10 08:10:19 INFO OGG-01021 Command received from GGSCI: GETLAG.
GGSCI (node1) 20> view report qupump
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 01:10:08
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Starting at 2017-04-10 08:09:56
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Tue Jan 29 11:47:41 EST 2013, Release 2.6.32-358.el6.x86_64
Node: node1
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 3522
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2017-04-10 08:09:56 INFO OGG-03059 Operating system character set identified as UTF-8.
2017-04-10 08:09:56 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.
Extract qupump
UserId ogg@orcc1,password ***
2017-04-10 08:09:57 INFO OGG-03522 Setting session time zone to source database time zone 'GMT'.
rmthost 192.168.1.25, mgrport 7809
rmttrail /u01/ogg12c/dirdat/qu
table test.*;
2017-04-10 08:09:57 INFO OGG-01851 filecaching started: thread ID: 139734133237504.
2017-04-10 08:09:57 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/goldengate/dirtmp.
CACHEMGR virtual memory values (may have been adjusted)
CACHEPAGEOUTSIZE (default): 8M
PROCESS VM AVAIL FROM OS (min): 128G
CACHESIZEMAX (strict force to disk): 96G
Database Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
Database Language and Character Set:
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "AL32UTF8"
2017-04-10 08:10:12 INFO OGG-01226 Socket buffer size set to 27985 (flush size 27985).
2017-04-10 08:10:12 INFO OGG-01052 No recovery is required for target file /u01/ogg12c/dirdat/qu000000000, at RBA 0 (file not opened).
2017-04-10 08:10:12 INFO OGG-01478 Output file /u01/ogg12c/dirdat/qu is using format RELEASE 12.2.
***********************************************************************
** Run Time Messages **
***********************************************************************
2017-04-10 08:10:12 INFO OGG-02243 Opened trail file /u01/goldengate/dirdat/qu000000000 at 2017-04-10 08:10:12.224455.
2017-04-10 08:10:12 INFO OGG-14049 Heartbeat record resolved.
2017-04-10 08:10:12 INFO OGG-02756 The definition for table OGG.GG_HEARTBEAT_SEED is obtained from the trail file.
2017-04-10 08:10:12 INFO OGG-14049 Heartbeat record resolved.
2017-04-10 08:10:26 INFO OGG-01021 Command received from GGSCI: GETLAG.
源端抽取投递进程启动成功:
GGSCI (node1) 21> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 237:02:26
EXTRACT STOPPED CLASS_PU 00:00:00 237:02:25
EXTRACT STOPPED EDDL1 00:00:00 237:03:12
EXTRACT STOPPED EFORMAT 00:00:00 237:02:24
EXTRACT STOPPED EGGTEST1 00:00:00 237:02:24
EXTRACT STOPPED EOLTP01 00:00:00 237:02:23
EXTRACT STOPPED EPUMP01 00:00:00 237:02:23
EXTRACT STOPPED HREXT 00:00:02 237:02:22
EXTRACT STOPPED HRPUMP 00:00:00 237:02:21
EXTRACT STOPPED MYDP1 00:00:00 237:02:21
EXTRACT STOPPED MYEXT1 00:00:02 237:02:21
EXTRACT STOPPED PDDL1 00:00:00 237:03:02
EXTRACT STOPPED PGGTEST1 00:00:00 237:02:20
EXTRACT RUNNING QEXT 00:00:10 00:00:03
EXTRACT RUNNING QUPUMP 00:00:00 00:00:02
REPLICAT STOPPED RDDL2 00:00:00 237:02:30
GGSCI (node1) 22> exit
检查目标端复制进程状态:
[oracle@node1 goldengate]$ ssh 192.168.1.25
oracle@192.168.1.25's password:
Last login: Mon Apr 10 08:04:05 2017 from 192.168.1.7
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ cd $GGHOME
[oracle@node1 ogg12c]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 12 2015 02:56:48
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (node1) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:10 00:00:07
REPLICAT RUNNING QREP 00:00:00 00:01:50
REPLICAT RUNNING REP1 00:00:00 00:00:04
检查目标端lag及report:
GGSCI (node1) 2> lag qrep
2017-04-10 08:12:32 INFO OGG-14054 Lag from heartbeat table requires DBLOGIN.
Sending GETLAG request to REPLICAT QREP ...
Last record lag 5 seconds.
Low watermark lag: 1.
High watermark lag: 1.
Low watermark position: Not Available.
High watermark position: Not Available.
At EOF, no more records to process.
GGSCI (node1) 3> info qrep ,detail
REPLICAT QREP Last Started 2017-04-10 08:05 Status RUNNING
INTEGRATED
Checkpoint Lag 00:00:00 (updated 00:00:12 ago)
Process ID 4495
Log Read Checkpoint File /u01/ogg12c/dirdat/qu000000000
First Record RBA 0
INTEGRATED Replicat
No DBLOGIN Provided, constructed inbound server name is OGG$QREP
Current Log BSN value: (requires database login)
Integrated Replicat low watermark: (requires database login)
Integrated Replicat high watermark: (requires database login)
Extract Source Begin End
/u01/ogg12c/dirdat/qu000000000 * Initialized * First Record
/u01/ogg12c/dirdat/qu000000000 * Initialized * First Record
/u01/ogg12c/dirdat/qu000000000 * Initialized * First Record
Current directory /u01/ogg12c
Report file /u01/ogg12c/dirrpt/QREP.rpt
Parameter file /u01/ogg12c/dirprm/qrep.prm
Checkpoint file /u01/ogg12c/dirchk/QREP.cpr
Process file /u01/ogg12c/dirpcs/QREP.pcr
Error log /u01/ogg12c/ggserr.log
GGSCI (node1) 4> exit
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$
[oracle@node1 ogg12c]$ exit
logout
Connection to 192.168.1.25 closed.
源端test用户下插入数据及建表:
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$ sqlplus test/oracle
SQL*Plus: Release 11.2.0.4.0 Production on Mon Apr 10 08:13:10 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-28002: the password will expire within 7 days
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select tname from tab;
TNAME
------------------------------
T1
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(20)
SQL> begin
2 for i in 1..100
3 loop
4 insert into t1 values (i,to_char(i));
5 commit;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL>
SQL>
SQL> show user;
USER is "TEST"
SQL> create table t2(id int primary key);
Table created.
SQL> begin
2 for i in 1 .. 100
3 loop
4 insert into t2 values (i);
5 commit;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL> select tname from tab;
TNAME
------------------------------
T1
T2
SQL> select count(*) from t2;
COUNT(*)
----------
100
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (node1) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
JAGENT STOPPED
EXTRACT STOPPED CLASS_EX 00:00:00 237:06:52
EXTRACT STOPPED CLASS_PU 00:00:00 237:06:51
EXTRACT STOPPED EDDL1 00:00:00 237:07:38
EXTRACT STOPPED EFORMAT 00:00:00 237:06:50
EXTRACT STOPPED EGGTEST1 00:00:00 237:06:50
EXTRACT STOPPED EOLTP01 00:00:00 237:06:49
EXTRACT STOPPED EPUMP01 00:00:00 237:06:49
EXTRACT STOPPED HREXT 00:00:02 237:06:48
EXTRACT STOPPED HRPUMP 00:00:00 237:06:47
EXTRACT STOPPED MYDP1 00:00:00 237:06:47
EXTRACT STOPPED MYEXT1 00:00:02 237:06:47
EXTRACT STOPPED PDDL1 00:00:00 237:07:28
EXTRACT STOPPED PGGTEST1 00:00:00 237:06:46
EXTRACT RUNNING QEXT 00:00:09 00:00:05
EXTRACT RUNNING QUPUMP 00:00:00 00:00:05
REPLICAT STOPPED RDDL2 00:00:00 237:06:56
GGSCI (node1) 2> stats qext
Sending STATS request to EXTRACT QEXT ...
Start of Statistics at 2017-04-10 08:15:25.
DDL replication statistics (for all trails):
*** Total statistics since extract started ***
Operations 1.00
Mapped operations 1.00
Unmapped operations 0.00
Other operations 0.00
Excluded operations 0.00
Output to /u01/goldengate/dirdat/qu:
Extracting from OGG.GG_HEARTBEAT to OGG.GG_HEARTBEAT:
*** Total statistics since 2017-04-10 08:09:45 ***
No database operations have been performed.
*** Daily statistics since 2017-04-10 08:09:45 ***
No database operations have been performed.
*** Hourly statistics since 2017-04-10 08:09:45 ***
No database operations have been performed.
*** Latest statistics since 2017-04-10 08:09:45 ***
No database operations have been performed.
Extracting from OGG.GG_HEARTBEAT_SEED to OGG.GG_HEARTBEAT_SEED:
*** Total statistics since 2017-04-10 08:09:45 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
*** Daily statistics since 2017-04-10 08:09:45 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
*** Hourly statistics since 2017-04-10 08:09:45 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
*** Latest statistics since 2017-04-10 08:09:45 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
Extracting from TEST.T1 to TEST.T1:
*** Total statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Daily statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Hourly statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Latest statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
Extracting from TEST.T2 to TEST.T2:
*** Total statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Daily statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Hourly statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Latest statistics since 2017-04-10 08:09:45 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
End of Statistics.
GGSCI (node1) 3> stats qupump
Sending STATS request to EXTRACT QUPUMP ...
Start of Statistics at 2017-04-10 08:15:31.
DDL replication statistics (for all trails):
*** Total statistics since extract started ***
Operations 1.00
Output to /u01/ogg12c/dirdat/qu:
Extracting from OGG.GG_HEARTBEAT_SEED to OGG.GG_HEARTBEAT_SEED:
*** Total statistics since 2017-04-10 08:10:12 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
*** Daily statistics since 2017-04-10 08:10:12 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
*** Hourly statistics since 2017-04-10 08:10:12 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
*** Latest statistics since 2017-04-10 08:10:12 ***
Total inserts 0.00
Total updates 7.00
Total deletes 0.00
Total discards 0.00
Total operations 7.00
Extracting from TEST.T1 to TEST.T1:
*** Total statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Daily statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Hourly statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Latest statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
Extracting from TEST.T2 to TEST.T2:
*** Total statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Daily statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Hourly statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Latest statistics since 2017-04-10 08:10:12 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
End of Statistics.
GGSCI (node1) 4> exit
[oracle@node1 goldengate]$
[oracle@node1 goldengate]$
登录目标端查看进程状态及数据同步情况:
[oracle@node1 goldengate]$ ssh 192.168.1.25
oracle@192.168.1.25's password:
Last login: Mon Apr 10 08:12:16 2017 from 192.168.1.7
[oracle@node1 ~]$
[oracle@node1 ~]$
[oracle@node1 ~]$ cd $GGHOME
[oracle@node1 ogg12c]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 12 2015 02:56:48
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
GGSCI (node1) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:09 00:00:03
REPLICAT RUNNING QREP 00:00:00 00:03:22
REPLICAT RUNNING REP1 00:00:00 00:00:09
GGSCI (node1) 5> stats qrep
Sending STATS request to REPLICAT QREP ...
Start of Statistics at 2017-04-10 08:18:16.
Integrated Replicat Statistics:
Total transactions 101.00
Redirected 100.00
DDL operations 1.00
Stored procedures 0.00
Datatype functionality 0.00
Event actions 0.00
Direct transactions ratio 100.00%
DDL replication statistics:
*** Total statistics since replicat started ***
Operations 1.00
Mapped operations 1.00
Unmapped operations 0.00
Other operations 0.00
Excluded operations 0.00
Errors 0.00
Retried errors 0.00
Discarded errors 0.00
Ignored errors 0.00
Replicating from TEST.T1 to PDB3.TEST.T1:
*** Total statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Daily statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Hourly statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Latest statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
Replicating from TEST.T2 to PDB3.TEST.T2:
*** Total statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Daily statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Hourly statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
*** Latest statistics since 2017-04-10 08:17:32 ***
Total inserts 100.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 100.00
End of Statistics.
GGSCI (node1) 6> exit
[oracle@node1 ogg12c]$ sqlplus test/oracle@pdb3
SQL*Plus: Release 12.1.0.2.0 Production on Mon Apr 10 08:18:35 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Mon Apr 10 2017 07:55:16 -04:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select tname from tab;
TNAME
--------------------------------------------------------------------------------
T1
T2
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL> select count(*) from t2;
COUNT(*)
----------
100
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(20)
SQL> desc t2;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
SQL>
SQL>
SQL>
SQL>
调整列宽测试:
源端:
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(20)
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL> alter table t1 modify (name varchar2(30));
Table altered.
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(30)
SQL> alter table t1 modify (name varchar2(15));
Table altered.
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(15)
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL>
目标端:
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(20)
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(30)
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL> desc t1;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
NAME VARCHAR2(15)
SQL> select count(*) from t1;
COUNT(*)
----------
100
SQL>
|
|