ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle GoldenGate 简单实验

Oracle GoldenGate 简单实验

原创 Linux操作系统 作者:残日 时间:2011-08-25 20:12:42 0 删除 编辑

1windows下安装GG

H:\OracleGoldenGate\gg_windows\ggsci.exe

2linux下安装GG

[oracle@myCentOS ~]$ cd /mnt/winshare/OracleGoldenGate/gg_linux

[oracle@myCentOS gg_linux]$ sh ./ggsci

./ggsci: ./ggsci: cannot execute binary file

[oracle@myCentOS gg_linux]$ ./ggsci

 

Oracle GoldenGate Command Interpreter for Oracle

Version 11.1.1.0.0 Build 078

Linux, x86, 32bit (optimized), Oracle 10 on Jul 28 2010 13:24:18

 

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

 

GGSCI (myCentOS) 1> create subdirs

 

Creating subdirectories under current directory /mnt/winshare/OracleGoldenGate/gg_linux

 

Parameter files                /mnt/winshare/OracleGoldenGate/gg_linux/dirprm: created

Report files                   /mnt/winshare/OracleGoldenGate/gg_linux/dirrpt: created

Checkpoint files               /mnt/winshare/OracleGoldenGate/gg_linux/dirchk: created

Process status files           /mnt/winshare/OracleGoldenGate/gg_linux/dirpcs: created

SQL script. files               /mnt/winshare/OracleGoldenGate/gg_linux/dirsql: created

Database definitions files     /mnt/winshare/OracleGoldenGate/gg_linux/dirdef: created

Extract data files             /mnt/winshare/OracleGoldenGate/gg_linux/dirdat: created

Temporary files                /mnt/winshare/OracleGoldenGate/gg_linux/dirtmp: created

Veridata files                 /mnt/winshare/OracleGoldenGate/gg_linux/dirver: created

Veridata Lock files            /mnt/winshare/OracleGoldenGate/gg_linux/dirver/lock: created

Veridata Out-Of-Sync files     /mnt/winshare/OracleGoldenGate/gg_linux/dirver/oos: created

Veridata Out-Of-Sync XML files /mnt/winshare/OracleGoldenGate/gg_linux/dirver/oosxml: created

Veridata Parameter files       /mnt/winshare/OracleGoldenGate/gg_linux/dirver/params: created

Veridata Report files          /mnt/winshare/OracleGoldenGate/gg_linux/dirver/report: created

Veridata Status files          /mnt/winshare/OracleGoldenGate/gg_linux/dirver/status: created

Veridata Trace files           /mnt/winshare/OracleGoldenGate/gg_linux/dirver/trace: created

Stdout files                   /mnt/winshare/OracleGoldenGate/gg_linux/dirout: created

 

GGSCI (myCentOS) 2>

 

设置linux环境变量:

GGS_HOME=/mnt/winshare/OracleGoldenGate/gg_linux

export GGS_HOME

LD_LIBRARY_PATH=$GGS_HOME:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH

PATH=$GGS_HOME:$PATH

export PATH

 

[oracle@myCentOS gg_linux]$ GGS_HOME=/mnt/winshare/OracleGoldenGate/gg_linux

[oracle@myCentOS gg_linux]$ export GGS_HOME

[oracle@myCentOS gg_linux]$ LD_LIBRARY_PATH=$GGS_HOME:$LD_LIBRARY_PATH

[oracle@myCentOS gg_linux]$ export LD_LIBRARY_PATH

[oracle@myCentOS gg_linux]$ PATH=$GGS_HOME:$PATH

[oracle@myCentOS gg_linux]$ export PATH

[oracle@myCentOS gg_linux]$ source ~/.bash_profile

[oracle@myCentOS gg_linux]$ echo $GGS_HOME

/mnt/winshare/OracleGoldenGate/gg_linux

[oracle@myCentOS gg_linux]$

3、打开数据库附加日志

C:\Documents and Settings\Administrator>set oracle_sid=test

 

C:\Documents and Settings\Administrator>sqlplus sys/ymh as sysdba;

 

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 7 20 13:18:28 2011

 

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

  

连接到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

 

