Xshell 5 (Build 1124)
Copyright (c) 2002-2017 NetSarang Computer, Inc. All rights reserved.
Type `help' to learn how to use Xshell prompt.
[d:\~]$
Connecting to 192.168.1.25:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Last login: Fri Oct 7 08:36:45 2016 from 192.168.1.1
[root@node1 ~]# su - oracle
[oracle@node1 ~]$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Sun Apr 2 23:28:37 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> connect /as sysDBA
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 3120562176 bytes
Fixed Size 3715688 bytes
Variable Size 822087064 bytes
Database Buffers 2281701376 bytes
Redo Buffers 13058048 bytes
Database mounted.
Database opened.
SQL> !lsnrctl start
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 02-APR-2017 23:29:27
Copyright (c) 1991, 2014, Oracle. All rights reserved.
sStarting /u01/app/oracle/product/12.1.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /u01/app/oracle/product/12.1.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/node1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 02-APR-2017 23:29:31
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/node1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
SQL> how pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 MOUNTED
4 PDB2 MOUNTED
5 PDB3 MOUNTED
6 PDB4 MOUNTED
SQL> alter pluggable database pdb1 open;
Pluggable database altered.
SQL> alter pluggable database pd2 open;
alter pluggable database pd2 open
*
ERROR at line 1:
ORA-65011: Pluggable database PD2 does not exist.
SQL> alter pluggable database pdb2 open;
Pluggable database altered.
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 MOUNTED
6 PDB4 MOUNTED
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 ~]$ 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 STOPPED
EXTRACT STOPPED EXT1 00:00:11 4262:54:32
REPLICAT STOPPED REP1 00:00:00 4262:54:32
GGSCI (node1) 2> start mgr
Manager started.
GGSCI (node1) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED EXT1 00:00:11 4262:54:36
REPLICAT STOPPED REP1 00:00:00 4262:54:36
GGSCI (node1) 4> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED EXT1 00:00:11 4262:54:44
REPLICAT STOPPED REP1 00:00:00 4262:54:44
GGSCI (node1) 5> start ext1
Sending START request to MANAGER ...
EXTRACT EXT1 starting
GGSCI (node1) 6> start rep1
Sending START request to MANAGER ...
REPLICAT REP1 starting
GGSCI (node1) 7> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:03 00:00:09
REPLICAT RUNNING REP1 00:00:00 00:00:01
GGSCI (node1) 8> view params ext1
EXTRACT ext1
USERID c##ggadmin, PASSWORD oracle
EXTTRAIL ./dirdat/ex
SOURCECATALOG pdb1
TABLE TEST.*;
GGSCI (node1) 9> view parameter rep1
ERROR: Invalid command.
GGSCI (node1) 10> view params rep1
REPLICAT rep1
USERID c##ggadmin@pdb2, password oracle
ASSUMETARGETDEFS
MAP pdb1.test.*, TARGET pdb2.test.*;
GGSCI (node1) 11> info ext1,detail
EXTRACT EXT1 Last Started 2017-04-02 23:32 Status RUNNING
Checkpoint Lag 00:00:02 (updated 00:00:01 ago)
Process ID 3211
Log Read Checkpoint Oracle Integrated Redo Logs
2017-04-02 23:34:04
SCN 0.1927287 (1927287)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
./dirdat/ex 1 1432 500 EXTTRAIL
Integrated Extract outbound server first scn: Unavailable.Need DBLOGIN.
Integrated Extract outbound server filtering start scn: Unavailable.Need DBLOGIN.
Extract Source Begin End
Not Available 2016-10-07 07:31 2017-04-02 23:34
Not Available 2016-10-07 07:31 2016-10-07 08:36
Not Available 2016-10-07 07:31 2016-10-07 08:36
Not Available * Initialized * 2016-10-07 07:31
Not Available * Initialized * 2016-10-07 07:31
Current directory /u01/ogg12c
Report file /u01/ogg12c/dirrpt/EXT1.rpt
Parameter file /u01/ogg12c/dirprm/ext1.prm
Checkpoint file /u01/ogg12c/dirchk/EXT1.cpe
Process file /u01/ogg12c/dirpcs/EXT1.pce
Error log /u01/ogg12c/ggserr.log
GGSCI (node1) 12> dblogin USERID c##ggadmin, PASSWORD oracle
Successfully logged into database CDB$ROOT.
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 13> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:10 00:00:03
REPLICAT RUNNING REP1 00:00:00 00:00:05
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 14> info ext1
EXTRACT EXT1 Last Started 2017-04-02 23:32 Status RUNNING
Checkpoint Lag 00:00:10 (updated 00:00:09 ago)
Process ID 3211
Log Read Checkpoint Oracle Integrated Redo Logs
2017-04-02 23:34:16
SCN 0.1927303 (1927303)
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 15> info ext1 detail
EXTRACT EXT1 Last Started 2017-04-02 23:32 Status RUNNING
Checkpoint Lag 00:00:09 (updated 00:00:08 ago)
Process ID 3211
Log Read Checkpoint Oracle Integrated Redo Logs
2017-04-02 23:34:27
SCN 0.1927311 (1927311)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
./dirdat/ex 1 1432 500 EXTTRAIL
Integrated Extract outbound server first scn: 0.1878469 (1878469)
Integrated Extract outbound server filtering start scn: 0.1879420 (1879420)
Extract Source Begin End
Not Available 2016-10-07 07:31 2017-04-02 23:34
Not Available 2016-10-07 07:31 2016-10-07 08:36
Not Available 2016-10-07 07:31 2016-10-07 08:36
Not Available * Initialized * 2016-10-07 07:31
Not Available * Initialized * 2016-10-07 07:31
Current directory /u01/ogg12c
Report file /u01/ogg12c/dirrpt/EXT1.rpt
Parameter file /u01/ogg12c/dirprm/ext1.prm
Checkpoint file /u01/ogg12c/dirchk/EXT1.cpe
Process file /u01/ogg12c/dirpcs/EXT1.pce
Error log /u01/ogg12c/ggserr.log
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 16> info ext1,showch
EXTRACT EXT1 Last Started 2017-04-02 23:32 Status RUNNING
Checkpoint Lag 00:00:09 (updated 00:00:07 ago)
Process ID 3211
Log Read Checkpoint Oracle Integrated Redo Logs
2017-04-02 23:34:47
SCN 0.1927333 (1927333)
Current Checkpoint Detail:
Read Checkpoint #1
Oracle Integrated Redo Log
Startup Checkpoint (starting position in the data source):
Timestamp: 2016-10-07 07:31:30.000000
SCN: Not available
Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
Timestamp: 2017-04-02 23:34:47.000000
SCN: 0.1927332 (1927332)
Current Checkpoint (position of last record read in the data source):
Timestamp: 2017-04-02 23:34:47.000000
SCN: 0.1927333 (1927333)
Write Checkpoint #1
GGS Log Trail
Current Checkpoint (current write position):
Sequence #: 1
RBA: 1432
Timestamp: 2017-04-02 23:34:56.199564
Extract Trail: ./dirdat/ex
Seqno Length: 9
Flip Seqno Length: No
Trail Type: EXTTRAIL
Header:
Version = 2
Record Source = A
Type = 13
# Input Checkpoints = 1
# Output Checkpoints = 1
File Information:
Block Size = 2048
Max Blocks = 100
Record Length = 2048
Current Offset = 0
Configuration:
Data Source = 3
Transaction Integrity = 1
Task Type = 0
Status:
Start Time = 2017-04-02 23:32:04
Last Update Time = 2017-04-02 23:34:56
Stop Status = A
Last Result = 520
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 17> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:09 00:00:05
REPLICAT RUNNING REP1 00:00:00 00:00:07
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 18> edit params ext1
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 19> view params ext1
EXTRACT ext1
USERID c##ggadmin, PASSWORD oracle
ddl include all
EXTTRAIL ./dirdat/ex
SOURCECATALOG pdb1
TABLE TEST.*;
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 20> stop ext1
Sending STOP request to EXTRACT EXT1 ...
Request processed.
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 21> start ext1
EXTRACT EXT1 is already running.
GGSCI (node1 as c##ggadmin@dev12c/CDB$ROOT) 22> exit
[oracle@node1 ogg12c]$ sqlplus test/oracle@pdb1
SQL*Plus: Release 12.1.0.2.0 Production on Sun Apr 2 23:37:22 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Fri Oct 07 2016 07:48:23 -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
--------------------------------------------------------------------------------
SOURCE
SQL> create table t1(id int primary key);
Table created.
SQL> begin
2 for i in 1..500
3 loop
4 insert into t1 values (i);
5 commit;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL> select count(*) from t1;
COUNT(*)
----------
500
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]$ 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 STOPPED EXT1 00:00:02 00:02:02
REPLICAT RUNNING REP1 00:00:00 00:00:07
GGSCI (node1) 2> start ext1
Sending START request to MANAGER ...
EXTRACT EXT1 starting
GGSCI (node1) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STARTING EXT1 00:00:02 00:02:09
REPLICAT RUNNING REP1 00:00:00 00:00:04
GGSCI (node1) 4> stats ext1
Sending STATS request to EXTRACT EXT1 ...
Start of Statistics at 2017-04-02 23:39:28.
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 ./dirdat/ex:
Extracting from PDB1.TEST.T1 to PDB1.TEST.T1:
*** Total statistics since 2017-04-02 23:39:01 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
*** Daily statistics since 2017-04-02 23:39:01 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
*** Hourly statistics since 2017-04-02 23:39:01 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
*** Latest statistics since 2017-04-02 23:39:01 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
End of Statistics.
GGSCI (node1) 5> stats rep1
Sending STATS request to REPLICAT REP1 ...
Start of Statistics at 2017-04-02 23:39:33.
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 PDB1.TEST.T1 to PDB2.TEST.T1:
*** Total statistics since 2017-04-02 23:39:05 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
*** Daily statistics since 2017-04-02 23:39:05 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
*** Hourly statistics since 2017-04-02 23:39:05 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
*** Latest statistics since 2017-04-02 23:39:05 ***
Total inserts 500.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 500.00
End of Statistics.
GGSCI (node1) 6> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:10 00:00:04
REPLICAT RUNNING REP1 00:00:00 00:00:08
GGSCI (node1) 7> view params rep1
REPLICAT rep1
USERID c##ggadmin@pdb2, password oracle
ASSUMETARGETDEFS
MAP pdb1.test.*, TARGET pdb2.test.*;
GGSCI (node1) 8> info rep1
REPLICAT REP1 Last Started 2017-04-02 23:32 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:06 ago)
Process ID 3220
Log Read Checkpoint File ./dirdat/ex000000002
2017-04-02 23:38:34.000000 RBA 63277
GGSCI (node1) 9> exit
[oracle@node1 ogg12c]$ sqlplus test/oracle@pdb2
SQL*Plus: Release 12.1.0.2.0 Production on Sun Apr 2 23:41:10 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Fri Oct 07 2016 07:49:43 -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> desc t1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
SQL> select count(*) from t1;
COUNT(*)
----------
500
SQL> ^A
|
|