系统环境
操作系统:AIX5.3-09
DB Soft: Oracle 10gR2
如下图所示:
系统环境实在AIX系统上构建单向OGG
下载OGG:
http://www.oracle.com/technetwork/cn/middleware/goldengate/downloads/index.html
一、安装OGG
1、解压安装ogg
在AIX211主机配置安装ogg:
[root@aix21ogg]#ls
ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
[root@aix211 ogg]#unzip ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
Archive: ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
inflating: ggs_AIX_ppc_ora10.2_64bit.tar
inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf
inflating: Oracle GoldenGate 11.2.1.0.1 README.doc
inflating: Oracle GoldenGate 11.2.1.0.1 README.txt
[root@aix211 ogg]#ls
OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf ggs_AIX_ppc_ora10.2_64bit.tar
Oracle GoldenGate 11.2.1.0.1 README.doc lost+found
Oracle GoldenGate 11.2.1.0.1 README.txt ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
x . x ./mgr, 4421047 bytes, 8635 tape blocks x ./ggsci, 5779790 bytes, 11289 tape blocks x ./ggcmd, 2871133 bytes, 5608 tape blocks x ./ggMessage.dat, 1257280 bytes, 2456 tape blocks x ./help.txt, 169753 bytes, 332 tape blocks x ./tcperrs, 759 bytes, 2 tape blocks x ./bcrypt.txt, 1725 bytes, 4 tape blocks x ./libxml2.txt, 1668 bytes, 4 tape blocks x ./zlib.txt, 1476 bytes, 3 tape blocks x ./freeBSD.txt, 1968 bytes, 4 tape blocks x ./notices.txt, 213535 bytes, 418 tape blocks x ./libxerces-c.a, 9209080 bytes, 17987 tape blocks x ./libicui18n38.a, 9302329 bytes, 18169 tape blocks x ./libicuuc38.a, 6302602 bytes, 12310 tape blocks x ./libicudata38.a, 15580952 bytes, 30432 tape blocks x ./libantlr3c.so, 260012 bytes, 508 tape blocks ......
2、创建ogg缺省目录
[root@aix211 ogg]#./ggsci
Could not load program ./ggsci:
Dependent module libclntsh.so could not be loaded.
Could not load module libclntsh.so.
System error: No such file or directory
出现以上错误!
[root@aix211 /]#chown -R oracle:dba /ogg
[root@aix211 ogg]#su - oracle
[oracle@aix211 ~]$cd /ogg
[oracle@aix211 ogg]$./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (aix211) 2> help
GGSCI Command Summary:
Object: Command:
SUBDIRS CREATE
ER INFO, KILL, LAG, SEND, STATUS, START, STATS, STOP
EXTRACT ADD, ALTER, CLEANUP, DELETE, INFO, KILL,
LAG, REGISTER, SEND, START, STATS, STATUS, STOP
UNREGISTER
EXTTRAIL ADD, ALTER, DELETE, INFO
GGSEVT VIEW
MANAGER INFO, SEND, START, STOP, STATUS
MARKER INFO
PARAMS EDIT, VIEW
REPLICAT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND,
START, STATS, STATUS, STOP
REPORT VIEW
RMTTRAIL ADD, ALTER, DELETE, INFO
TRACETABLE ADD, DELETE, INFO
TRANDATA ADD, DELETE, INFO
SCHEMATRANDATA ADD, DELETE, INFO
CHECKPOINTTABLE ADD, DELETE, CLEANUP, INFO
Commands without an object:
(Database) DBLOGIN, LIST TABLES, ENCRYPT PASSWORD, FLUSH SEQUENCE
MININGDBLOGIN
(DDL) DUMPDDL
(Miscellaneous) FC, HELP, HISTORY, INFO ALL, OBEY, SET EDITOR, SHELL,
SHOW, VERSIONS, ! (note: you must type the word
COMMAND after the ! to display the ! help topic.)
i.e.: GGSCI (sys1)> help ! command
For help on a specific command, type HELP <command> <object>.
Example: HELP ADD REPLICAT
GGSCI (aix211) 3> create subdirs
Creating subdirectories under current directory /ogg
Parameter files /ogg/dirprm: already exists
Report files /ogg/dirrpt: created
Checkpoint files /ogg/dirchk: created
Process status files /ogg/dirpcs: created
SQL script files /ogg/dirsql: created
Database definitions files /ogg/dirdef: created
Extract data files /ogg/dirdat: created
Temporary files /ogg/dirtmp: created
Stdout files /ogg/dirout: created
在AIX212安装配置ogg:
[root@aix212@ /]#chown oracle:dba /ogg
[root@aix212@ /]#su - oracle
[u@h@ W]$cd /ogg
[u@h@ W]$bash
[oracle@aix212@ ogg]$./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (aix212) 1> help
GGSCI Command Summary:
Object: Command:
SUBDIRS CREATE
ER INFO, KILL, LAG, SEND, STATUS, START, STATS, STOP
EXTRACT ADD, ALTER, CLEANUP, DELETE, INFO, KILL,
LAG, REGISTER, SEND, START, STATS, STATUS, STOP
UNREGISTER
EXTTRAIL ADD, ALTER, DELETE, INFO
GGSEVT VIEW
MANAGER INFO, SEND, START, STOP, STATUS
MARKER INFO
PARAMS EDIT, VIEW
REPLICAT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND,
START, STATS, STATUS, STOP
REPORT VIEW
RMTTRAIL ADD, ALTER, DELETE, INFO
TRACETABLE ADD, DELETE, INFO
TRANDATA ADD, DELETE, INFO
SCHEMATRANDATA ADD, DELETE, INFO
CHECKPOINTTABLE ADD, DELETE, CLEANUP, INFO
Commands without an object:
(Database) DBLOGIN, LIST TABLES, ENCRYPT PASSWORD, FLUSH SEQUENCE
MININGDBLOGIN
(DDL) DUMPDDL
(Miscellaneous) FC, HELP, HISTORY, INFO ALL, OBEY, SET EDITOR, SHELL,
SHOW, VERSIONS, ! (note: you must type the word
COMMAND after the ! to display the ! help topic.)
i.e.: GGSCI (sys1)> help ! command
For help on a specific command, type HELP <command> <object>.
Example: HELP ADD REPLICAT
GGSCI (aix212) 2>
二、数据库配置
源端(AIX212)
1、建立数据的归档模式
SQL> alter database archivelog;
Database altered.
SQL> alter database force logging;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/arch_orcl
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
2、创建ogg用户并授权
[oracle@aix212@ ~]$sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 23 14:46:43 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create tablespace oggtbs
2 datafile
3 '/u01/app/oracle/oradata/orcl/oggtbs1.dbf' size 100m;
Tablespace created.
SQL> create user ogg identified by ogg default tablespace oggtbs;
User created.
SQL> grant connect,resource to ogg;
Grant succeeded.
SQL> grant create session,alter session to ogg;
Grant succeeded.
SQL> grant select any dictionary,select any table to ogg;
Grant succeeded.
SQL> grant alter any table to ogg;
Grant succeeded.
SQL> grant flashback any table to ogg;
Grant succeeded.
SQL> grant execute on dbms_flashback to ogg;
Grant succeeded.
3、创建传输的对象(table)
SQL> conn scott/tiger
Connected.
SQL> create table emp_ogg as select * from emp;
Table created.
SQL> alter table emp_ogg add constraint pk_ogg primary key (empno);
Table altered.
目标端(AIX211)
1、创建ogg用户并授权
SQL> create tablespace oggtbs
2 datafile
3 '/u01/app/oracle/oradata/prod/oggtbs1.dbf' size 100m;
Tablespace created.
SQL> create user ogg identified by ogg default tablespace oggtbs;
User created.
SQL> grant dba to ogg;
Grant succeeded.
创建测试对象
SQL> conn scott/tiger
Connected.
SQL> create table emp_ogg as select * from emp where 1=2;
Table created.
源端配置(AIX212)
1、配置mgr
[oracle@ogg aix212]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
添加用于capture data change的table
GGSCI (aix212) 4> add trandata scott.emp_ogg
Logging of supplemental redo data enabled for table SCOTT.EMP_OGG.
GGSCI (aix212) 8> delete trandata scott.emp_ogg
Logging of supplemental redo log data disabled for table SCOTT.EMP_OGG.
GGSCI (aix212) 9> add trandata scott.emp_ogg
Logging of supplemental redo data enabled for table SCOTT.EMP_OGG.
查看在table上是否启用了supplemental log
GGSCI (aix212) 11> info trandata scott.emp_ogg
Logging of supplemental redo log data is enabled for table SCOTT.EMP_OGG.
Columns supplementally logged for table SCOTT.EMP_OGG: EMPNO.
GGSCI (aix212) 13> edit params mgr
port 7809
dynamicportlist 7800-8000
autorestart extract *,waitminutes 2,resetminutes 5
编辑mgr参数文件,并写入以上信息!
GGSCI (ogg) 14> start mgr
Manager started.
GGSCI (ogg) 16> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
配置Extract并初始化:
添加extract服务,并启动extract服务:
GGSCI (aix212) 11> add extract eini_1,sourceistable
EXTRACT added.
校验Extract process
GGSCI (aix212) 14> info extract *,tasks
EXTRACT EINI_1 Initialized 2014-09-10 14:28 Status STOPPED
Checkpoint Lag Not Available
Log Read Checkpoint Not Available
First Record Record 0
Task SOURCEISTABLE
编辑extract参数文件
GGSCI (aix212) 18>EDIT PARAMS EINI_1
EXTRACT EINI_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg, PASSWORD ogg
RMTHOST 192.168.8.249,MGRPORT 7809
RMTTASK REPLICAT, GROUP RINI_1
TABLE scott.EMP_OGG;
GGSCI (aix212) 15> start eini_1
Sending START request to MANAGER ...
EXTRACT EINI_1 starting
GGSCI (ogg) 16> info eini_1
EXTRACT EINI_1 Initialized 2014-09-10 14:28 Status RUNNING
Checkpoint Lag Not Available
Log Read Checkpoint Not Available
First Record Record 0
Task SOURCEISTABLE
GGSCI (aix212) 1> view report eini_1
2014-09-23 16:27:42 INFO OGG-01017 Wildcard resolution set to IMMEDIATE because SOURCEISTABLE is used.
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:57:02
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2014-09-23 16:27:42
***********************************************************************
Operating System Version:
AIX
Version 5, Release 3
Node: aix212
Machine: 0009746A4C00
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 569430
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2014-09-23 16:27:42 INFO OGG-03035 Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:.
EXTRACT EINI_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg,PASSWORD ***
RMTHOST 192.168.8.211,MGRPORT 7809
RMTTASK REPLICAT, GROUP RINI_1
TABLE scott.EMP_OGG;
Using the following key columns for source table SCOTT.EMP_OGG: EMPNO.
2014-09-23 16:27:42 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:
/ogg/dirtmp.
CACHEMGR virtual memory values (may have been adjusted)
CACHESIZE: 64G
CACHEPAGEOUTSIZE (normal): 8M
PROCESS VM AVAIL FROM OS (min): 128G
CACHESIZEMAX (strict force to disk): 96G
Database Version:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Productio
NLSRTL Version 10.2.0.1.0 - Production
Database Language and Character Set:
NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK"
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "ZHS16GBK"
Processing table SCOTT.EMP_OGG
***********************************************************************
* ** Run Time Statistics ** *
***********************************************************************
Report at 2014-09-23 16:27:48 (activity since 2014-09-23 16:27:42)
Output to RINI_1:
From Table SCOTT.EMP_OGG:
# inserts: 14
# updates: 0
# deletes: 0
# discards: 0
REDO Log Statistics
Bytes parsed 0
Bytes output 2616
配置pump进程
GGSCI (aix212) 21> add extract eora_1,tranlog,begin now
EXTRACT added.
GGSCI (aix212) 22> add exttrail ./dirdat/aa,extract eora_1,megabytes 5
EXTTRAIL added.
GGSCI (aix212) 23> edit params eora_1
EXTRACT EORA_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg,PASSWORD ogg
EXTTRAIL ./dirdat/aa
TABLE scott.emp_ogg;
GGSCI (aix212) 24> start extract eora_1
Sending START request to MANAGER ...
EXTRACT EORA_1 starting
GGSCI (aix212) 25> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EORA_1 00:04:51 00:00:00
GGSCI (aix212) 26> edit params pora_1
EXTRACT PORA_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
PASSTHRU
RMTHOST 192.168.8.211,MGRPORT 7809
RMTTRAIL ./dirdat/pa
TABLE scott.emp_ogg;
GGSCI (aix212) 27> add extract pora_1,exttrailsource ./dirdat/pa
EXTRACT added.
GGSCI (aix212) 28> add rmttrail ./dirdat/pa,extract pora_1,megabytes 5
RMTTRAIL added.
GGSCI (aix212) 29> start extract pora_1
Sending START request to MANAGER ...
EXTRACT PORA_1 starting
GGSCI (aix212) 31> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EORA_1 00:00:00 00:00:06
EXTRACT RUNNING PORA_1 00:00:00 00:00:00
目标端(AIX211)
配置MGR
GGSCI (aix211) 4> edit params mgr
port 7809
dynamicportlist 7800-8000
autorestart extract *,waitminutes 2,resetminutes 5
~
GGSCI (aix211) 5> start mgr
Manager started.
GGSCI (aix211) 6> info mgr
Manager is running (IP port aix211.7809).
配置Replicate服务
[oracle@rh7 ogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x86, 32bit (optimized), Oracle 11g on Apr 23 2012 08:09:25
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (aix211) 1> add replicat rini_1,specialrun
REPLICAT added.
GGSCI (aix211) 2> info replicat *,tasks
REPLICAT RINI_1 Initialized 2014-09-10 14:33 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:13 ago)
Log Read Checkpoint Not Available
Task SPECIALRUN
GGSCI (aix211) 3> edit params rini_1
REPLICAT RINI_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
ASSUMETARGETDEFS
USERID ogg,PASSWOR ogg
DISCARDFILE ./dirrpt/RINIaa.dsc,PURGE
MAP scott.emp_ogg,TARGET scott.emp_ogg;
注意:在源端启动eini_1 process,目标端rini_1 process将会被自动启动
添加replicate checkpoint table
GGSCI (aix211) 1> edit params ./GLOBALS
CHECKPOINTTABLE ogg.oggchkpt
~
GGSCI (aix211) 2> exit
必须退出ggsci,checkpoint table 才会生效
[oracle@rh7 ogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x86, 32bit (optimized), Oracle 11g on Apr 23 2012 08:09:25
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (aix211) 1> dblogin userid ogg,password ogg
Successfully logged into database.
GGSCI (aix211) 2> add checkpointtable
No checkpoint table specified, using GLOBALS specification (ogg.oggchkpt)...
Successfully created checkpoint table ogg.oggchkpt.
添加replicate group
GGSCI (aix211) 4> add replicat rora_1,exttrail ./dirdat/pa
REPLICAT added.
编辑replicate parameterfile
GGSCI (aix211) 5> edit param rora_1
REPLICAT RORA_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg,PASSWORD ogg
HANDLECOLLISIONS
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/RORA_aa.DSC,PURGE
MAP scott.oem_ogg,TARGET scott.emp_ogg;
启动replicate process
GGSCI (aix211) 7> start replicat rora_1
Sending START request to MANAGER ...
REPLICAT RORA_1 starting
GGSCI (aix211) 10> info replicat rora_1
REPLICAT RORA_1 Last Started 2014-09-10 15:53 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:05 ago)
Log Read Checkpoint File ./dirdat/pa000000
First Record RBA 0
GGSCI (aix211) 9> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING RORA_1 00:00:00 00:00:00
GGSCI (aix211) 2> view report rini_1
***********************************************************************
Oracle GoldenGate Delivery for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 08:13:30
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2014-09-23 16:27:43
***********************************************************************
Operating System Version:
AIX
Version 5, Release 3
Node: aix211
Machine: 00040F8A4C00
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 475264
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2014-09-23 16:27:48 INFO OGG-03035 Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:.
REPLICAT RINI_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
ASSUMETARGETDEFS
USERID ogg,PASSWORD ***
DISCARDFILE ./dirrpt/RINIaa.dsc,PURGE
MAP scott.emp_ogg, TARGET scott.emp_ogg;
2014-09-23 16:27:48 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:
/ogg/dirtmp.
CACHEMGR virtual memory values (may have been adjusted)
CACHESIZE: 2G
CACHEPAGEOUTSIZE (normal): 8M
PROCESS VM AVAIL FROM OS (min): 4G
CACHESIZEMAX (strict force to disk): 3.41G
Database Version:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Productio
NLSRTL Version 10.2.0.1.0 - Production
Database Language and Character Set:
NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK"
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "ZHS16GBK"
***********************************************************************
** Run Time Messages **
***********************************************************************
MAP resolved (entry scott.emp_ogg):
MAP "SCOTT"."EMP_OGG", TARGET scott.emp_ogg;
2014-09-23 16:27:48 WARNING OGG-00869 No unique key is defined for table 'EMP_OGG'. All viable columns will be used to represent the key, but ma
y not guarantee uniqueness. KEYCOLS may be used to define the key.
Using following columns in default map by name:
EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO
Using the following key columns for target table SCOTT.EMP_OGG: EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO.
***********************************************************************
* ** Run Time Statistics ** *
***********************************************************************
Report at 2014-09-23 16:27:53 (activity since 2014-09-23 16:27:48)
From Table SCOTT.EMP_OGG to SCOTT.EMP_OGG:
# inserts: 14
# updates: 0
# deletes: 0
# discards: 0
CACHE OBJECT MANAGER statistics
CACHE MANAGER VM USAGE
vm current = 0 vm anon queues = 0
vm anon in use = 0 vm file = 0
vm used max = 0 ==> CACHE BALANCED
CACHE CONFIGURATION
cache size = 2G cache force paging = 3.41G
buffer min = 64K buffer highwater = 8M
pageout eligible size = 8M
================================================================================
RUNTIME STATS FOR SUPERPOOL
CACHE Transaction Stats
trans active = 0 max concurrent = 0
non-zero total = 0 trans total = 0
CACHE File Caching
disk current = 0 disk total = 0
disk caching = 0 file cached = 0
file retrieves = 0
CACHE MANAGEMENT
buffer links = 0 anon gets = 0
forced unmaps = 0 cnnbl try = 0
cached out = 0 force out = 0
Allocation Request Distribution
< 128B: 0
128B: 0 0 | 512B: 0 0
2K: 0 0 | 8K: 0 0
32K: 0 0 | 128K: 0 0
512K: 0 0 | 2M: 0 0
8M: 0 0 | 32M: 0 0
128M: 0 0 | 512M: 0 0
2G: 0 0 | 8G: 0
Cached Transaction Size Distribution
0: 0
< 4K: 0
4K: 0 0 | 16K: 0 0
64K: 0 0 | 256K: 0 0
1M: 0 0 | 4M: 0 0
16M: 0 0 | 64M: 0 0
256M: 0 0 | 1G: 0 0
4G: 0 0 | 16G: 0 0
64G: 0 0 | 256G: 0 0
1T: 0 0 | 4T: 0 0
16T: 0 0 | 64T: 0 0
256T: 0 0 |1024T: 0 0
================================================================================
CUMULATIVE STATS FOR SUPERPOOL
CACHE Transaction Stats
trans active = 0 max concurrent = 0
non-zero total = 0 trans total = 0
CACHE File Caching
disk current = 0 disk total = 0
disk caching = 0 file cached = 0
file retrieves = 0
CACHE MANAGEMENT
buffer links = 0 anon gets = 0
forced unmaps = 0 cnnbl try = 0
cached out = 0 force out = 0
Allocation Request Distribution
< 128B: 0
128B: 0 0 | 512B: 0 0
2K: 0 0 | 8K: 0 0
32K: 0 0 | 128K: 0 0
512K: 0 0 | 2M: 0 0
8M: 0 0 | 32M: 0 0
128M: 0 0 | 512M: 0 0
2G: 0 0 | 8G: 0
Cached Transaction Size Distribution
0: 0
< 4K: 0
4K: 0 0 | 16K: 0 0
64K: 0 0 | 256K: 0 0
1M: 0 0 | 4M: 0 0
16M: 0 0 | 64M: 0 0
256M: 0 0 | 1G: 0 0
4G: 0 0 | 16G: 0 0
64G: 0 0 | 256G: 0 0
1T: 0 0 | 4T: 0 0
16T: 0 0 | 64T: 0 0
256T: 0 0 |1024T: 0 0
QUEUE Statistics:
num queues = 15 default index = 0
cur len = 0 max len = 0
q vm current = 0 vm max = 0
q hits = 0 q misses = 0
queue size q hits curlen maxlen cannibalized
0 64K 0 0 0 0
1 128K 0 0 0 0
2 256K 0 0 0 0
3 512K 0 0 0 0
4 1M 0 0 0 0
5 2M 0 0 0 0
6 4M 0 0 0 0
7 8M 0 0 0 0
8 16M 0 0 0 0
9 32M 0 0 0 0
10 64M 0 0 0 0
11 128M 0 0 0 0
12 256M 0 0 0 0
13 512M 0 0 0 0
14 1G 0 0 0 0
================================================================================
RUNTIME STATS FOR CACHE POOL #0
POOL INFO group: rini_1 id: p475264_BLOB
trans active = 0 trans concurrent (max) = 0
trans total = 0 (0 )
flag = 0x00000030
last error = (0=<none>)
Allocation Request Distribution
< 128B: 0
128B: 0 0 | 512B: 0 0
2K: 0 0 | 8K: 0 0
32K: 0 0 | 128K: 0 0
512K: 0 0 | 2M: 0 0
8M: 0 0 | 32M: 0 0
128M: 0 0 | 512M: 0 0
2G: 0 0 | 8G: 0
================================================================================
CUMULATIVE STATS FOR CACHE POOL #0
POOL INFO group: rini_1 id: p475264_BLOB
trans active = 0 trans concurrent (max) = 0
trans total = 0 (0 )
flag = 0x00000030
last error = (0=<none>)
Allocation Request Distribution
< 128B: 0
128B: 0 0 | 512B: 0 0
2K: 0 0 | 8K: 0 0
32K: 0 0 | 128K: 0 0
512K: 0 0 | 2M: 0 0
8M: 0 0 | 32M: 0 0
128M: 0 0 | 512M: 0 0
2G: 0 0 | 8G: 0
QUEUE Statistics:
num queues = 15 default index = 0
cur len = 0 max len = 0
q vm current = 0 vm max = 0
q hits = 0 q misses = 0
queue size q hits curlen maxlen cannibalized
0 64K 0 0 0 0
1 128K 0 0 0 0
2 256K 0 0 0 0
3 512K 0 0 0 0
4 1M 0 0 0 0
5 2M 0 0 0 0
6 4M 0 0 0 0
7 8M 0 0 0 0
8 16M 0 0 0 0
9 32M 0 0 0 0
10 64M 0 0 0 0
11 128M 0 0 0 0
12 256M 0 0 0 0
13 512M 0 0 0 0
14 1G 0 0 0 0
================================================================================
RUNTIME STATS FOR CACHE POOL #0
POOL INFO group: rini_1 id: p475264_BLOB
trans active = 0 trans concurrent (max) = 0
trans total = 0 (0 )
flag = 0x00000030
last error = (0=<none>)
Allocation Request Distribution
< 128B: 0
128B: 0 0 | 512B: 0 0
2K: 0 0 | 8K: 0 0
32K: 0 0 | 128K: 0 0
512K: 0 0 | 2M: 0 0
8M: 0 0 | 32M: 0 0
128M: 0 0 | 512M: 0 0
2G: 0 0 | 8G: 0
================================================================================
CUMULATIVE STATS FOR CACHE POOL #0
POOL INFO group: rini_1 id: p475264_BLOB
trans active = 0 trans concurrent (max) = 0
trans total = 0 (0 )
flag = 0x00000030
last error = (0=<none>)
Allocation Request Distribution
< 128B: 0
128B: 0 0 | 512B: 0 0
2K: 0 0 | 8K: 0 0
32K: 0 0 | 128K: 0 0
512K: 0 0 | 2M: 0 0
8M: 0 0 | 32M: 0 0
128M: 0 0 | 512M: 0 0
2G: 0 0 | 8G: 0
GGSCI (aix211) 3>
查看ogg日志:
源端(aix212)
[oracle@aix212@ ~]$tail -f /ogg/ggserr.log
2014-09-23 15:25:24 INFO OGG-03035 Oracle GoldenGate Capture for Oracle, pora_1.prm: Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:.
2014-09-23 15:25:24 INFO OGG-01815 Oracle GoldenGate Capture for Oracle, pora_1.prm: Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/ogg/dirtmp.
2014-09-23 15:25:24 INFO OGG-00993 Oracle GoldenGate Capture for Oracle, pora_1.prm: EXTRACT PORA_1 started.
2014-09-23 15:25:30 INFO OGG-01226 Oracle GoldenGate Capture for Oracle, pora_1.prm: Socket buffer size set to 27985 (flush size 27985).
2014-09-23 15:25:30 INFO OGG-01052 Oracle GoldenGate Capture for Oracle, pora_1.prm: No recovery is required for target file ./dirdat/pa000000, at RBA 0 (file not opened).
2014-09-23 15:25:30 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, pora_1.prm: Output file ./dirdat/pa is using format RELEASE 11.2.
2014-09-23 15:47:44 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): start eini-1.
2014-09-23 15:47:51 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): start eini_1.
2014-09-23 15:47:51 INFO OGG-00963 Oracle GoldenGate Manager for Oracle, mgr.prm: Command received from GGSCI on host aix212 (START EXTRACT EINI_1 ).
2014-09-23 15:47:51 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: EXTRACT EINI_1 starting.
2014-09-23 15:47:51 INFO OGG-01017 Oracle GoldenGate Capture for Oracle, eini_1.prm: Wildcard resolution set to IMMEDIATE because SOURCEISTABLE is used.
2014-09-23 15:47:51 INFO OGG-00992 Oracle GoldenGate Capture for Oracle, eini_1.prm: EXTRACT EINI_1 starting.
2014-09-23 15:47:51 INFO OGG-03035 Oracle GoldenGate Capture for Oracle, eini_1.prm: Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:.
2014-09-23 15:47:51 INFO OGG-01815 Oracle GoldenGate Capture for Oracle, eini_1.prm: Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/ogg/dirtmp.
2014-09-23 15:47:51 INFO OGG-00993 Oracle GoldenGate Capture for Oracle, eini_1.prm: EXTRACT EINI_1 started.
目标端(aix211)
[oracle@aix211 ogg]$tail -f ggserr.log
2014-09-23 15:26:58 INFO OGG-00963 Oracle GoldenGate Manager for Oracle, mgr.prm: Command received from GGSCI on host aix211 (START REPLICAT RORA_1 ).
2014-09-23 15:26:58 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: REPLICAT RORA_1 starting.
2014-09-23 15:26:59 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rora_1.prm: REPLICAT RORA_1 starting.
2014-09-23 15:26:59 INFO OGG-03035 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:.
2014-09-23 15:27:00 INFO OGG-01815 Oracle GoldenGate Delivery for Oracle, rora_1.prm: Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/ogg/dirtmp.
2014-09-23 15:27:01 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rora_1.prm: REPLICAT RORA_1 started.
source:
16:27:33 SCOTT@ orcl>select * from emp_ogg;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
16:27:41 SCOTT@ orcl >update emp_ogg set deptno=40 where empno=7788;
1 row updated.
16:28:06 SCOTT@ orcl >commit;
Commit complete.
target:
16:26:31 SCOTT@ prod >truncate table emp_ogg;
Table truncated.
16:26:44 SCOTT@ prod >select * from emp_ogg;
no rows selected
16:28:23 SCOTT@ prod >/
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 40
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
@至此,目标端同源端的数据同步成功,OGG的单向传输基本配置完成!
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。