[BEGIN] 2016/10/28 10:06:55
[oracle@shost ~]$ hostname
shost
[oracle@shost ~]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Fri Oct 28 10:08:51 2016

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect /as sysDBA
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  320306616 bytes
Fixed Size                     740792 bytes
Variable Size                  285212672 bytes
Database Buffers           33554432 bytes
Redo Buffers                     798720 bytes
Database mounted.
Database opened.
SQL> !lsnrctl status

LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 28-OCT-2016 10:09:40

Copyright (c) 1991, 2006, Oracle Corporation.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=shost)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
!TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

SQL> !lsnrctl start
/bin/bash: !lsnrctl: command not found

SQL> !lsnrctl start

LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 28-OCT-2016 10:09:51

Copyright (c) 1991, 2006, Oracle Corporation.  All rights reserved.

Starting /u01/app/oracle/product/9.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 9.2.0.8.0 - Production
System parameter file is /u01/app/oracle/product/9.2.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/9.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=shost)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=shost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 9.2.0.8.0 - Production
Start Date                28-OCT-2016 10:09:51
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=shost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

SQL> alter system register;

System altered.

SQL> !lsnrctl status  

LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 28-OCT-2016 10:10:04

Copyright (c) 1991, 2006, Oracle Corporation.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=shost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 9.2.0.8.0 - Production
Start Date                28-OCT-2016 10:09:51
Uptime                    0 days 0 hr. 0 min. 13 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=shost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 2 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

SQL> select * from v$banner;
select * from v$banner
              *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> select banner from v$version;

BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
PL/SQL Release 9.2.0.8.0 - Production
CORE        9.2.0.8.0        Production
TNS for Linux: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@shost ~]$ cd $GGHOME
[oracle@shost ogg11]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x64, 64bit (optimized), Oracle 9i on Oct  4 2011 23:49:32

Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.



GGSCI (shost) 1> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     STOPPED                                          


GGSCI (shost) 2> start mgr

Manager started.


GGSCI (shost) 3> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          


GGSCI (shost) 4> create user ggs identified by ggs account unlock;
ERROR: Invalid command.

GGSCI (shost) 5> exit
[oracle@shost ogg11]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Fri Oct 28 10:11:44 2016

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> create user ggs identified by ggs account unlock;

User created.

如果对权限有要求,如没要求,一般就给dba权限,详细权限为:
GRANT create table to ggs;
GRANT CONNECT TO ggs;
GRANT ALTER ANY TABLE TO ggs;
GRANT ALTER SESSION TO ggs;
GRANT CREATE SESSION TO ggs;
GRANT FLASHBACK ANY TABLE TO ggs;
GRANT SELECT ANY DICTIONARY TO ggs;
GRANT SELECT ANY TABLE TO ggs;
GRANT RESOURCE” TO ggs;
GRANT DELETE ANY TABLE TO ggs;
GRANT INSERT ANY TABLE TO ggs;
GRANT UPDATE ANY TABLE TO ggs;
GRANT RESTRICTED SESSION TO ggs;

SQL> grant dba to ggs;

Grant succeeded.

SQL> archive log list;
Database log mode               Archive Mode
Automatic archival               Enabled
Archive destination               /u01/app/oracle/oradata/orcl/archive
Oldest online log sequence     9
Next log sequence to archive   11
Current log sequence               11
SQL> alter system set recyclebin=off scope=spfile;
alter system set recyclebin=off scope=spfile
                 *
ERROR at line 1:
ORA-02065: illegal option for ALTER SYSTEM


SQL> select supplemental_log_data_min from v$database;

SUP
---
NO

SQL> alter database add supplemental log data;

Database altered.

SQL> select supplemental_log_data_min from v$database;

SUP
---
YES

SQL> select username,default_tablespace,temporary_tablespace from dba_users where username='SH';

USERNAME                       DEFAULT_TABLESPACE
------------------------------ ------------------------------
TEMPORARY_TABLESPACE
------------------------------
SH                               EXAMPLE
TEMP




SQL> alter user sh identified by sh account unlock;

User altered.

SQL> connect sh/sh
Connected.
SQL> select tname from tab;

TNAME
------------------------------
CAL_MONTH_SALES_MV
CHANNELS
COSTS
COUNTRIES
CUSTOMERS
FWEEK_PSCAT_SALES_MV
MVIEW$_EXCEPTIONS
MV_CAPABILITIES_TABLE
PLAN_TABLE
PRODUCTS
PROMOTIONS

TNAME
------------------------------
REWRITE_TABLE
SALES
SALES_TRANSACTIONS_EXT
TIMES

15 rows selected.


SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@shost ogg11]$
[oracle@shost ogg11]$
[oracle@shost ogg11]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x64, 64bit (optimized), Oracle 9i on Oct  4 2011 23:49:32

Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.



GGSCI (shost) 1> dblogin userid ggs,password ggs
Successfully logged into database.