SQL> alter system checkpoint;

 

系统已更改。

 

SQL> alter database add supplemental log data;

 

数据库已更改。

4、下面执行几个脚本,创建GGMGR用户

SQL> CREATE USER ggmgr IDENTIFIED BY ymh  TEMPORARY TABLESPACE TEMP;

 

用户已创建。

 

SQL> GRANT create table to ggmgr;

 

授权成功。

 

SQL> GRANT CONNECT TO ggmgr;

 

授权成功。

 

SQL> GRANT ALTER ANY  TABLE TO ggmgr;

 

授权成功。

 

SQL> GRANT ALTER SESSION TO ggmgr;

 

授权成功。

 

SQL> GRANT CREATE SESSION TO ggmgr;

 

授权成功。

 

SQL> GRANT FLASHBACK ANY TABLE TO ggmgr;

 

授权成功。

 

SQL> GRANT SELECT ANY DICTIONARY TO ggmgr;

 

授权成功。

 

SQL> GRANT SELECT ANY TABLE TO ggmgr;

 

授权成功。

 

SQL> GRANT "RESOURCE" TO ggmgr;

 

授权成功。

 

SQL> GRANT DELETE ANY TABLE TO ggmgr;

 

授权成功。

 

SQL> GRANT INSERT ANY TABLE TO ggmgr;

 

授权成功。

 

SQL> GRANT UPDATE ANY TABLE TO ggmgr;

 

授权成功。

 

SQL> GRANT RESTRICTED SESSION TO ggmgr;

 

授权成功。

5、创建测试表

SQL> CREATE TABLE ggmgr.T_TEST_CONN_FOR_GG(

  2  TESTER VARCHAR2(30) CONSTRAINT NN_T_TEST_CONN_FOR_GG_TESTER NOT NULL,

  3  SOURCE_DATABASE VARCHAR2(10) CONSTRAINT NN_T_TEST_CONN_FOR_GG_SOURCE NOT NULL,

  4  TARGET_DATABASE VARCHAR2(10) CONSTRAINT NN_T_TEST_CONN_FOR_GG_TARGET NOT NULL,

  5  TEST_TIME DATE DEFAULT SYSDATE,

  6  Constraint PK_TEST_CONN_FOR_GG primary KEY (TESTER, SOURCE_DATABASE, TARGET_DATABASE, TEST_TIME) USING INDEX );

 

表已创建。

 

SQL> COMMENT ON COLUMN ggmgr.T_TEST_CONN_FOR_GG.TESTER IS '测试人员UM账号';

 

注释已创建。

 

SQL> COMMENT ON COLUMN ggmgr.T_TEST_CONN_FOR_GG.SOURCE_DATABASE IS '源数据库SID';

 

注释已创建。

 

SQL> COMMENT ON COLUMN ggmgr.T_TEST_CONN_FOR_GG.TARGET_DATABASE IS '目标数据库SID';

 

注释已创建。

 

SQL> COMMENT ON COLUMN ggmgr.T_TEST_CONN_FOR_GG.TEST_TIME IS '测试时间';

 

注释已创建。

 

SQL> COMMENT ON TABLE ggmgr.T_TEST_CONN_FOR_GG is 'GoldenGate连通性测试表';

 

注释已创建。

6、在linux下创建目标用户和目标表:

SQL> CREATE USER ggmgr_target IDENTIFIED BY ymh TEMPORARY TABLESPACE TEMP;

GRANT create table to ggmgr_target;

GRANT CONNECT TO ggmgr_target;

GRANT ALTER ANY TABLE TO ggmgr_target;

GRANT ALTER SESSION TO ggmgr_target;

GRANT CREATE SESSION TO ggmgr_target;

GRANT FLASHBACK ANY TABLE TO ggmgr_target;

GRANT SELECT ANY DICTIONARY TO ggmgr_target;

GRANT SELECT ANY TABLE TO ggmgr_target;

GRANT "RESOURCE" TO ggmgr_target;

GRANT DELETE ANY TABLE TO ggmgr_target;

GRANT INSERT ANY TABLE TO ggmgr_target;

