Oracle GoldenGate学习之--AIX系统安装配置
Oracle GoldenGate学习之--AIX 系统安装配置
系统环境
操作系统: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.tarOracle GoldenGate 11.2.1.0.1 README.doc lost+foundOracle GoldenGate 11.2.1.0.1 README.txt ogg112101_ggs_AIX_ppc_ora10.2_64bit.zip
[root@aix211 ogg]#tar xvf ggs_AIX_ppc_ora10.2_64bit.tar
x .x ./mgr, 4421047 bytes, 8635 tape blocksx ./ggsci, 5779790 bytes, 11289 tape blocksx ./ggcmd, 2871133 bytes, 5608 tape blocksx ./ggMessage.dat, 1257280 bytes, 2456 tape blocksx ./help.txt, 169753 bytes, 332 tape blocksx ./tcperrs, 759 bytes, 2 tape blocksx ./bcrypt.txt, 1725 bytes, 4 tape blocksx ./libxml2.txt, 1668 bytes, 4 tape blocksx ./zlib.txt, 1476 bytes, 3 tape blocksx ./freeBSD.txt, 1968 bytes, 4 tape blocksx ./notices.txt, 213535 bytes, 418 tape blocksx ./libxerces-c.a, 9209080 bytes, 17987 tape blocksx ./libicui18n38.a, 9302329 bytes, 18169 tape blocksx ./libicuuc38.a, 6302602 bytes, 12310 tape blocksx ./libicudata38.a, 15580952 bytes, 30432 tape blocksx ./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 OracleVersion 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.GGSCI (aix211) 2> helpGGSCI 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
在AIX212安装配置ogg:
[root@aix212@ /]#chown oracle:dba /ogg[root@aix212@ /]#su - oracle[u@h@ W]$cd /ogg[u@h@ W]$bash[oracle@aix212@ ogg]$./ggsciOracle GoldenGate Command Interpreter for OracleVersion 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.GGSCI (aix212) 1> helpGGSCI 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
二、数据库配置
源端(AIX212)
1、建立数据的归档模式SQL> alter database archivelog;Database altered.SQL> alter database force logging;Database altered.SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination /u01/arch_orclOldest online log sequence 2Next log sequence to archive 4Current log sequence 42、创建ogg用户并授权[oracle@aix212@ ~]$sqlplus '/as sysdba'SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 23 14:46:43 2014Copyright (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/tigerConnected.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/tigerConnected.SQL> create table emp_ogg as select * from emp where 1=2;Table created.
三、配置OGG
源端配置(AIX212)
1、配置mgr
[oracle@ogg aix212]$ ./ggsciOracle GoldenGate Command Interpreter for OracleVersion 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. 添加用于capture data change的tableGGSCI (aix212) 4> add trandata scott.emp_oggLogging of supplemental redo data enabled for table SCOTT.EMP_OGG. GGSCI (aix212) 8> delete trandata scott.emp_oggLogging of supplemental redo log data disabled for table SCOTT.EMP_OGG. GGSCI (aix212) 9> add trandata scott.emp_oggLogging of supplemental redo data enabled for table SCOTT.EMP_OGG. 查看在table上是否启用了supplemental logGGSCI (aix212) 11> info trandata scott.emp_oggLogging 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 mgrport 7809dynamicportlist 7800-8000autorestart extract *,waitminutes 2,resetminutes 5编辑mgr参数文件,并写入以上信息! GGSCI (ogg) 14> start mgrManager started. GGSCI (ogg) 16> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNING
配置Extract并初始化:
添加extract服务,并启动extract服务:GGSCI (aix212) 11> add extract eini_1,sourceistableEXTRACT added. 校验Extract processGGSCI (aix212) 14> info extract *,tasksEXTRACT EINI_1 Initialized 2014-09-10 14:28 Status STOPPEDCheckpoint Lag Not AvailableLog Read Checkpoint Not Available First Record Record 0Task SOURCEISTABLE 编辑extract参数文件GGSCI (aix212) 18>EDIT PARAMS EINI_1EXTRACT EINI_1SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)USERID ogg, PASSWORD oggRMTHOST 192.168.8.249,MGRPORT 7809RMTTASK REPLICAT, GROUP RINI_1TABLE scott.EMP_OGG; GGSCI (aix212) 15> start eini_1Sending START request to MANAGER ...EXTRACT EINI_1 startingGGSCI (ogg) 16> info eini_1EXTRACT EINI_1 Initialized 2014-09-10 14:28 Status RUNNINGCheckpoint Lag Not AvailableLog Read Checkpoint Not Available First Record Record 0Task SOURCEISTABLEGGSCI (aix212) 1> view report eini_12014-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:02Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. Starting at 2014-09-23 16:27:42***********************************************************************Operating System Version:AIXVersion 5, Release 3Node: aix212Machine: 0009746A4C00 soft limit hard limitAddress Space Size : unlimited unlimitedHeap Size : unlimited unlimitedFile Size : unlimited unlimitedCPU Time : unlimited unlimitedProcess id: 569430Description:************************************************************************* 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_1SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)USERID ogg,PASSWORD ***RMTHOST 192.168.8.211,MGRPORT 7809RMTTASK REPLICAT, GROUP RINI_1TABLE 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: 64GCACHEPAGEOUTSIZE (normal): 8MPROCESS VM AVAIL FROM OS (min): 128GCACHESIZEMAX (strict force to disk): 96GDatabase Version:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64biPL/SQL Release 10.2.0.1.0 - ProductionCORE 10.2.0.1.0 ProductionTNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - ProductioNLSRTL Version 10.2.0.1.0 - ProductionDatabase 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: 0REDO Log Statistics Bytes parsed 0 Bytes output 2616
配置pump进程GGSCI (aix212) 21> add extract eora_1,tranlog,begin nowEXTRACT added.GGSCI (aix212) 22> add exttrail ./dirdat/aa,extract eora_1,megabytes 5EXTTRAIL added.GGSCI (aix212) 23> edit params eora_1EXTRACT EORA_1SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)USERID ogg,PASSWORD ogg EXTTRAIL ./dirdat/aaTABLE scott.emp_ogg;GGSCI (aix212) 24> start extract eora_1Sending START request to MANAGER ...EXTRACT EORA_1 startingGGSCI (aix212) 25> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNING EXTRACT RUNNING EORA_1 00:04:51 00:00:00 GGSCI (aix212) 26> edit params pora_1EXTRACT PORA_1SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)PASSTHRURMTHOST 192.168.8.211,MGRPORT 7809RMTTRAIL ./dirdat/paTABLE scott.emp_ogg;GGSCI (aix212) 27> add extract pora_1,exttrailsource ./dirdat/paEXTRACT added.GGSCI (aix212) 28> add rmttrail ./dirdat/pa,extract pora_1,megabytes 5RMTTRAIL added.GGSCI (aix212) 29> start extract pora_1Sending START request to MANAGER ...EXTRACT PORA_1 startingGGSCI (aix212) 31> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNING EXTRACT RUNNING EORA_1 00:00:00 00:00:06 EXTRACT RUNNING PORA_1 00:00:00 00:00:00
目标端(AIX211)
配置MGRGGSCI (aix211) 4> edit params mgrport 7809dynamicportlist 7800-8000autorestart extract *,waitminutes 2,resetminutes 5~GGSCI (aix211) 5> start mgrManager started.GGSCI (aix211) 6> info mgrManager is running (IP port aix211.7809). 配置Replicate服务[oracle@rh7 ogg]$ ./ggsciOracle GoldenGate Command Interpreter for OracleVersion 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBOLinux, x86, 32bit (optimized), Oracle 11g on Apr 23 2012 08:09:25Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. GGSCI (aix211) 1> add replicat rini_1,specialrunREPLICAT added. GGSCI (aix211) 2> info replicat *,tasksREPLICAT RINI_1 Initialized 2014-09-10 14:33 Status STOPPEDCheckpoint Lag 00:00:00 (updated 00:00:13 ago)Log Read Checkpoint Not AvailableTask SPECIALRUN GGSCI (aix211) 3> edit params rini_1REPLICAT RINI_1SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)ASSUMETARGETDEFSUSERID ogg,PASSWOR oggDISCARDFILE ./dirrpt/RINIaa.dsc,PURGEMAP scott.emp_ogg,TARGET scott.emp_ogg;注意:在源端启动eini_1 process,目标端rini_1 process将会被自动启动 添加replicate checkpoint tableGGSCI (aix211) 1> edit params ./GLOBALSCHECKPOINTTABLE ogg.oggchkpt~GGSCI (aix211) 2> exit必须退出ggsci,checkpoint table 才会生效[oracle@rh7 ogg]$ ./ggsciOracle GoldenGate Command Interpreter for OracleVersion 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBOLinux, x86, 32bit (optimized), Oracle 11g on Apr 23 2012 08:09:25Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.GGSCI (aix211) 1> dblogin userid ogg,password oggSuccessfully logged into database. GGSCI (aix211) 2> add checkpointtableNo checkpoint table specified, using GLOBALS specification (ogg.oggchkpt)...Successfully created checkpoint table ogg.oggchkpt. 添加replicate groupGGSCI (aix211) 4> add replicat rora_1,exttrail ./dirdat/paREPLICAT added. 编辑replicate parameterfileGGSCI (aix211) 5> edit param rora_1REPLICAT RORA_1SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)USERID ogg,PASSWORD oggHANDLECOLLISIONSASSUMETARGETDEFSDISCARDFILE ./dirrpt/RORA_aa.DSC,PURGEMAP scott.oem_ogg,TARGET scott.emp_ogg; 启动replicate processGGSCI (aix211) 7> start replicat rora_1Sending START request to MANAGER ...REPLICAT RORA_1 starting GGSCI (aix211) 10> info replicat rora_1REPLICAT RORA_1 Last Started 2014-09-10 15:53 Status RUNNINGCheckpoint Lag 00:00:00 (updated 00:00:05 ago)Log Read Checkpoint File ./dirdat/pa000000 First Record RBA 0 GGSCI (aix211) 9> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNINGREPLICAT RUNNING RORA_1 00:00:00 00:00:00GGSCI (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:30Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. Starting at 2014-09-23 16:27:43***********************************************************************Operating System Version:AIXVersion 5, Release 3Node: aix211Machine: 00040F8A4C00 soft limit hard limitAddress Space Size : unlimited unlimitedHeap Size : unlimited unlimitedFile Size : unlimited unlimitedCPU Time : unlimited unlimitedProcess id: 475264Description:************************************************************************* 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_1SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)ASSUMETARGETDEFSUSERID ogg,PASSWORD ***DISCARDFILE ./dirrpt/RINIaa.dsc,PURGEMAP 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: 2GCACHEPAGEOUTSIZE (normal): 8MPROCESS VM AVAIL FROM OS (min): 4GCACHESIZEMAX (strict force to disk): 3.41GDatabase Version:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64biPL/SQL Release 10.2.0.1.0 - ProductionCORE 10.2.0.1.0 ProductionTNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - ProductioNLSRTL Version 10.2.0.1.0 - ProductionDatabase 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 may 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, DEPTNOUsing 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: 0CACHE OBJECT MANAGER statisticsCACHE MANAGER VM USAGEvm current = 0 vm anon queues = 0vm anon in use = 0 vm file = 0vm used max = 0 ==> CACHE BALANCEDCACHE CONFIGURATIONcache size = 2G cache force paging = 3.41Gbuffer min = 64K buffer highwater = 8Mpageout eligible size = 8M================================================================================RUNTIME STATS FOR SUPERPOOLCACHE Transaction Statstrans active = 0 max concurrent = 0non-zero total = 0 trans total = 0CACHE File Cachingdisk current = 0 disk total = 0disk caching = 0 file cached = 0file retrieves = 0CACHE MANAGEMENTbuffer links = 0 anon gets = 0forced unmaps = 0 cnnbl try = 0cached out = 0 force out = 0Allocation 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: 0Cached 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 SUPERPOOLCACHE Transaction Statstrans active = 0 max concurrent = 0non-zero total = 0 trans total = 0CACHE File Cachingdisk current = 0 disk total = 0disk caching = 0 file cached = 0file retrieves = 0CACHE MANAGEMENTbuffer links = 0 anon gets = 0forced unmaps = 0 cnnbl try = 0cached out = 0 force out = 0Allocation 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: 0Cached 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 0QUEUE Statistics:num queues = 15 default index = 0cur len = 0 max len = 0q vm current = 0 vm max = 0q hits = 0 q misses = 0queue 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 #0POOL INFO group: rini_1 id: p475264_BLOBtrans active = 0 trans concurrent (max) = 0trans total = 0 (0 )flag = 0x00000030last error = (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================================================================================CUMULATIVE STATS FOR CACHE POOL #0POOL INFO group: rini_1 id: p475264_BLOBtrans active = 0 trans concurrent (max) = 0trans total = 0 (0 )flag = 0x00000030last error = (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: 0QUEUE Statistics:num queues = 15 default index = 0cur len = 0 max len = 0q vm current = 0 vm max = 0q hits = 0 q misses = 0queue 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 #0POOL INFO group: rini_1 id: p475264_BLOBtrans active = 0 trans concurrent (max) = 0trans total = 0 (0 )flag = 0x00000030last error = (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================================================================================CUMULATIVE STATS FOR CACHE POOL #0POOL INFO group: rini_1 id: p475264_BLOBtrans active = 0 trans concurrent (max) = 0trans total = 0 (0 )flag = 0x00000030last error = (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: 0GGSCI (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 1014 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 1014 rows selected.
@至此,目标端同源端的数据同步成功,OGG的单向传输基本配置完成!