GGSCI (shost) 6> add trandata sh.*

2016-10-28 21:21:19  INFO    OGG-01451  Unique key I_SNAP$_CAL_MONTH_SALES_MV cannot be used due to the inclusion of function-based index column.

2016-10-28 21:21:19  WARNING OGG-00869  No viable unique key is defined for table CAL_MONTH_SALES_MV. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.CAL_MONTH_SALES_MV.

Logging of supplemental redo data enabled for table SH.CHANNELS.

2016-10-28 21:21:19  WARNING OGG-00869  No unique key is defined for table COSTS. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.COSTS.

Logging of supplemental redo data enabled for table SH.COUNTRIES.

Logging of supplemental redo data enabled for table SH.CUSTOMERS.

2016-10-28 21:21:19  INFO    OGG-01451  Unique key I_SNAP$_FWEEK_PSCAT_SALES_ cannot be used due to the inclusion of function-based index column.

2016-10-28 21:21:19  WARNING OGG-00869  No viable unique key is defined for table FWEEK_PSCAT_SALES_MV. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.FWEEK_PSCAT_SALES_MV.

2016-10-28 21:21:19  WARNING OGG-00869  No unique key is defined for table MVIEW$_EXCEPTIONS. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.MVIEW$_EXCEPTIONS.

2016-10-28 21:21:19  WARNING OGG-00869  No unique key is defined for table MV_CAPABILITIES_TABLE. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.MV_CAPABILITIES_TABLE.

2016-10-28 21:21:19  WARNING OGG-00869  No unique key is defined for table PLAN_TABLE. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.PLAN_TABLE.

Logging of supplemental redo data enabled for table SH.PRODUCTS.

Logging of supplemental redo data enabled for table SH.PROMOTIONS.

2016-10-28 21:21:19  WARNING OGG-00869  No unique key is defined for table REWRITE_TABLE. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.REWRITE_TABLE.

2016-10-28 21:21:19  WARNING OGG-00869  No unique key is defined for table SALES. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

Logging of supplemental redo data enabled for table SH.SALES.
ERROR: OCI Error retrieving bind info for query (status = 100), SQL <SELECT * FROM "SH"."SALES_TRANSACTIONS_EXT">.


GGSCI (shost) 7> info trandata sh.*

Logging of supplemental redo log data is enabled for table SH.CAL_MONTH_SALES_MV

Logging of supplemental redo log data is enabled for table SH.CHANNELS

Logging of supplemental redo log data is enabled for table SH.COSTS

Logging of supplemental redo log data is enabled for table SH.COUNTRIES

Logging of supplemental redo log data is enabled for table SH.CUSTOMERS

Logging of supplemental redo log data is enabled for table SH.FWEEK_PSCAT_SALES_MV

Logging of supplemental redo log data is enabled for table SH.MVIEW$_EXCEPTIONS

Logging of supplemental redo log data is enabled for table SH.MV_CAPABILITIES_TABLE

Logging of supplemental redo log data is enabled for table SH.PLAN_TABLE

Logging of supplemental redo log data is enabled for table SH.PRODUCTS

Logging of supplemental redo log data is enabled for table SH.PROMOTIONS

Logging of supplemental redo log data is enabled for table SH.REWRITE_TABLE

Logging of supplemental redo log data is enabled for table SH.SALES

Logging of supplemental redo log data is disabled for table SH.SALES_TRANSACTIONS_EXT.

Logging of supplemental redo log data is disabled for table SH.TIMES.

GGSCI (shost) 9> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          
EXTRACT     RUNNING     EXT_DB      00:00:00      00:00:08   
EXTRACT     RUNNING     PM_DB       00:00:00      00:00:00   


GGSCI (shost) 10> edit params ext_cdb




GGSCI (shost) 4> view params ext_cdb

extract ext_cdb
dynamicresolution
userid ggs,password ggs
exttrail ./dirdat/cc
table sh.*;


GGSCI (shost) 5> add extract ext_cdb,tranlog,begin now
EXTRACT added.




GGSCI (shost) 7> add exttrail ./dirdat/cc,extract ext_cdb
EXTTRAIL added.


GGSCI (shost) 8> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          
EXTRACT     STOPPED     EXT_DB      00:00:00      00:00:39   


GGSCI (shost) 9> edit params pm_cdb



GGSCI (shost) 10> view params pm_cdb

extract pm_cdb
passthru
dynamicresolution
userid ggs,password ggs
rmthost 192.168.1.123,mgrport 7809
rmttrail ./dirdat/dd
table hr.*;


GGSCI (shost) 11> add extract pm_cdb,exttrailsource ./dirdat/cc
EXTRACT added.


GGSCI (shost) 12> add rmttrail ./dirdat/dd,extract pm_cdb
RMTTRAIL added.