GRANT UPDATE ANY TABLE TO ggmgr_target;

grant restricted session to ggmgr_target;

 

User created.

 

SQL>

Grant succeeded.

 

创建接收表

 

SQL> CREATE TABLE ggmgr_target.T_TEST_CONN_FOR_GG_target(

  2      TESTER VARCHAR2(30) CONSTRAINT NN_T_TEST_CONN_FOR_GG_TESTER NOT NULL,

  3      SOURCE_DATABASE VARCHAR2(10) CONSTRAINT NN_T_TEST_CONN_FOR_GG_SOURCE NOT NULL,

  4      TARGET_DATABASE VARCHAR2(10) CONSTRAINT NN_T_TEST_CONN_FOR_GG_TARGET NOT NULL,

  5      TEST_TIME DATE DEFAULT SYSDATE,

  6      Constraint PK_TEST_CONN_FOR_GG_target primary KEY (TESTER, SOURCE_DATABASE, TARGET_DATABASE, TEST_TIME) USING INDEX );

 

Table created

7、接下来就是搭建和配置进程了

源库需要 MGR E T进程

目标库要 MGR,F,R进程

7.1windows下源库进程:

7.1.1设置参数

C:\>h:

 

H:\>cd H:\OracleGoldenGate\gg_windows

 

H:\OracleGoldenGate\gg_windows>set oracle_sid=test

 

H:\OracleGoldenGate\gg_windows>ggsci.exe

 

Oracle GoldenGate Command Interpreter for Oracle

Version 11.1.1.0.0 Build 078

Windows (optimized), Oracle 10 on Jul 28 2010 15:07:26

 

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

 

GGSCI (ymh-5a3854c5a1e) 1> EDIT PARAMS ./GLOBALS

CHECKPOINTTABLE ggmgr.gg_checkpoint_tab

 

GGSCI (ymh-5a3854c5a1e) 2>  DBLOGIN USERID ggmgr, PASSWORD ymh

Successfully logged into database.

 

GGSCI (ymh-5a3854c5a1e) 3> ADD CHECKPOINTTABLE ggmgr.gg_checkpoint_tab

 

Successfully created checkpoint table GGMGR.GG_CHECKPOINT_TAB.

 

GGSCI (ymh-5a3854c5a1e) 4> exit

 

H:\OracleGoldenGate\gg_windows>

7.1.2建立GG环境变量的目录

H:\OracleGoldenGate\gg_windows>mkdir direnv

 

H:\OracleGoldenGate\gg_windows>cd direnv

 

H:\OracleGoldenGate\gg_windows\direnv>

 

H:\OracleGoldenGate\gg_windows\direnv>notepad user.oby

userid ggmgr, password  ymh

H:\OracleGoldenGate\gg_windows\direnv>

 

H:\OracleGoldenGate\gg_windows\direnv>notepad db.oby

setenv (ORACEL_SID="test")

H:\OracleGoldenGate\gg_windows\direnv>

 

H:\OracleGoldenGate\gg_windows\direnv>notepad rmt_to_shujukuai.oby

rmthost 192.168.1.150 mgrport 7809

H:\OracleGoldenGate\gg_windows\direnv>

7.1.3创建MGR进程

H:\OracleGoldenGate\gg_windows\direnv>cd ..

 

H:\OracleGoldenGate\gg_windows>ggsci

 

Oracle GoldenGate Command Interpreter for Oracle

Version 11.1.1.0.0 Build 078

Windows (optimized), Oracle 10 on Jul 28 2010 15:07:26

 

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

 

GGSCI (ymh-5a3854c5a1e) 1> edit param mgr

port 7809

dynamicportlist 7809-7909

autostart er *

autorestart er *, retries 24, waitminutes 30, resetminutes 1440

lagreportminutes 10

laginfoseconds 1