GGSCI (shost) 18> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          
EXTRACT     STOPPED     EXT_CDB     00:00:00      00:01:57   
EXTRACT     RUNNING     EXT_DB      00:00:00      00:00:06   
EXTRACT     STOPPED     PM_CDB      00:00:00      00:00:26   
EXTRACT     RUNNING     PM_DB       00:00:00      00:00:06   





GGSCI (shost) 32> start ext_cdb
Sending START request to MANAGER ...
EXTRACT EXT_CDB starting
GGSCI (shost) 33> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING                                          
EXTRACT     RUNNING     EXT_DB      00:00:00      00:04:19   
EXTRACT     STOPPED     PM_DB       00:00:00      00:10:03   
GGSCI (shost) 34> start pm_cdb
Sending START request to MANAGER ...
EXTRACT PM_CDB starting
GGSCI (shost) 37> INFO ALL

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          
EXTRACT     RUNNING     EXT_CDB     00:00:00      00:00:05   
EXTRACT     RUNNING     EXT_DB      00:00:00      00:00:10   
EXTRACT     RUNNING     PM_CDB      00:00:00      00:00:05   
EXTRACT     RUNNING     PM_DB       00:00:00      00:00:09   







GGSCI (shost) 5> view ggsevt


2016-10-28 21:29:45  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  EXTRACT EXT_CDB starting.
2016-10-28 21:29:45  INFO    OGG-00992  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  EXTRACT EXT_CDB starting.
2016-10-28 21:29:45  INFO    OGG-01635  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  BOUNDED RECOVERY: reset to initial or altered checkp
oint.
2016-10-28 21:29:45  INFO    OGG-01513  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  Positioning to Sequence 12, RBA 5562384.
2016-10-28 21:29:45  INFO    OGG-01516  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  Positioned to Sequence 12, RBA 5562384, Oct 28, 2016
9:24:17 PM.
2016-10-28 21:29:45  INFO    OGG-00993  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  EXTRACT EXT_CDB started.
2016-10-28 21:29:45  INFO    OGG-01052  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  No recovery is required for target file ./dirdat/cc0
00000, at RBA 0 (file not opened).
2016-10-28 21:29:45  INFO    OGG-01478  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  Output file ./dirdat/cc is using format RELEASE 10.4
/11.1.
2016-10-28 21:29:45  INFO    OGG-01517  Oracle GoldenGate Capture for Oracle, ext_cdb.prm:  Position of first record processed Sequence 12, RBA
5562384, SCN 0.301793, Oct 28, 2016 9:24:20 PM.
2016-10-28 21:30:32  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): add extract pm_cdb exttrailso
urce ./dirdat/cc.
2016-10-28 21:30:44  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): add rmttrail ./dirdat/dd extr
act pm_cdb.
2016-10-28 21:30:52  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): start pm_cdb.
2016-10-28 21:30:52  INFO    OGG-00963  Oracle GoldenGate Manager for Oracle, mgr.prm:  Command received from GGSCI on host 192.168.1.88 (START
EXTRACT PM_CDB ).
2016-10-28 21:30:52  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  EXTRACT PM_CDB starting.
2016-10-28 21:30:52  INFO    OGG-00992  Oracle GoldenGate Capture for Oracle, pm_cdb.prm:  EXTRACT PM_CDB starting.
2016-10-28 21:30:52  INFO    OGG-00993  Oracle GoldenGate Capture for Oracle, pm_cdb.prm:  EXTRACT PM_CDB started.
2016-10-28 21:30:57  INFO    OGG-01226  Oracle GoldenGate Capture for Oracle, pm_cdb.prm:  Socket buffer size set to 27985 (flush size 27985).
2016-10-28 21:31:02  INFO    OGG-01052  Oracle GoldenGate Capture for Oracle, pm_cdb.prm:  No recovery is required for target file ./dirdat/dd00
0000, at RBA 0 (file not opened).
2016-10-28 21:31:02  INFO    OGG-01478  Oracle GoldenGate Capture for Oracle, pm_cdb.prm:  Output file ./dirdat/dd is using format RELEASE 10.4/
11.1.



GGSCI (shost) 6> exit


查看目标端生成trail文件:
[oracle@shost ogg11]$ ssh 192.168.1.123
oracle@192.168.1.123's password:
Last login: Thu Oct 27 23:14:12 2016 from 192.168.1.88
[oracle@node1 ~]$ cd $GGHOME
[oracle@node1 ogg12c]$ cd dirdat
[oracle@node1 dirdat]$ ls -l
total 20192
-rw-r-----. 1 oracle oinstall   13710 Oct 28 06:23 bb000000
-rw-r-----. 1 oracle oinstall    1102 Oct 28 06:39 bb000001
-rw-r-----. 1 oracle oinstall 9999956 Oct 28 06:43 bb000002
-rw-r-----. 1 oracle oinstall 9999951 Oct 28 06:47 bb000003
-rw-r-----. 1 oracle oinstall  650510 Oct 28 06:47 bb000004
-rw-r-----. 1 oracle oinstall       0 Oct 28 09:29 dd000000

[oracle@node1 dirdat]$ exit
logout
Connection to 192.168.1.123 closed.
[oracle@shost ogg11]$ exit
logout
[oracle@shost ogg11]$ cd dirdat
[oracle@shost dirdat]$ ls -l
total 20232
-rw-rw-rw-  1 oracle oinstall   13680 Oct 28 18:23 aa000000
-rw-rw-rw-  1 oracle oinstall     986 Oct 28 18:40 aa000001
-rw-rw-rw-  1 oracle oinstall 9999913 Oct 28 18:44 aa000002
-rw-rw-rw-  1 oracle oinstall 9999822 Oct 28 18:48 aa000003
-rw-rw-rw-  1 oracle oinstall  650480 Oct 28 18:48 aa000004
-rw-rw-rw-  1 oracle oinstall     926 Oct 28 21:29 cc000000
[oracle@shost dirdat]$


执行数据首次实例化:


[oracle@shost ~]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Fri Oct 28 21:35:38 2016

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> select directory_name from dba_directories;

DIRECTORY_NAME
------------------------------
MEDIA_DIR
LOG_FILE_DIR
########DATA_FILE_DIR



[root@shost ~]# su - oracle
[oracle@shost ~]$ cd $GGHOME
[oracle@shost ogg11]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x64, 64bit (optimized), Oracle 9i on Oct  4 2011 23:49:32

Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.



GGSCI (shost) 1> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          
EXTRACT     RUNNING     EXT_CDB     00:00:00      00:00:01   
EXTRACT     RUNNING     EXT_DB      00:00:00      00:00:04   
EXTRACT     RUNNING     PM_CDB      00:00:00      00:00:05   
EXTRACT     RUNNING     PM_DB       00:00:00      00:00:09   



确认extrace,data pump 启动后:

GGSCI (shost) 2> exit




查看源端数据库当前scn:

[oracle@shost ogg11]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Fri Oct 28 10:47:06 2016

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> select dbms_flashback.get_system_change_number from dual;

GET_SYSTEM_CHANGE_NUMBER
------------------------
                  303914

SQL>
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production


exp 一致性导出源端数据:

[oracle@shost ogg11]$ cd
[oracle@shost ~]$ pwd
/home/oracle
[oracle@shost ~]$ export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
[oracle@shost ~]$ exp system/oracle file=/u01/app/oracle/exp_sh.dmp owner=sh flashback_scn=303914 log= exp_sh.log

Export: Release 9.2.0.8.0 - Production on Fri Oct 28 21:39:03 2016

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SH
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user SH
About to export SH's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export SH's tables via Conventional Path ...
. . exporting table             CAL_MONTH_SALES_MV         35 rows exported
. . exporting table                       CHANNELS          5 rows exported
. . exporting table                          COSTS
. . exporting partition                  COSTS_Q1_1998      57879 rows exported
. . exporting partition                  COSTS_Q2_1998      58450 rows exported
. . exporting partition                  COSTS_Q3_1998      52570 rows exported
. . exporting partition                  COSTS_Q4_1998      65803 rows exported
. . exporting partition                  COSTS_Q1_1999      66940 rows exported
. . exporting partition                  COSTS_Q2_1999      67825 rows exported
. . exporting partition                  COSTS_Q3_1999      60968 rows exported
. . exporting partition                  COSTS_Q4_1999      75591 rows exported
. . exporting partition                  COSTS_Q1_2000      78468 rows exported
. . exporting partition                  COSTS_Q2_2000      78036 rows exported
. . exporting partition                  COSTS_Q3_2000      70424 rows exported
. . exporting partition                  COSTS_Q4_2000      54812 rows exported
. . exporting table                      COUNTRIES         19 rows exported
. . exporting table                      CUSTOMERS      50000 rows exported
. . exporting table           FWEEK_PSCAT_SALES_MV     149325 rows exported
. . exporting table              MVIEW$_EXCEPTIONS          0 rows exported
. . exporting table          MV_CAPABILITIES_TABLE          0 rows exported
. . exporting table                     PLAN_TABLE          0 rows exported
. . exporting table                       PRODUCTS      10000 rows exported
. . exporting table                     PROMOTIONS        501 rows exported
. . exporting table                  REWRITE_TABLE          0 rows exported
. . exporting table                          SALES
. . exporting partition                     SALES_1995          0 rows exported
. . exporting partition                     SALES_1996          0 rows exported
. . exporting partition                  SALES_H1_1997          0 rows exported
. . exporting partition                  SALES_H2_1997          0 rows exported
. . exporting partition                  SALES_Q1_1998      71805 rows exported
. . exporting partition                  SALES_Q2_1998      72705 rows exported
. . exporting partition                  SALES_Q3_1998      63390 rows exported
. . exporting partition                  SALES_Q4_1998      83415 rows exported
. . exporting partition                  SALES_Q1_1999      86217 rows exported
. . exporting partition                  SALES_Q2_1999      87298 rows exported
. . exporting partition                  SALES_Q3_1999      76139 rows exported
. . exporting partition                  SALES_Q4_1999     100110 rows exported
. . exporting partition                  SALES_Q1_2000     104544 rows exported
. . exporting partition                  SALES_Q2_2000     104652 rows exported
. . exporting partition                  SALES_Q3_2000      91260 rows exported
. . exporting partition                  SALES_Q4_2000      74736 rows exported
. . exporting table         SALES_TRANSACTIONS_EXT
. . exporting table                          TIMES       1461 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
[oracle@shost ~]$