purgeoldextracts ./dirdat/*, usecheckpoints, minkeephours 168

 

GGSCI (ymh-5a3854c5a1e) 2>

 

启动:

GGSCI (ymh-5a3854c5a1e) 2> start mgr

 

Manager started.

  

GGSCI (ymh-5a3854c5a1e) 3> info mgr

 

Manager is running (IP port ymh-5a3854c5a1e.7809).

 

GGSCI (ymh-5a3854c5a1e) 4>

 

打开表级附加日志:

 

GGSCI (ymh-5a3854c5a1e) 4> dblogin userid ggmgr, password ymh

Successfully logged into database.

 

GGSCI (ymh-5a3854c5a1e) 5> add trandata GGMGR.T_TEST_CONN_FOR_GG

 

Logging of supplemental redo data enabled for table GGMGR.T_TEST_CONN_FOR_GG.

 

GGSCI (ymh-5a3854c5a1e) 6> INFO TRANDATA GGMGR.T_TEST_CONN_FOR_GG

 

Logging of supplemental redo log data is enabled for table GGMGR.T_TEST_CONN_FOR_GG

 

GGSCI (ymh-5a3854c5a1e) 7>

7.1.4下面我们开始配置EXTRACT 进程参数文件

GGSCI (ymh-5a3854c5a1e) 7> edit param E_TEST

EXTRACT E_TEST

obey ./direnv/db.oby

obey ./direnv/user.oby

TRANLOGOPTIONS EXCLUDEUSER ggmgr

EXTTRAIL ./dirdat/e0        

TABLE GGMGR.T_TEST_CONN_FOR_GG;

 

GGSCI (ymh-5a3854c5a1e) 8>

 

EXTRACT进程的参数文件配好了,现在我需要把这个进程初始化

exract进程初始化

GGSCI (ymh-5a3854c5a1e) 8> ADD EXTRACT E_TEST, TRANLOG, BEGIN NOW

EXTRACT added.

 

 

GGSCI (ymh-5a3854c5a1e) 9> ADD EXTTRAIL ./dirdat/e0, EXTRACT E_TEST, MEGABYTES 50

EXTTRAIL added.

  

GGSCI (ymh-5a3854c5a1e) 10> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING

EXTRACT     STOPPED     E_TEST      00:00:00      00:00:13

  

GGSCI (ymh-5a3854c5a1e) 11>

7.1.5下面一步,我就要添加DATAPUMP进程了

 GGSCI (ymh-5a3854c5a1e) 11> EDIT PARAM T_TEST

EXTRACT E_TEST

obey ./direnv/db.oby

obey ./direnv/user.oby

TRANLOGOPTIONS EXCLUDEUSER ggmgr

EXTTRAIL ./dirdat/e0        

TABLE GGMGR.T_TEST_CONN_FOR_GG;

  

GGSCI (ymh-5a3854c5a1e) 12>

添加该进程:

GGSCI (ymh-5a3854c5a1e) 12> ADD EXTRACT T_TEST, EXTTRAILSOURCE ./dirdat/e0

EXTRACT added.

  

GGSCI (ymh-5a3854c5a1e) 13> ADD RMTTRAIL ./dirdat/d0, EXTRACT T_TEST, MEGABYTES 50

RMTTRAIL added.

  

GGSCI (ymh-5a3854c5a1e) 14>

 

GGSCI (ymh-5a3854c5a1e) 14> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING

EXTRACT     STOPPED     E_TEST      00:00:00      00:05:14

EXTRACT     STOPPED     T_TEST      00:00:00      00:00:40

  

GGSCI (ymh-5a3854c5a1e) 15>

7.1.6下面我要生成表定义文件

GGSCI (ymh-5a3854c5a1e) 15> exit

 

H:\OracleGoldenGate\gg_windows>cd dirprm

 

H:\OracleGoldenGate\gg_windows\dirprm>notepad test.prm

DEFSFILE ./dirdef/test.def, PURGE

obey ./direnv/user.oby

TABLE ggmgr.T_TEST_CONN_FOR_GG;

 

H:\OracleGoldenGate\gg_windows\dirprm>cd ..

 

下一步就是生成表定义文件test.def

 

H:\OracleGoldenGate\gg_windows>defgen paramfile dirprm/test.prm

 

***********************************************************************

        Oracle GoldenGate Table Definition Generator for Oracle

                     Version 11.1.1.0.0 Build 078

        Windows (optimized), Oracle 10 on Jul 28 2010 15:40:43

 

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

 

 

                    Starting at 2011-07-20 14:46:55

***********************************************************************

 

Operating System Version:

Microsoft Windows Server 2003, Enterprise Edition, on x86

Version 5.2 (Build 3790: Service Pack 2)

 

Process id: 5372

 

***********************************************************************

**            Running with the following parameters                  **

***********************************************************************

DEFSFILE ./dirdef/test.def, PURGE

obey ./direnv/user.oby

userid ggmgr, password ***

TABLE ggmgr.T_TEST_CONN_FOR_GG;

Retrieving definition for GGMGR.T_TEST_CONN_FOR_GG

 

Definitions generated for 1 tables in ./dirdef/test.def

 

H:\OracleGoldenGate\gg_windows>

 

错误:因为临时表空间没有数据文件导致(库被我还原过,临时表空间不会被恢复)

2011-07-20 14:23:45  ERROR   OGG-00664  OCI Error creating temporary LOB to retrieve default LOB chunk size (status = 25153-ORA-25153: Temporary Tablespace is Empty).

 

2011-07-20 14:23:45  ERROR   OGG-01668  PROCESS ABENDING.

 

错误:注意检查之前的配置文件中的连接串,账号密码等

2011-07-20 14:12:21  ERROR   OGG-00664  OCI Error beginning session (status = 1017-ORA-01017: invalid username/password; logon denied).

 

2011-07-20 14:12:21  ERROR   OGG-01668  PROCESS ABENDING.

 

注意:如果目标端不在本机

应该将此文件上传到目标库GGS_HOME/dirdef

要不然目标端不认识你这边定义表的

源库这边配置完成了

 

 

7.2下面来配置目标库的:linux下的:

7.2.1配置参数

[oracle@myCentOS gg_linux]$ ls dirdef

test.def

[oracle@myCentOS gg_linux]$ mkdir direnv

[oracle@myCentOS gg_linux]$ cd direnv

[oracle@myCentOS direnv]$ vi user.oby

 

userid ggmgr_target,password ymh

~                                                                               

[oracle@myCentOS direnv]$ vi db.oby

 

setenv (ORACEL_SID="orcl")

~                                                                           

[oracle@myCentOS direnv]$

 

GGSCI (myCentOS) 6> EDIT PARAMS ./GLOBALS

 

CHECKPOINTTABLE ggmgr_target.gg_checkpoint_tab

 

GGSCI (myCentOS) 7> DBLOGIN USERID ggmgr_target,PASSWORD YMH

Successfully logged into database.

 

GGSCI (myCentOS) 8> ADD CHECKPOINTTABLE ggmgr_target.gg_checkpoint_tab

 

Successfully created checkpoint table GGMGR_TARGET.GG_CHECKPOINT_TAB.

 

GGSCI (myCentOS) 9> ^[ 

 

7.2.1配置mgr

[oracle@myCentOS gg_linux]$ ./ggsci

 

Oracle GoldenGate Command Interpreter for Oracle

Version 11.1.1.0.0 Build 078

Linux, x86, 32bit (optimized), Oracle 10 on Jul 28 2010 13:24:18

 

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

 

GGSCI (myCentOS) 1> edit param mgr

 

port 7809

dynamicportlist 7809-7909

autostart er *

autorestart er *, retries 24, waitminutes 30, resetminutes 1440

lagreportminutes 10

laginfoseconds 1

purgeoldextracts ./dirdat/*, usecheckpoints, minkeephours 168

 

GGSCI (myCentOS) 2> start mgr

 

Manager started.

 

GGSCI (myCentOS) 3> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING                                          

 

GGSCI (myCentOS) 4>

7.2.2配置接收进程

GGSCI (myCentOS) 4> edit param f_test

 

EXTRACT F_TEST

bey ./direnv/db.oby

obey ./direnv/user.oby

SOURCEDEFS ./dirdef/test.def

EXTTRAIL ./dirdat/f0

TABLE ggmgr.T_TEST_CONN_FOR_GG;

 

GGSCI (myCentOS) 1> ADD EXTRACT F_TEST, EXTTRAILSOURCE ./dirdat/d0

EXTRACT added.

 

GGSCI (myCentOS) 2> ADD RMTTRAIL ./dirdat/f0, EXTRACT F_TEST, MEGABYTES 50

RMTTRAIL added.

 

GGSCI (myCentOS) 3> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING                                          

EXTRACT     STOPPED     F_TEST      00:00:00      00:00:11   

7.2.3 配置

GGSCI (myCentOS) 4> EDIT PARAM R_TEST

 

REPLICAT r_test

obey ./direnv/db.oby

obey ./direnv/user.oby

SOURCEDEFS ./dirdef/test.def

CHECKPOINTSECS 30

GROUPTRANSOPS 20000

MAXTRANSOPS 30000

REPERROR DEFAULT, ABEND

DISCARDFILE ./dirrpt/r_test.dsc, append, MEGABYTES 2000

DISCARDROLLOVER AT 05:30 ON friday

REPORTCOUNT EVERY 10000 RECORDS, RATE

-- Resolve meta. data for table def as it appears in log record

WILDCARDRESOLVE DYNAMIC

ALLOWDUPTARGETMAP

map ggmgr.T_TEST_CONN_FOR_GG , TARGET ggmgr_target.T_TEST_CONN_FOR_GG_TARGET;

 

GGSCI (myCentOS) 5>

 

GGSCI (myCentOS) 1> ADD REPLICAT R_test, EXTTRAIL ./dirdat/f0

REPLICAT added.

 

GGSCI (myCentOS) 2>

 

错误:没有配置checkpoint table,要记得配置后最好退出GGSCI再进入生成

GGSCI (myCentOS) 11> ADD REPLICAT R_test, EXTTRAIL ./dirdat/f0

ERROR: No checkpoint table specified for ADD REPLICAT.

8、配置完成,启动服务

8.1启动windows源端的

GGSCI (ymh-5a3854c5a1e) 1> start *

 

ERROR: Manager not currently running.

 

ERROR: Manager not currently running.

  

GGSCI (ymh-5a3854c5a1e) 2> start mgr

 

Manager started.

  

GGSCI (ymh-5a3854c5a1e) 3> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING

EXTRACT     RUNNING     E_TEST      00:00:00      00:00:00

EXTRACT     RUNNING     T_TEST      00:00:00      00:00:07

  

GGSCI (ymh-5a3854c5a1e) 4>

8.2启动linux服务端的

GGSCI (myCentOS) 7> start mgr

 

Manager started.

  

GGSCI (myCentOS) 8> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING                                          

EXTRACT     STOPPED     F_TEST      00:00:00      00:17:45   

REPLICAT    RUNNING     R_TEST      00:00:00      00:00:01   

  

GGSCI (myCentOS) 9> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING                                          

EXTRACT     STOPPED     F_TEST      00:00:00      00:17:49   

REPLICAT    RUNNING     R_TEST      00:00:00      00:00:06   

  

GGSCI (myCentOS) 10>

 

错误了,检查:

GGSCI (myCentOS) 11> view report f_test

 

 

***********************************************************************

                 Oracle GoldenGate Capture for Oracle

                     Version 11.1.1.0.0 Build 078

   Linux, x86, 32bit (optimized), Oracle 10 on Jul 28 2010 16:16:35

 

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

 

 

                    Starting at 2011-07-20 20:20:24

***********************************************************************

 

Operating System Version:

Linux

Version #1 SMP Fri Apr 2 14:58:35 EDT 2010, Release 2.6.18-194.el5

Node: myCentOS

Machine: i686

                         soft limit   hard limit

Address Space Size   :    unlimited    unlimited

Heap Size            :    unlimited    unlimited

File Size            :    unlimited    unlimited

CPU Time             :    unlimited    unlimited

 

Process id: 2857

 

Description:

 

***********************************************************************

**            Running with the following parameters                  **

***********************************************************************

 

bey ./direnv/db.oby

 

Source Context :

  SourceModule            : [er.main]

  SourceID                : [/home/ecloud/workspace/Build_FBO_OpenSys_r11.1.1.0.0_078_[34090]/perforce/src/app/er/rep.c]

  SourceFunction          : [get_infile_params]

  SourceLine              : [12083]

  ThreadBacktrace         : [7] elements

                          : [/mnt/winshare/OracleGoldenGate/gg_linux/extract(CMessageContext::AddThreadContext()+0x26) [0x840b3f6]]

                          : [/mnt/winshare/OracleGoldenGate/gg_linux/extract(CMessageFactory::CreateMessage(CSourceContext*, unsigne

d int, ...)+0x817) [0x8401b57]]

                          : [/mnt/winshare/OracleGoldenGate/gg_linux/extract(_MSG_ERR_STARTUP_PARAMERROR_ERRORTEXT(CSourceContext*,

char const*, CMessageFactory::MessageDisposition)+0x81) [0x83ca581]]

                          : [/mnt/winshare/OracleGoldenGate/gg_linux/extract [0x818b0dc]]

                          : [/mnt/winshare/OracleGoldenGate/gg_linux/extract(main+0x133) [0x819cdd3]]

                          : [/lib/libc.so.6(__libc_start_main+0xdc) [0x424e9c]]

                          : [/mnt/winshare/OracleGoldenGate/gg_linux/extract(__gxx_personality_v0+0x1c5) [0x8114ac1]]

 

2011-07-20 20:20:24  ERROR   OGG-00303  Unrecognized parameter (bey).

 

2011-07-20 20:20:24  ERROR   OGG-01668  PROCESS ABENDING.

  

GGSCI (myCentOS) 12>

  

查看最后一个一部分error信息

参数有问题.检查 f_test的参数edit param f_test,发现最开始少了:EXTRACT F_TEST

  

GGSCI (myCentOS) 26> start f_test

 

Sending START request to MANAGER ...

EXTRACT F_TEST starting

  

GGSCI (myCentOS) 27> info all

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING                                          

EXTRACT     RUNNING     F_TEST      00:00:00      00:00:00   

REPLICAT    RUNNING     R_TEST      00:00:00      00:00:27   

  

GGSCI (myCentOS) 28>

 

9、测试插入数据

windows源端插入一条记录:

SQL> insert into ggmgr.T_TEST_CONN_FOR_GG values('shujukuai','test','test1',SYSDATE);

 

已创建 1 行。

 

SQL> commit;

 

提交完成。

 

SQL>

 

linux下查看接收进城:

GGSCI (myCentOS) 28> stats r_test

 

Sending STATS request to REPLICAT R_TEST ...

 

Start of Statistics at 2011-07-20 21:33:43.

 

Replicating from GGMGR.T_TEST_CONN_FOR_GG to GGMGR_TARGET.T_TEST_CONN_FOR_GG_TARGET:

 

*** Total statistics since 2011-07-20 21:32:42 ***

        Total inserts                                1.00

        Total updates                                0.00

        Total deletes                                0.00

        Total discards                               0.00

        Total operations                             1.00

 

*** Daily statistics since 2011-07-20 21:32:42 ***

        Total inserts                                1.00

        Total updates                                0.00

        Total deletes                                0.00

        Total discards                               0.00

        Total operations                             1.00

 

*** Hourly statistics since 2011-07-20 21:32:42 ***

        Total inserts                                1.00

        Total updates                                0.00

        Total deletes                                0.00

        Total discards                               0.00

        Total operations                             1.00

 

*** Latest statistics since 2011-07-20 21:32:42 ***

        Total inserts                                1.00

        Total updates                                0.00

        Total deletes                                0.00

        Total discards                               0.00

        Total operations                             1.00

 

End of Statistics.

  

GGSCI (myCentOS) 29>

 

查询目标表:

 

SQL> conn sys/ymh as sysdba;

Connected.

SQL> select * from ggmgr_target.T_TEST_CONN_FOR_GG_target;

 

TESTER                         SOURCE_DAT TARGET_DAT TEST_TIME

------------------------------ ---------- ---------- ---------

shujukuai                      test       test1      20-JUL-11

 

SQL>

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23185328/viewspace-705813/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-08-22

  • 博文量
    8
  • 访问量
    26925