[oracle@shost ~]$
[oracle@shost ~]$
[oracle@shost ~]$


再次确认源端用户表空间相关信息:
[oracle@shost ~]$ sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on Fri Oct 28 10:50:19 2016

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect /as sysdba
Connected.

SQL> select username,default_tablespace,temporary_tablespace from dba_users where username='SH';

USERNAME                       DEFAULT_TABLESPACE
------------------------------ ------------------------------
TEMPORARY_TABLESPACE
------------------------------
SH                               EXAMPLE
TEMP



查看源端hr用户的数据表:

SQL> connect /as sysdba
Connected.
SQL> alter user sh identified by sh account unlock;

User altered.

SQL> connect sh/sh
Connected.
SQL> select tname from tab;

TNAME
------------------------------
CAL_MONTH_SALES_MV
CHANNELS
COSTS
COUNTRIES
CUSTOMERS
FWEEK_PSCAT_SALES_MV
MVIEW$_EXCEPTIONS
MV_CAPABILITIES_TABLE
PLAN_TABLE
PRODUCTS
PROMOTIONS

TNAME
------------------------------
REWRITE_TABLE
SALES
SALES_TRANSACTIONS_EXT
TIMES

15 rows selected.



SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production

连接到目标端,创建相应的表空间及用户:
[oracle@shost ~]$ ssh 192.168.1.123
oracle@192.168.1.123's password:
Last login: Thu Oct 27 22:45:31 2016 from 192.168.1.88

[oracle@node1 ~]$ cd $ORACLE_HOME/network/admin
[oracle@node1 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

PDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1.abc.com)(PORT = 1539))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdb1)
    )
  )

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = node1.abc.com)(PORT = 1539))


LISTENER_ORCC =
  (ADDRESS = (PROTOCOL = TCP)(HOST = node1.abc.com)(PORT = 1539))


ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1.abc.com)(PORT = 1539))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

ORCC =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1.abc.com)(PORT = 1539))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcc)
    )
  )

[oracle@node1 admin]$ sqlplus /nolog

SQL*Plus: Release 12.1.0.2.0 Production on Fri Oct 28 09:49:12 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT
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> show con_name;

CON_NAME
------------------------------
CDB$ROOT
SQL> create user C##GGADMIN identified by oracle default tablespace users;

User created.

SQL> grant dba,create session to c##ggadmin;

Grant succeeded.

SQL> execute dbms_goldengate_auth.grant_admin_privilege('C##GGADMIN',container=>'ALL');

PL/SQL procedure successfully completed.

SQL> grant dba to c##ggadmin container=all;

Grant succeeded.

SQL> alter session set container=pdb1;

Session altered.

SQL> show con_name;

CON_NAME
------------------------------
PDB1
SQL> create tablespace example datafile size 1g;

Tablespace created.

SQL> create user sh identified by sh   
  2  account unlock
  3  default tablespace example
  4  temporary tablespace temp
  5  quota unlimited on example;

User created.

SQL> grant dba to sh;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
[oracle@node1 admin]$ sqlplus sh/sh@pdb1

SQL*Plus: Release 12.1.0.2.0 Production on Fri Oct 28 10:01:00 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> select tname from tab;

no rows selected

SQL> select username from dba_users;

USERNAME
--------------------------------------------------------------------------------
SH
ORACLE_OCM
OJVMSYS
SYSKM
XS$NULL
GSMCATUSER
MDDATA
SYSBACKUP
DIP
SYSDG
APEX_PUBLIC_USER

USERNAME
--------------------------------------------------------------------------------
C##GGADMIN
SPATIAL_CSW_ADMIN_USR
TEST
SPATIAL_WFS_ADMIN_USR
GSMUSER
AUDSYS
PDBADMIN
FLOWS_FILES
DVF
MDSYS
ORDSYS

USERNAME
--------------------------------------------------------------------------------
DBSNMP
WMSYS
APEX_040200
APPQOSSYS
GSMADMIN_INTERNAL
ORDDATA
CTXSYS
ANONYMOUS
XDB
ORDPLUGINS
DVSYS

USERNAME
--------------------------------------------------------------------------------
SI_INFORMTN_SCHEMA
OLAPSYS
LBACSYS
OUTLN
SYSTEM
SYS

39 rows selected.


SQL> create directory data_file_dir as '/u01/app/oracle';

Directory created.

SQL> grant read,write on directory data_file_dir to public;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
[oracle@node1 admin]$ exit
logout
Connection to 192.168.1.123 closed.
[oracle@shost ~]$ cd /u01/app/oracle
[oracle@shost oracle]$ pwd
/u01/app/oracle
[oracle@shost oracle]$ ls -l
total 187472
drwxr-xr-x   3 oracle oinstall      4096 Oct 26 14:48 admin
drwxrwxr-x   7 oracle oinstall      4096 Oct 26 13:41 doc
-rw-r--r--   1 oracle oinstall 114032640 Oct 27 10:48 exp_full.dmp
-rw-r--r--   1 oracle oinstall     57344 Oct 28 10:49 exp_hr.dmp
-rw-r--r--   1 oracle oinstall  77651968 Oct 28 21:39 exp_sh.dmp
drwxrwxr-x   3 oracle oinstall      4096 Oct 26 13:41 jre
drwxr-xr-x   3 oracle oinstall      4096 Oct 26 14:48 oradata
drwxrwxr-x  13 oracle oinstall      4096 Oct 26 14:42 oraInventory
drwxr-xr-x   3 oracle oinstall      4096 Oct 26 13:18 product
[oracle@shost oracle]$ scp -pr exp_sh.dmp 192.168.1.123:/u01/app/oracle/
oracle@192.168.1.123's password:
exp_sh.dmp                                                                                                    100%   74MB  74.1MB/s   00:01   
[oracle@shost oracle]$
[oracle@shost ~]$ ssh 192.168.1.123
oracle@192.168.1.123's password:
Last login: Fri Oct 28 10:03:04 2016 from 192.168.1.88
[oracle@node1 ~]$ cd /u01/app/oracle
[oracle@node1 oracle]$ ls -l
total 75920
drwxrwx---.  4 oracle oinstall     4096 Oct 27 00:29 admin
drwxrwx---.  4 oracle oinstall     4096 Oct 26 23:22 audit
drwxrwx---.  3 oracle oinstall     4096 Jun  6 01:43 cfgtoollogs
drwxrwxr-x.  2 oracle oinstall     4096 Oct  6 08:58 checkpoints
drwxrwxr-x. 19 oracle oinstall     4096 Jun  6 01:42 diag
drwxr-xr-x.  2 oracle oinstall     4096 Oct 27 02:20 dir1
-rw-r--r--.  1 oracle oinstall    57344 Oct 28  2016 exp_hr.dmp
-rw-r--r--.  1 oracle oinstall 77651968 Oct 28  2016 exp_sh.dmp
-rw-r--r--.  1 oracle oinstall     2813 Oct 27 22:57 imp_hr.log
drwxrwxr-x.  3 oracle oinstall     4096 Jun  6 01:38 product
[oracle@node1 oracle]$ imp userid=system/oracle@pdb1  fromuser=sh touser=sh file=exp_sh.dmp log=imp_pdb1.log

Import: Release 12.1.0.2.0 - Production on Fri Oct 28 10:08:43 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

Export file created by EXPORT:V09.02.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
. importing SH's objects into SH
. . importing table           "CAL_MONTH_SALES_MV"         35 rows imported
. . importing table                     "CHANNELS"          5 rows imported
. . importing partition        "COSTS":"COSTS_Q1_1998"      57879 rows imported
. . importing partition        "COSTS":"COSTS_Q2_1998"      58450 rows imported
. . importing partition        "COSTS":"COSTS_Q3_1998"      52570 rows imported
. . importing partition        "COSTS":"COSTS_Q4_1998"      65803 rows imported
. . importing partition        "COSTS":"COSTS_Q1_1999"      66940 rows imported
. . importing partition        "COSTS":"COSTS_Q2_1999"      67825 rows imported
. . importing partition        "COSTS":"COSTS_Q3_1999"      60968 rows imported
. . importing partition        "COSTS":"COSTS_Q4_1999"      75591 rows imported
. . importing partition        "COSTS":"COSTS_Q1_2000"      78468 rows imported
. . importing partition        "COSTS":"COSTS_Q2_2000"      78036 rows imported
. . importing partition        "COSTS":"COSTS_Q3_2000"      70424 rows imported
. . importing partition        "COSTS":"COSTS_Q4_2000"      54812 rows imported
. . importing table                    "COUNTRIES"         19 rows imported
. . importing table                    "CUSTOMERS"      50000 rows imported
. . importing table         "FWEEK_PSCAT_SALES_MV"     149325 rows imported
. . importing table            "MVIEW$_EXCEPTIONS"
Note: table contains ROWID column, values may be obsolete          0 rows imported
. . importing table        "MV_CAPABILITIES_TABLE"          0 rows imported
. . importing table                   "PLAN_TABLE"          0 rows imported
. . importing table                     "PRODUCTS"      10000 rows imported
. . importing table                   "PROMOTIONS"        501 rows imported
. . importing table                "REWRITE_TABLE"          0 rows imported
. . importing partition           "SALES":"SALES_1995"          0 rows imported
. . importing partition           "SALES":"SALES_1996"          0 rows imported
. . importing partition        "SALES":"SALES_H1_1997"          0 rows imported
. . importing partition        "SALES":"SALES_H2_1997"          0 rows imported
. . importing partition        "SALES":"SALES_Q1_1998"      71805 rows imported
. . importing partition        "SALES":"SALES_Q2_1998"      72705 rows imported
. . importing partition        "SALES":"SALES_Q3_1998"      63390 rows imported
. . importing partition        "SALES":"SALES_Q4_1998"      83415 rows imported
. . importing partition        "SALES":"SALES_Q1_1999"      86217 rows imported
. . importing partition        "SALES":"SALES_Q2_1999"      87298 rows imported
. . importing partition        "SALES":"SALES_Q3_1999"      76139 rows imported
. . importing partition        "SALES":"SALES_Q4_1999"     100110 rows imported
. . importing partition        "SALES":"SALES_Q1_2000"     104544 rows imported
. . importing partition        "SALES":"SALES_Q2_2000"     104652 rows imported
. . importing partition        "SALES":"SALES_Q3_2000"      91260 rows imported
. . importing partition        "SALES":"SALES_Q4_2000"      74736 rows imported
. . importing table                        "TIMES"       1461 rows imported
Import terminated successfully without warnings.
[oracle@node1 oracle]$ sqlplus sh/sh@pdb1

SQL*Plus: Release 12.1.0.2.0 Production on Fri Oct 28 10:09:42 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Fri Oct 28 2016 10:03:11 -04:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> select tname from tab;

TNAME
--------------------------------------------------------------------------------
CAL_MONTH_SALES_MV
CHANNELS
COSTS
COUNTRIES
CUSTOMERS
FWEEK_PSCAT_SALES_MV
MVIEW$_EXCEPTIONS
MV_CAPABILITIES_TABLE
PLAN_TABLE
PRODUCTS
PROMOTIONS

TNAME
--------------------------------------------------------------------------------
REWRITE_TABLE
SALES
SALES_TRANSACTIONS_EXT
TIMES

15 rows selected.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

[oracle@node1 oracle]$ cd $GGHOME
[oracle@node1 ogg12c]$ sqlplus /nolog

SQL*Plus: Release 12.1.0.2.0 Production on Fri Oct 28 10:10:34 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> show parameter goldengate

NAME                                     TYPE         VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication             boolean         FALSE
SQL> alter system set enable_goldengate_replication=TRUE;

System altered.

SQL> show parameter enable_goldengate

NAME                                     TYPE         VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication             boolean         TRUE

SQL> select privilege from dba_sys_privs where grantee = 'C##GGADMIN';

PRIVILEGE
----------------------------------------
DROP ANY EDITION
CREATE JOB
ALTER ANY TABLE
UNLIMITED TABLESPACE
ALTER SESSION
CREATE RULE SET
LOGMINING
FLASHBACK ANY TABLE
CREATE ANY EDITION
CREATE RULE
EXECUTE ANY RULE SET

PRIVILEGE
----------------------------------------
CREATE EVALUATION CONTEXT
SELECT ANY TABLE
CREATE SESSION
DEQUEUE ANY QUEUE
UNLIMITED TABLESPACE

16 rows selected.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
[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                                          
REPLICAT    RUNNING     REP_DB      00:00:00      00:00:02   


GGSCI (node1) 2> dblogin userid c##ggadmin,password oracle
Successfully logged into database CDB$ROOT.

GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 3> edit params rep_cdb



GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 4> view params rep_cdb

REPLICAT rep_cdb
USERID c##ggadmin@pdb1, password oracle
ASSUMETARGETDEFS
handlecollisions
MAP pdb1.sh.*, TARGET pdb2.sh.*;


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 5> edit params rep_cdb



GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 6> view params rep_cdb

REPLICAT rep_cdb
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
USERID c##ggadmin@pdb1, password oracle
ASSUMETARGETDEFS
handlecollisions
MAP sh.*, TARGET pdb1.sh.*;



GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 7> add replicat rep_cdb, exttrail ./dirdat/dd, checkpointtable pdb1.c##ggadmin.checkpoint
REPLICAT added.


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 8> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                          
REPLICAT    STOPPED     REP_CDB     00:00:00      00:00:03   
REPLICAT    RUNNING     REP_DB      00:00:00      00:00:00   


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 9> start rep_cdb,aftercsn 303914

Sending START request to MANAGER ...
REPLICAT REP_CDB starting


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 10> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                          
REPLICAT    STOPPED     REP_CDB     00:00:00      00:02:58   
REPLICAT    RUNNING     REP_DB      00:00:00      00:00:05   


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 11>

2016-10-28 10:27:28  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): start rep_cdb aftercsn 303914.
2016-10-28 10:27:28  INFO    OGG-00963  Oracle GoldenGate Manager for Oracle, mgr.prm:  Command received from GGSCI on host [192.168.1.123]:16354 (START REPLICAT REP_CDB AFTERCSN 303914).
2016-10-28 10:27:28  INFO    OGG-00960  Oracle GoldenGate Manager for Oracle, mgr.prm:  Access granted (rule #6).
2016-10-28 10:27:28  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  REPLICAT REP_CDB starting.
2016-10-28 10:27:29  INFO    OGG-00995  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  REPLICAT REP_CDB starting.
2016-10-28 10:27:29  INFO    OGG-03059  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  Operating system character set identified as UTF-8.
2016-10-28 10:27:29  INFO    OGG-02695  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  ANSI SQL parameter syntax is used for parameter parsing.
2016-10-28 10:27:30  INFO    OGG-02679  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  The Replicat process logged on to database PDB1 and can only apply to that database.
2016-10-28 10:27:30  INFO    OGG-06451  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  Triggers will be suppressed by default.
2016-10-28 10:27:30  INFO    OGG-01815  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  Virtual Memory Facilities for: COM
    anon alloc: mmap(MAP_ANON)  anon free: munmap
    file alloc: mmap(MAP_SHARED)  file free: munmap
    target directories:
    /u01/ogg12c/dirtmp.
2016-10-28 10:27:30  ERROR   OGG-00446  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  Checkpoint table pdb1.c##ggadmin.checkpoint does not exist. Create this table with the ADD CHECKPOINTTABLE command in GGSCI.
2016-10-28 10:27:30  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  PROCESS ABENDING.
2016-10-28 10:27:31  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 12> view params ./GLOBALS

checkpointtable ggs.chkt


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 13> add checkpointtable pdb1.c##ggadmin.checkpoint

Successfully created checkpoint table pdb1.c##ggadmin.checkpoint.

GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 14> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                          
REPLICAT    STOPPED     REP_CDB     00:00:00      00:07:24   
REPLICAT    RUNNING     REP_DB      00:00:00      00:00:00   


GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 15> start rep_cdb,aftercsn 303914

Sending START request to MANAGER ...
REPLICAT REP_CDB starting

GGSCI (node1 as c##ggadmin@orcc/CDB$ROOT) 16> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                          
REPLICAT    RUNNING     REP_CDB     00:00:00      00:00:07   
REPLICAT    RUNNING     REP_DB      00:00:00      00:00:08   

日志:
2016-10-28 10:32:27  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  REPLICAT REP_CDB started.
2016-10-28 10:32:28  INFO    OGG-02243  Oracle GoldenGate Delivery for Oracle, rep_cdb.prm:  Opened trail file ./dirdat/dd000000 at 2016-10-28 10:32:28.063782.
2016-10-28 10:33:15  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.

GGSCI (node1) 19> lag rep_cdb

2016-10-28 10:42:01  INFO    OGG-14054  Lag from heartbeat table requires DBLOGIN.

Sending GETLAG request to REPLICAT REP_CDB ...
Last record lag 113 seconds.
At EOF, no more records to process.


GGSCI (node1) 20> send rep_cdb nohandlecollision

Sending NOHANDLECOLLISION request to REPLICAT REP_CDB ...

ERROR: unknown request.

2016-10-28 10:42:26  WARNING OGG-01742  Command sent to REPLICAT REP_CDB returned with an ERROR response.


GGSCI (node1) 21> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                          
REPLICAT    RUNNING     REP_CDB     00:00:00      00:00:03   
REPLICAT    RUNNING     REP_DB      00:00:00      00:00:00   


GGSCI (node1) 22> view params rep_cdb

REPLICAT rep_cdb
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
USERID c##ggadmin@pdb1, password oracle
ASSUMETARGETDEFS
handlecollisions
MAP sh.*, TARGET pdb1.sh.*;


GGSCI (node1) 23> send rep_cdb nohandlecollisions

Sending NOHANDLECOLLISIONS request to REPLICAT REP_CDB ...
REP_CDB No tables found matching * to set NOHANDLECOLLISIONS.


GGSCI (node1) 24> edit params rep_cdb



GGSCI (node1) 25> view params rep_cdb

REPLICAT rep_cdb
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
USERID c##ggadmin@pdb1, password oracle
ASSUMETARGETDEFS
---handlecollisions
MAP sh.*, TARGET pdb1.sh.*;


GGSCI (node1) 26>





测试:




















标签: 暂无标签
dongxujian

写了 86 篇文章,拥有财富 384,被 13 人关注

转播转播 分享分享 分享淘帖
回复

使用道具

成为第一个吐槽的人

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