OGG-01777 Extract abended as it ran out of sequence numbers used to create TRAIL files

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:OGG-01777 Extract abended as it ran out of sequence numbers used to create TRAIL files

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

ogg extract 进程报OGG-01777 Extract abended as it ran out of sequence numbers used to create TRAIL files. The maximum number of TRAIL files allowed is 999999.
20221125124140


由于extract进程已经异常,直接对其抽取的trail文件命名新文件

--ggsci中执行
edit param eora_1  
--修改文件
EXTTRAIL ./dirdat/ab

--ggsci中执行
delete exttrail ./dirdat/aa extract eora_1
add exttrail ./dirdat/ab extract eora_1

GGSCI (xff-source) 51> info eora_1

EXTRACT    EORA_1    Last Started 2022-11-24 22:59   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:00 ago)
Log Read Checkpoint  Oracle Redo Logs
                     First Record         Seqno 248386, RBA 0
                     SCN 0.0 (0)

修改extract pump进程

edit params PORA_1
rmttrail ./dirdat/pc

delete rmttrail ./dirdat/pa extract PORA_1
add rmttrail ./dirdat/pc extract PORA_1
alter ext PORA_1 exttrailsource ./dirdat/ab

GGSCI (xff-source) 56> info pora_1 

EXTRACT    PORA_1    Initialized   2022-11-24 22:59   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:01:37 ago)
Log Read Checkpoint  File ./dirdat/ab000000
                     First Record  RBA 0

replcat进程处理

alter rep rep1 exttrail ./dirdat/pc

GGSCI (xff-target) 9> info rep1

REPLICAT   REP1      Initialized   2022-11-24 23:00   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:07 ago)
Log Read Checkpoint  File ./dirdat/pb000000
                     First Record  RBA 0

启动相关进程进行传输即可.
另外可以考虑相对简单一点操作,直接delete/add exttrail,delete/add rmttrail同名文件,省去修改param文件的麻烦,注意最终找trail文件名称和偏移量是否准确,如果不正确注意使用类似命令修改

add exttrail ./dirdat/xx, extract xxx, megabytes 1024
add rmttrail ./dirdat/xx, megabytes 1024, seqno 0 , rba 0, extract xxx
alter replicat xxx, extseqno 0, extrba 0
alter extract xxx,extseqno xxxx,extrba xxxx

OGG-01705故障处理

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:OGG-01705故障处理

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

由于机器突然重启,导致ogg replicat进程启动报OGG-01705
OGG-01705


从报错信息看应该是ogg产生的Trail文件大小异常了,查看操作系统层面该文件大小
20210527124807

ogg进程启动需要读取的文件位置433622176,而操作系统层面看到的文件大小为433609363(os层面文件较小,很可能是由于os层面系统重启写丢失导致),对于这样的问题:
在11.2.1.07及其以后版本可以通过以下命令启动replicat进程,过滤掉已经在checkpoint table中已经应用的记录
参考:OGG Replicat Checkpoint RBA Is Larger than Local Trail Size- Ogg v11.2 (Doc ID 1536741.1)

start replicat <rep name> filterduptransactions

对于11.2.1.07之前版本,需要通过Logdump找出来合适的extrba,然后通过以下类似命令处理
参考:OGG Extract / Replicat Checkpoint RBA Is Larger than Local Trail Size (Doc ID 1138409.1)

alter rep < rep name>, extseqno 27506, extrba 92047.

ogg导致v$logfile查询频繁

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:ogg导致v$logfile查询频繁

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

在某些版本的ogg中发现ogg抽取进程对v$logfile视图查询影响比较大
20181116220104


对应的sql语句为:SELECT 1 FROM V$LOGFILE WHERE(STATUS NOT IN (‘STALE’, ‘INVALID’) OR STATUS IS NULL) AND MEMBER <> :log_name AND EXISTS ( SELECT 1 FROM V$LOG WHERE GROUP# = V$LOGFILE.GROUP# AND THREAD# = :ora_thread AND SEQUENCE# = :ora_seq_no ) AND ROWNUM = 1
查询mos发现相关问题描述:Query On V$logfile Running Excessive Number Of Times After upgrading ogg to 11.2.1.0.32 or 12.1.2.1.5 or later (Doc ID 2116395.1)和Bug 22650790 : CE 12.1.2.1.9: Query on v$logfile running excessive number of times
2116395.1


根据mos描述在ogg对应版本中设置:TRANLOGOPTIONS _ENABLESTREAMLINEDDBLOGREADER

ogg同步部分列配置

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:ogg同步部分列配置

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

自从2010年后,基本上没有玩ogg了,最近有客户需求,a库在内网,b库在外网,希望同步a库中几个基础业务表的每个表的几个字段同步到b库中,采用a–>c–>b的方式来实现同步(c同时接通内外网),ogg 本身同步不难,关键是自己好多年没有玩,而且这次是只要同步部分列的情况,因此做了一个同步表部分列的一个demo测试
源端数据库准备
启动归档模式,开启强制日志和辅助日志,创建测试用户/表,ogg用户

SQL> create user xifenfei identified by xifenfei;
User created.
SQL> grant dba to xifenfei;
Grant succeeded.
SQL> conn xifenfei/xifenfei
Connected.
SQL> create table t_xifenfei as select * from dba_objects;
Table created.
SQL> alter table t_xifenfei add constraint pk_t_xifenfei primary key(object_id);
Table altered.
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     9
Current log sequence           11
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area  901775360 bytes
Fixed Size                  2024944 bytes
Variable Size             239077904 bytes
Database Buffers          658505728 bytes
Redo Buffers                2166784 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> alter database force logging;
Database altered.
SQL>  alter database add supplemental log data;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> create user ogg identified by oracle;
User created.
SQL> grant dba to ogg;
Grant succeeded.

配置mgr进程

[oracle@xffdbrh5 ogg]$ export PATH=/u01/ogg:$PATH
[oracle@xffdbrh5 ogg]$ export LD_LIBRARY_PATH=/u01/ogg:$ORACLE_HOME/lib
[oracle@xffdbrh5 ogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.5_02 16363018 OGGCORE_11.2.1.0.6_PLATFORMS_130301.1500_FBO
Linux, x64, 64bit (optimized), Oracle 10g on Mar  1 2013 19:04:05
Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
GGSCI (xffdbrh5) 1> create subdirs
Creating subdirectories under current directory /u01/ogg
Parameter files                /u01/ogg/dirprm: already exists
Report files                   /u01/ogg/dirrpt: created
Checkpoint files               /u01/ogg/dirchk: created
Process status files           /u01/ogg/dirpcs: created
SQL script files               /u01/ogg/dirsql: created
Database definitions files     /u01/ogg/dirdef: created
Extract data files             /u01/ogg/dirdat: created
Temporary files                /u01/ogg/dirtmp: created
Stdout files                   /u01/ogg/dirout: created
GGSCI (xffdbrh5) 2> edit param mgr
port 7839
DYNAMICPORTLIST 7840-7850
AUTOSTART EXTRACT *
AUTORESTART EXTRACT *
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
GGSCI (xffdbrh5) 3> dblogin userid ogg, password oracle
Successfully logged into database.
GGSCI (xffdbrh5) 4> add checkpointtable ogg.ggs_checkpoint
Successfully created checkpoint table ogg.ggs_checkpoint.
GGSCI (xffdbrh5) 5> EDIT PARAMS ./GLOBALS
ogg.ggs_checkpoint
GGSCI (xffdbrh5) 6> start mgr
Manager started.
GGSCI (xffdbrh5) 7> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING

配置extract进程

GGSCI (xffdbrh5) 3> dblogin userid ogg, password oracle
Successfully logged into database.
GGSCI (xffdbrh5) 4> add trandata xifenfei.t_xifenfei
Logging of supplemental redo data enabled for table XIFENFEI.T_XIFENFEI.
GGSCI (xffdbrh5) 5>  add extract ext_1, tranlog, begin now, threads 1
EXTRACT added.
GGSCI (xffdbrh5) 6>  add EXTTRAIL ./dirdat/r1, extract ext_1,megabytes 100
EXTTRAIL added.
GGSCI (xffdbrh5) 7> edit param ext_1
EXTRACT ext_1
userid ogg,password oracle
REPORTCOUNT EVERY 1 MINUTES, RATE
numfiles 5000
DISCARDFILE ./dirrpt/ext_1.dsc,APPEND,MEGABYTES 1024
DISCARDROLLOVER AT 3:00
exttrail ./dirdat/r1,megabytes 100
dynamicresolution
TRANLOGOPTIONS DISABLESUPPLOGCHECK   --bug 16857778
TABLE xifenfei.t_xifenfei, COLS (OWNER, OBJECT_NAME, SUBOBJECT_NAME, OBJECT_ID);
GGSCI (xffdbrh5) 8> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING
EXTRACT     STOPPED     EXT_1       00:00:00      00:00:22
GGSCI (xffdbrh5) 9> start ext_1
Sending START request to MANAGER ...
EXTRACT EXT_1 starting
GGSCI (xffdbrh5) 10> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT_1       00:01:18      00:00:00

配置pump data进程

GGSCI (xffdbrh5) 1> edit param dpe_1
extract dpe_1
dynamicresolution
passthru
rmthost 192.168.137.251, mgrport 7839, compress
rmttrail ./dirdat/t1
numfiles 5000
TABLE xifenfei.t_xifenfei;
GGSCI (xffdbrh5) 2> start dpe_1
Sending START request to MANAGER ...
EXTRACT DPE_1 starting
GGSCI (xffdbrh5) 3> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     DPE_1       00:00:00      00:16:47
EXTRACT     RUNNING     EXT_1       00:00:00      00:00:07

目标端数据库准备

[oracle@xifenfei ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 13 00:40:19 2014
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create user ogg identified by oracle;
User created.
SQL> grant dba to ogg;
Grant succeeded.
SQL> create user xff identified by xifenfei;
User created.
SQL> grant dba to xff;
Grant succeeded.
SQL> conn xff/xifenfei
Connected.
SQL> create  database link syc_data
  2    connect to ogg identified by oracle
  3    using '(DESCRIPTION =
  4    (ADDRESS_LIST =
  5    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.137.252)(PORT = 1521))
  6    )
  7    (CONNECT_DATA =
  8    (SERVER = DEDICATED)
  9    (SERVICE_NAME = ora10g)
 10    )
 11    )';
Database link created.
SQL> select count(*) from xifenfei.t_xifenfei@syc_data;
  COUNT(*)
----------
      9917
SQL> SELECT CURRENT_SCN FROM V$DATABASE@syc_data;
CURRENT_SCN
-----------
     793069
SQL> create table xff.t_xff as select OWNER, OBJECT_NAME, SUBOBJECT_NAME,
 2 > OBJECT_ID from xifenfei.t_xifenfei@syc_data AS OF SCN  793069;
Table created.
SQL> alter table xff.t_xff add constraint pk_t_xff primary key(object_id);
Table altered.

目标端mgrp配置

[oracle@xifenfei ogg]$export LD_LIBRARY_PATH=/home/oracle/amdu:$ORACLE_HOME/lib:/u01/oracle/oradata/ogg
[oracle@xifenfei 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 10g on Apr 23 2012 07:06:02
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (xifenfei) 8> edit param mgr
port 7839
DYNAMICPORTLIST 7840-7850
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7
autorestart extract *, waitminutes 1, retries 60
autorestart replicat *, waitminutes 1, retries 60
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
GGSCI (xifenfei) 12> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     STOPPED
GGSCI (xifenfei) 13> create subdirs
Creating subdirectories under current directory /u01/oracle/oradata/ogg
Parameter files                /u01/oracle/oradata/ogg/dirprm: already exists
Report files                   /u01/oracle/oradata/ogg/dirrpt: already exists
Checkpoint files               /u01/oracle/oradata/ogg/dirchk: already exists
Process status files           /u01/oracle/oradata/ogg/dirpcs: already exists
SQL script files               /u01/oracle/oradata/ogg/dirsql: already exists
Database definitions files     /u01/oracle/oradata/ogg/dirdef: already exists
Extract data files             /u01/oracle/oradata/ogg/dirdat: already exists
Temporary files                /u01/oracle/oradata/ogg/dirtmp: already exists
Stdout files                   /u01/oracle/oradata/ogg/dirout: already exists
GGSCI (xifenfei) 2> dblogin userid ogg, password oracle
Successfully logged into database.
GGSCI (xifenfei) 3> add checkpointtable ogg.ggs_checkpoint
Successfully created checkpoint table ogg.ggs_checkpoint.
GGSCI (xifenfei) 4> EDIT PARAMS ./GLOBALS
checkpointtable ogg.ggs_checkpoint
GGSCI (xifenfei) 5> start mgr
Manager started.
GGSCI (xifenfei) 6> add replicat rep_1,exttrail ./dirdat/t1,checkpointtable ogg.ggs_checkpoint
REPLICAT added.
GGSCI (xifenfei) 7> edit params rep_1
REPLICAT rep_1
USERID ogg,PASSWORD oracle
REPORTCOUNT EVERY 30 MINUTES, RATE
REPERROR DEFAULT, ABEND
numfiles 5000
assumetargetdefs
DISCARDFILE ./dirrpt/rep_1.dsc, APPEND, MEGABYTES 1000
DISCARDROLLOVER AT 3:00
ALLOWNOOPUPDATES
MAP xifenfei.t_xifenfei, TARGET xff.t_xff;
GGSCI (xifenfei) 8> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING
REPLICAT    STOPPED     REP_1       00:00:00      00:01:45
GGSCI (xifenfei) 9> start rep_1,aftercsn 793069
Sending START request to MANAGER ...
REPLICAT REP_1 starting
GGSCI (xifenfei) 10> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     REP_1       00:00:00      00:00:01

测试数据库同步

--源端库
SQL> desc t_XIFENFEI
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OWNER                                              VARCHAR2(30)
 OBJECT_NAME                                        VARCHAR2(128)
 SUBOBJECT_NAME                                     VARCHAR2(30)
 OBJECT_ID                                 NOT NULL NUMBER
 DATA_OBJECT_ID                                     NUMBER
 OBJECT_TYPE                                        VARCHAR2(19)
 CREATED                                            DATE
 LAST_DDL_TIME                                      DATE
 TIMESTAMP                                          VARCHAR2(19)
 STATUS                                             VARCHAR2(7)
 TEMPORARY                                          VARCHAR2(1)
 GENERATED                                          VARCHAR2(1)
 SECONDARY                                          VARCHAR2(1)
SQL> update t_XIFENFEI set owner='www.xifenfei.com' where rownum<100;
99 rows updated.
SQL> commit;
Commit complete.
--目标端库
SQL> desc xff.t_xff
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OWNER                                              VARCHAR2(30)
 OBJECT_NAME                                        VARCHAR2(128)
 SUBOBJECT_NAME                                     VARCHAR2(30)
 OBJECT_ID                                 NOT NULL NUMBER
SQL> select count(*) from xff.t_xff where owner='www.xifenfei.com';
  COUNT(*)
----------
        99
--源端库
SQL> delete from t_XIFENFEI where  owner='www.xifenfei.com';
99 rows deleted.
SQL> commit;
Commit complete.
--目标端
SQL> select count(*) from xff.t_xff where owner='www.xifenfei.com';
  COUNT(*)
----------
         0
--源端库
SQL> insert into xifenfei.t_xifenfei(owner,object_id) values('www.xifenfei.com',1);
1 row created.
SQL> commit;
Commit complete.
--目标端库
SQL>  select count(*) from xff.t_xff where owner='www.xifenfei.com';
  COUNT(*)
----------
         1
SQL> select * from xff.t_xff where owner='www.xifenfei.com';
OWNER                OBJECT_NAME         SUBOBJECT_NAME                  OBJECT_ID
-------------------- ------------------- ------------------------------ ----------
www.xifenfei.com                                                                 1

这里实现部分列同步,主要在extract端使用COLS捕获需要列,使用ctas结合dblink,flashback query实现表测试后.

利用impdp结合network_link+FLASHBACK_TIME初始化ogg同步数据

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:利用impdp结合network_link+FLASHBACK_TIME初始化ogg同步数据

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

部署ogg,需要两边初始化数据,但是因为业务不能停止。所以考虑到使用ogg init功能或者impdp。考虑到数据量比较大,自己对ogg init不是很有信心,所以选择了使用impdp结合network_link+FLASHBACK_TIME处理
一、处理思路
1、选择时间点(尚未达到时间点)
选择一个时间点,用于重设ogg同步时间点,impdp导入时间点
要求:ogg尚未加载到该时间点(在该时间点之前停止ogg相关ext/pump/replicat进程)
2、开始导入指定时间点数据(该时间点已经达到后)

[oracle@srtcreen OGG]$ impdp srt_creen/a69UiBOB1gk directory=DATA_PUMP_DIR network_link=OGG_TYKF REMAP_SCHEMA=CSCNEW:SRT_CREEN REMAP_TABLESPACE=CSC_TAB_1:SRTCREEN tables=CSCNEW.TAB_CS_USER,CSCNEW.TAB_CS_QUEUES,CSCNEW.TAB_CS_CALL_PICKUP,CSCNEW.TAB_CS_CALL_COMING,CSCNEW.TAB_CS_CALLLOG FLASHBACK_TIME=\"to_timestamp\(\'2011-12-06 13:03:00\',\'yyyy-mm-dd hh24:mi:ss\'\)\"
Import: Release 10.2.0.4.0 - 64bit Production on Tuesday, 06 December, 2011 13:04:34
Copyright (c) 2003, 2007, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SRT_CREEN"."SYS_IMPORT_TABLE_01":  srt_creen/******** directory=DATA_PUMP_DIR network_link=OGG_TYKF REMAP_SCHEMA=CSCNEW:SRT_CREEN REMAP_TABLESPACE=CSC_TAB_1:SRTCREEN tables=CSCNEW.TAB_CS_USER,CSCNEW.TAB_CS_QUEUES,CSCNEW.TAB_CS_CALL_PICKUP,CSCNEW.TAB_CS_CALL_COMING,CSCNEW.TAB_CS_CALLLOG FLASHBACK_TIME="to_timestamp('2011-12-06 13:03:00','yyyy-mm-dd hh24:mi:ss')"
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 824.5 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
    . . imported "SRT_CREEN"."TAB_CS_CALLLOG"               3289293 rows
    . . imported "SRT_CREEN"."TAB_CS_CALL_COMING"           1218843 rows
 . . imported "SRT_CREEN"."TAB_CS_CALL_PICKUP"           1092937 rows
. . imported "SRT_CREEN"."TAB_CS_QUEUES"                   4614 rows
. . imported "SRT_CREEN"."TAB_CS_USER"                      458 rows
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SRT_CREEN"."SYS_IMPORT_TABLE_01" successfully completed at 13:12:37

3、重设同步时间点,开启进程

alter ext_1,begin 2011-12-06 13:03:00
alter ext_2,begin 2011-12-06 13:03:00
alter ext_3,begin 2011-12-06 13:03:00
alter ext_4,begin 2011-12-06 13:03:00
alter ext_5,begin 2011-12-06 13:03:00
alter p_1,begin 2011-12-06 13:03:00
alter p_2,begin 2011-12-06 13:03:00
alter p_3,begin 2011-12-06 13:03:00
alter p_4,begin 2011-12-06 13:03:00
alter p_5,begin 2011-12-06 13:03:00
start *
alter r_1,begin 2011-12-06 13:03:00
alter r_2,begin 2011-12-06 13:03:00
alter r_3,begin 2011-12-06 13:03:00
alter r_4,begin 2011-12-06 13:03:00
alter r_5,begin 2011-12-06 13:03:00
start *

4、验证同步情况

--源端
GGSCI (tykf) 23> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT_1       00:00:00      00:00:05
EXTRACT     RUNNING     EXT_2       00:00:00      00:00:05
EXTRACT     RUNNING     EXT_3       00:00:00      00:00:07
EXTRACT     RUNNING     EXT_4       00:00:00      00:00:07
EXTRACT     RUNNING     EXT_5       00:00:00      00:00:07
EXTRACT     RUNNING     P_1         00:00:00      00:00:06
EXTRACT     RUNNING     P_2         00:00:00      00:00:06
EXTRACT     RUNNING     P_3         00:00:00      00:00:06
EXTRACT     RUNNING     P_4         00:00:00      00:00:06
EXTRACT     RUNNING     P_5         00:00:00      00:00:06
GGSCI (tykf) 24> stats p_3
Sending STATS request to EXTRACT P_3 ...
Start of Statistics at 2011-12-06 13:15:46.
DDL replication statistics (for all trails):
*** Total statistics since extract started     ***
        Operations                                   0.00
        Mapped operations                            0.00
        Unmapped operations                          0.00
        Other operations                             0.00
        Excluded operations                          0.00
Output to /opt/OGG/dirdat/U3:
Extracting from CSCNEW.TAB_CS_CALL_PICKUP to CSCNEW.TAB_CS_CALL_PICKUP:
*** Total statistics since 2011-12-06 13:13:01 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
*** Daily statistics since 2011-12-06 13:13:01 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
*** Hourly statistics since 2011-12-06 13:13:01 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
*** Latest statistics since 2011-12-06 13:13:01 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
End of Statistics.
--目标端
GGSCI (srtcreen) 11> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     R_1         00:00:00      00:00:06
REPLICAT    RUNNING     R_2         00:00:00      00:00:06
REPLICAT    RUNNING     R_3         00:00:00      00:00:08
REPLICAT    RUNNING     R_4         00:00:00      00:00:04
REPLICAT    RUNNING     R_5         00:00:00      00:00:02
GGSCI (srtcreen) 12> stats r_3
Sending STATS request to REPLICAT R_3 ...
Start of Statistics at 2011-12-06 13:15:35.
DDL replication statistics:
*** Total statistics since replicat started     ***
        Operations                                   0.00
        Mapped operations                            0.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 CSCNEW.TAB_CS_CALL_PICKUP to SRT_CREEN.TAB_CS_CALL_PICKUP:
*** Total statistics since 2011-12-06 13:13:10 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
*** Daily statistics since 2011-12-06 13:13:10 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
*** Hourly statistics since 2011-12-06 13:13:10 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
*** Latest statistics since 2011-12-06 13:13:10 ***
        Total inserts                                8.00
        Total updates                               10.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                            18.00
End of Statistics.

二、配置过程遇到问题
1、impdp报无权限

[oracle@srtcreen OGG]$ expdp srt_creen/a69UiBOB1gk directory=DATA_PUMP_DIR network_link=OGG_TYKF tables=CSCNEW.TAB_CS_USER,CSCNEW.TAB_CS_QUEUES,CSCNEW.TAB_CS_CALL_PICKUP,CSCNEW.TAB_CS_CALL_COMING,CSCNEW.TAB_CS_CALLLOG FLASHBACK_TIME=\"to_timestamp\(\'2011-12-06 11:00:00\',\'yyyy-mm-dd hh24:mi:ss\'\)\" dumpfile=a.dmp
Export: Release 10.2.0.4.0 - 64bit Production on Tuesday, 06 December, 2011 11:15:04
Copyright (c) 2003, 2007, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31631: privileges are required
ORA-39149: cannot link privileged user to non-privileged user

srt_creen用户需要有imp_full_database权限
dblink中用户需要exp_full_database权限

2、目标端进程报OGG-01003

Opened trail file /opt/OGG/dirdat/U3000002 at 2011-12-06 12:34:47
Switching to next trail file /opt/OGG/dirdat/U3000003 at 2011-12-06 12:35:21 due to EOF, with current RBA 1028
Opened trail file /opt/OGG/dirdat/U3000003 at 2011-12-06 12:35:21
Processed extract process graceful restart record at seq 3, rba 993.
Processed extract process graceful restart record at seq 3, rba 1051.
MAP resolved (entry CSCNEW.TAB_CS_CALL_PICKUP):
  MAP CSCNEW.TAB_CS_CALL_PICKUP, TARGET SRT_CREEN.TAB_CS_CALL_PICKUP, KEYCOLS (CALL_ID);
Using following columns in default map by name:
  PICKUP_ID, CALL_ID, CALL_SERIAL, USER_ID, PICKUP_TIME, CALL_RESULT,
  FAIL_REASON, CALL_TIME, CALL_DURA, END_TIME
Using the following key columns for target table SRT_CREEN.TAB_CS_CALL_PICKUP: CALL_ID.
2011-12-06 12:35:22  WARNING OGG-00869  OCI Error ORA-01407: cannot update ("SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDAT
E "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" = :a2,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CAL
L_TIME" = :a7,"CALL_DURA" = :a8,"END_T>.
2011-12-06 12:35:23  WARNING OGG-01004  Aborted grouped transaction on 'SRT_CREEN.TAB_CS_CALL_PICKUP', Database error 1407 (OCI Error ORA-01407: cannot updat
e ("SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDATE "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" =
:a2,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CALL_TIME" = :a7,"CALL_DURA" = :a8,"END_T>).
2011-12-06 12:35:23  WARNING OGG-01003  Repositioning to rba 1111 in seqno 3.

部署ogg时配置relicat错误:
非MAP CSCNEW.TAB_CS_CALL_PICKUP, TARGET SRT_CREEN.TAB_CS_CALL_PICKUP, KEYCOLS (CALL_ID);
而是MAP CSCNEW.TAB_CS_CALL_PICKUP, TARGET SRT_CREEN.TAB_CS_CALL_PICKUP, KEYCOLS (PICKUP_ID);

3、update同步失败

GGSCI (srtcreen) 12> stats r_3
Sending STATS request to REPLICAT R_3 ...
Start of Statistics at 2011-12-06 12:37:49.
DDL replication statistics:
*** Total statistics since replicat started     ***
        Operations                                   0.00
        Mapped operations                            0.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 CSCNEW.TAB_CS_CALL_PICKUP to SRT_CREEN.TAB_CS_CALL_PICKUP:
*** Total statistics since 2011-12-06 12:37:43 ***
        Total inserts                                2.00
        Total updates                                6.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                             8.00
        Total update collisions                      6.00
*** Daily statistics since 2011-12-06 12:37:43 ***
        Total inserts                                2.00
        Total updates                                6.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                             8.00
        Total update collisions                      6.00
*** Hourly statistics since 2011-12-06 12:37:43 ***
        Total inserts                                2.00
        Total updates                                6.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                             8.00
        Total update collisions                      6.00
*** Latest statistics since 2011-12-06 12:37:43 ***
        Total inserts                                2.00
        Total updates                                6.00
        Total deletes                                0.00
        Total discards                               0.00
        Total operations                             8.00
        Total update collisions                      6.00
End of Statistics.

源端忘记执行add trandata 同步表

add trandata CSCNEW.TAB_CS_USER
add trandata  CSCNEW.TAB_CS_QUEUES
add trandata  CSCNEW.TAB_CS_CALL_PICKUP
add trandata CSCNEW.TAB_CS_CALL_COMING
add trandata CSCNEW.TAB_CS_CALLLOG

时间不同步导致ogg部署异常

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:时间不同步导致ogg部署异常

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

一、错误检查

[oracle@srtcreen ~]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.1 OGGCORE_11.1.1.1.1_PLATFORMS_110729.1700
Linux, x64, 64bit (optimized), Oracle 10g on Jul 29 2011 19:43:29
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
GGSCI (srtcreen) 1> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     R_1         00:00:00      00:00:07
REPLICAT    RUNNING     R_2         00:00:00      00:00:05
REPLICAT    ABENDED     R_3         19:19:34      00:17:33
REPLICAT    STOPPED     R_4         00:00:00      19:44:24
REPLICAT    STOPPED     R_5         00:00:00      19:44:13
GGSCI (srtcreen) 2> view report r_3
***********************************************************************
                 Oracle GoldenGate Delivery for Oracle
     Version 11.1.1.1.1 OGGCORE_11.1.1.1.1_PLATFORMS_110729.1700
   Linux, x64, 64bit (optimized), Oracle 10g on Sep 13 2011 21:33:03
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
                    Starting at 2011-12-02 16:36:58
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Fri Apr 2 14:58:14 EDT 2010, Release 2.6.18-194.el5
Node: srtcreen
Machine: x86_64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :    unlimited    unlimited
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited
Process id: 13398
Description:
***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
replicat r_3
ASSUMETARGETDEFS
HANDLECOLLISIONS
SETENV (NLS_LANG =AMERICAN_AMERICA.ZHS16GBK)
Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
userid it1ogg, password ********
--file for dicarded transaction --
discardfile /opt/OGG/discard/R_3.txt, append, megabytes 100
DDL
MAP CSCNEW.TAB_CS_CALL_PICKUP, TARGET SRT_CREEN.TAB_CS_CALL_PICKUP, KEYCOLS (CALL_ID);
CACHEMGR virtual memory values (may have been adjusted)
CACHEBUFFERSIZE:                         64K
CACHESIZE:                              512M
CACHEBUFFERSIZE (soft max):               4M
CACHEPAGEOUTSIZE (normal):                4M
PROCESS VM AVAIL FROM OS (min):           1G
CACHESIZEMAX (strict force to disk):    881M
Database Version:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Database Language and Character Set:
NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK"
NLS_LANGUAGE     = "AMERICAN"
NLS_TERRITORY    = "AMERICA"
NLS_CHARACTERSET = "ZHS16GBK"
For further information on character set settings, please refer to user manual.
***********************************************************************
**                     Run Time Messages                             **
***********************************************************************
Opened trail file /opt/OGG/dirdat/U3000000 at 2011-12-02 16:36:58
MAP resolved (entry CSCNEW.TAB_CS_CALL_PICKUP):
  MAP CSCNEW.TAB_CS_CALL_PICKUP, TARGET SRT_CREEN.TAB_CS_CALL_PICKUP, KEYCOLS (CALL_ID);
Using following columns in default map by name:
  PICKUP_ID, CALL_ID, CALL_SERIAL, USER_ID, PICKUP_TIME, CALL_RESULT,
  FAIL_REASON, CALL_TIME, CALL_DURA, END_TIME
Using the following key columns for target table SRT_CREEN.TAB_CS_CALL_PICKUP: CALL_ID.
2011-12-02 16:36:58  WARNING OGG-00869  OCI Error ORA-01407: cannot update ("SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDAT
E "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" = :a2,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CAL
L_TIME" = :a7,"CALL_DURA" = :a8,"END_T>.
2011-12-02 16:36:58  WARNING OGG-01004  Aborted grouped transaction on 'SRT_CREEN.TAB_CS_CALL_PICKUP', Database error 1407 (OCI Error ORA-01407: cannot updat
e ("SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDATE "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" =
:a2,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CALL_TIME" = :a7,"CALL_DURA" = :a8,"END_T>).
2011-12-02 16:36:58  WARNING OGG-01003  Repositioning to rba 924 in seqno 0.
2011-12-02 16:36:59  WARNING OGG-01154  SQL error 1407 mapping CSCNEW.TAB_CS_CALL_PICKUP to SRT_CREEN.TAB_CS_CALL_PICKUP OCI Error ORA-01407: cannot update (
"SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDATE "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" = :a2
,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CALL_TIME" = :a7,"CALL_DURA" = :a8,"END_T>.
2011-12-02 16:36:59  WARNING OGG-01003  Repositioning to rba 924 in seqno 0.
***********************************************************************
*                   ** Run Time Statistics **                         *
***********************************************************************
Last record for the last committed transaction is the following:
___________________________________________________________________
Trail name :  /opt/OGG/dirdat/U3000000
Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)
UndoFlag   :     .  (x00)     BeforeAfter:     A  (x41)
RecLength  :   157 (x009d)    IO Time    : 2011-12-01 21:17:24.084108
IOType     :    15  (x0f)     OrigNode   :   255  (xff)
TransInd   :     .  (x03)     FormatType :     R  (x52)
SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)
AuditRBA   :       3225       AuditPos   : 42227728
Continued  :     N  (x00)     RecCount   :     1  (x01)
2011-12-01 21:17:24.084108 FieldComp          Len   157 RBA 924
Name: CSCNEW.TAB_CS_CALL_PICKUP
___________________________________________________________________
Reading /opt/OGG/dirdat/U3000000, current RBA 924, 0 records
Report at 2011-12-02 16:36:59 (activity since 2011-12-02 16:36:58)
From Table CSCNEW.TAB_CS_CALL_PICKUP to SRT_CREEN.TAB_CS_CALL_PICKUP:
       #                   inserts:         0
       #                   updates:         0
       #                   deletes:         0
       #                  discards:         1
DDL replication statistics:
                    Operations:         0
             Mapped operations:         0
           Unmapped operations:         0
              Other operations:         0
           Excluded operations:         0
                        Errors:         0
                Retried errors:         0
              Discarded errors:         0
                Ignored errors:         0
Last log location read:
     FILE:      /opt/OGG/dirdat/U3000000
     SEQNO:     0
     RBA:       924
     TIMESTAMP: 2011-12-01 21:17:24.084108
     EOF:       NO
     READERR:   0
2011-12-02 16:36:59  ERROR   OGG-01668  PROCESS ABENDING.
--发现奇怪现象,我2011-12-02早上过来检查这个,发现时间竟然显示2011-12-02 16:36:59,第一反应系统时间错误,继续检查
GGSCI (srtcreen) 2> info r_2
REPLICAT   R_2       Last Started 2011-12-01 21:09   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:05 ago)
Log Read Checkpoint  File /opt/OGG/dirdat/U2000000
                     2011-12-02 17:01:29.927591  RBA 6234
GGSCI (srtcreen) 3> exit
[oracle@srtcreen OGG]$ cd dirdat
[oracle@srtcreen dirdat]$ ll
total 396
-rw-rw-rw- 1 oracle oinstall      0 Dec  1 21:10 U1000000
-rw-rw-rw- 1 oracle oinstall   5984 Dec  2 05:36 U2000000
-rw-rw-rw- 1 oracle oinstall 392258 Dec  2 16:52 U3000000
[oracle@srtcreen dirdat]$ stat U3000000
  File: `U3000000'
  Size: 392258          Blocks: 776        IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 213844220   Links: 1
Access: (0666/-rw-rw-rw-)  Uid: (  501/  oracle)   Gid: (  501/oinstall)
Access: 2011-12-02 16:36:59.000000000 +0800
Modify: 2011-12-02 16:52:55.000000000 +0800
Change: 2011-12-02 16:52:55.000000000 +0800
###############查看源端数据库服务器时间#####################
[oracle@tykf ~]$ date
Fri Dec  2 08:50:10 CST 2011
[oracle@tykf ~]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.0.0 Build 078
Linux, x64, 64bit (optimized), Oracle 10 on Jul 28 2010 13:21:11
Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
GGSCI (tykf) 1> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT_1       00:00:00      00:00:05
EXTRACT     RUNNING     EXT_2       00:00:00      00:00:01
EXTRACT     RUNNING     EXT_3       00:00:00      00:00:05
EXTRACT     STOPPED     EXT_4       00:00:00      21:59:56
EXTRACT     STOPPED     EXT_5       00:00:00      21:59:28
EXTRACT     RUNNING     P_1         00:00:00      00:00:04
EXTRACT     RUNNING     P_2         00:00:00      00:00:04
EXTRACT     RUNNING     P_3         00:00:00      00:00:05
EXTRACT     STOPPED     P_4         00:00:00      21:56:42
EXTRACT     STOPPED     P_5         00:00:00      21:56:11
GGSCI (tykf) 2> info ext_3
EXTRACT    EXT_3     Last Started 2011-12-01 13:11   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2011-12-02 08:50:06  Seqno 3233, RBA 32267264
GGSCI (tykf) 3> info p_3
EXTRACT    P_3       Last Started 2011-12-01 13:11   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:00 ago)
Log Read Checkpoint  File /opt/OGG/dirdat/extract/A3000000
                     2011-12-02 08:50:15.000000  RBA 393705
--ext_3和p_3是目标端r_3的对应进程
#######################################################################

果然是系统时间错误,源端和目标端相差了近八个小时

二、更正目标端时间

[oracle@srtcreen dirdat]$ date
Fri Dec  2 16:55:55 CST 2011
[oracle@srtcreen OGG]$ su - root
Password:
[root@srtcreen ~]# date -s 08:58:20
Fri Dec  2  08:58:20 CST
[root@srtcreen ~]# clock -w
[root@srtcreen ~]# date
Fri Dec  2  08:58:28 CST
[root@srtcreen ~]# su - oracle
[oracle@srtcreen dirdat]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.1 OGGCORE_11.1.1.1.1_PLATFORMS_110729.1700
Linux, x64, 64bit (optimized), Oracle 10g on Jul 29 2011 19:43:29
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
GGSCI (srtcreen) 1> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     R_1         00:00:00      unknown
REPLICAT    RUNNING     R_2         00:00:00      unknown
REPLICAT    ABENDED     R_3         19:19:34      unknown
REPLICAT    STOPPED     R_4         00:00:00      11:54:31
REPLICAT    STOPPED     R_5         00:00:00      11:54:20
[oracle@srtcreen OGG]$ cd dirdat
[oracle@srtcreen dirdat]$ ll
total 412
-rw-rw-rw- 1 oracle oinstall      0 Dec  1 21:10 U1000000
-rw-rw-rw- 1 oracle oinstall   6485 Dec  2  2011 U2000000
-rw-rw-rw- 1 oracle oinstall 407519 Dec  2 09:04 U3000000

最新写到目标端的数据已经是当前修改时间(这个是系统时间,肯定会修改过来)
出现Time Since Chkpt unknown,处理方法见ogg中Time Since Chkpt显示unknown解决

三、重设r_3时间点

GGSCI (srtcreen) 7> alter r_3,begin 2011-12-02 09:00:00
REPLICAT altered.
GGSCI (srtcreen) 9> start r_3
Sending START request to MANAGER ...
REPLICAT R_3 starting
GGSCI (srtcreen) 10> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     R_1         00:00:00      00:00:05
REPLICAT    RUNNING     R_2         00:00:00      00:00:02
REPLICAT    ABENDED     R_3         unknown       00:00:00
REPLICAT    STOPPED     R_4         00:00:00      11:55:40
REPLICAT    STOPPED     R_5         00:00:00      11:55:29
GGSCI (srtcreen) 11> view report r_3
***********************************************************************
                 Oracle GoldenGate Delivery for Oracle
     Version 11.1.1.1.1 OGGCORE_11.1.1.1.1_PLATFORMS_110729.1700
   Linux, x64, 64bit (optimized), Oracle 10g on Sep 13 2011 21:33:03
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
                    Starting at 2011-12-02 09:09:31
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Fri Apr 2 14:58:14 EDT 2010, Release 2.6.18-194.el5
Node: srtcreen
Machine: x86_64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :    unlimited    unlimited
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited
Process id: 13629
Description:
***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
replicat r_3
ASSUMETARGETDEFS
HANDLECOLLISIONS
SETENV (NLS_LANG =AMERICAN_AMERICA.ZHS16GBK)
Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
userid it1ogg, password ********
--file for dicarded transaction --
discardfile /opt/OGG/discard/R_3.txt, append, megabytes 100
DDL
MAP CSCNEW.TAB_CS_CALL_PICKUP, TARGET SRT_CREEN.TAB_CS_CALL_PICKUP, KEYCOLS (CALL_ID);
CACHEMGR virtual memory values (may have been adjusted)
CACHEBUFFERSIZE:                         64K
CACHESIZE:                              512M
CACHEBUFFERSIZE (soft max):               4M
CACHEPAGEOUTSIZE (normal):                4M
PROCESS VM AVAIL FROM OS (min):           1G
CACHESIZEMAX (strict force to disk):    881M
Database Version:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Database Language and Character Set:
NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK"
NLS_LANGUAGE     = "AMERICAN"
NLS_TERRITORY    = "AMERICA"
NLS_CHARACTERSET = "ZHS16GBK"
For further information on character set settings, please refer to user manual.
***********************************************************************
**                     Run Time Messages                             **
***********************************************************************
Opened trail file /opt/OGG/dirdat/U3000000 at 2011-12-02 09:09:32
MAP resolved (entry CSCNEW.TAB_CS_CALL_PICKUP):
  MAP CSCNEW.TAB_CS_CALL_PICKUP, TARGET SRT_CREEN.TAB_CS_CALL_PICKUP, KEYCOLS (CALL_ID);
Using following columns in default map by name:
  PICKUP_ID, CALL_ID, CALL_SERIAL, USER_ID, PICKUP_TIME, CALL_RESULT,
  FAIL_REASON, CALL_TIME, CALL_DURA, END_TIME
Using the following key columns for target table SRT_CREEN.TAB_CS_CALL_PICKUP: CALL_ID.
2011-12-02 09:09:32  WARNING OGG-00869  OCI Error ORA-01407: cannot update ("SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDAT
E "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" = :a2,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CAL
L_TIME" = :a7,"CALL_DURA" = :a8,"END_T>.
2011-12-02 09:09:32  WARNING OGG-01004  Aborted grouped transaction on 'SRT_CREEN.TAB_CS_CALL_PICKUP', Database error 1407 (OCI Error ORA-01407: cannot updat
e ("SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDATE "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" =
:a2,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CALL_TIME" = :a7,"CALL_DURA" = :a8,"END_T>).
2011-12-02 09:09:32  WARNING OGG-01003  Repositioning to rba 375833 in seqno 0.
2011-12-02 09:09:32  WARNING OGG-01154  SQL error 1407 mapping CSCNEW.TAB_CS_CALL_PICKUP to SRT_CREEN.TAB_CS_CALL_PICKUP OCI Error ORA-01407: cannot update (
"SRT_CREEN"."TAB_CS_CALL_PICKUP"."PICKUP_ID") to NULL (status = 1407), SQL <UPDATE "SRT_CREEN"."TAB_CS_CALL_PICKUP" SET "PICKUP_ID" = :a0,"CALL_SERIAL" = :a2
,"USER_ID" = :a3,"PICKUP_TIME" = :a4,"CALL_RESULT" = :a5,"FAIL_REASON" = :a6,"CALL_TIME" = :a7,"CALL_DURA" = :a8,"END_T>.
2011-12-02 09:09:32  WARNING OGG-01003  Repositioning to rba 375833 in seqno 0.
Source Context :
  SourceModule            : [er.main]
  SourceID                : [/scratch/angorant/view_storage/angorant_ogg_12978807_x64/oggcore/OpenSys/src/app/er/rep.c]
  SourceFunction          : [take_rep_err_action]
  SourceLine              : [16134]
  ThreadBacktrace         : [8] elements
                          : [/opt/OGG/replicat(CMessageContext::AddThreadContext()+0x26) [0x5ef8b6]]
                          : [/opt/OGG/replicat(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x7b2) [0x5e6382]]
                          : [/opt/OGG/replicat(_MSG_ERR_MAP_TO_TANDEM_FAILED(CSourceContext*, DBString<777> const&, DBString<777> const&, CMessageFactory::Me
ssageDisposition)+0x9b) [0x5c4bcb]]
                          : [/opt/OGG/replicat [0x81ac2f]]
                          : [/opt/OGG/replicat [0x8f73e2]]
                          : [/opt/OGG/replicat(main+0x84b) [0x50764b]]
                          : [/lib64/libc.so.6(__libc_start_main+0xf4) [0x3e2f41d994]]
                          : [/opt/OGG/replicat(__gxx_personality_v0+0x1da) [0x4e3c2a]]
2011-12-02 09:09:32  ERROR   OGG-01296  Error mapping from CSCNEW.TAB_CS_CALL_PICKUP to SRT_CREEN.TAB_CS_CALL_PICKUP.
***********************************************************************
*                   ** Run Time Statistics **                         *
***********************************************************************
Last record for the last committed transaction is the following:
___________________________________________________________________
Trail name :  /opt/OGG/dirdat/U3000000
Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)
UndoFlag   :     .  (x00)     BeforeAfter:     A  (x41)
RecLength  :   157 (x009d)    IO Time    : 2011-12-02 11:52:49.559112
IOType     :    15  (x0f)     OrigNode   :   255  (xff)
TransInd   :     .  (x03)     FormatType :     R  (x52)
SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)
AuditRBA   :       3233       AuditPos   : 8194064
Continued  :     N  (x00)     RecCount   :     1  (x01)
2011-12-02 11:52:49.559112 FieldComp          Len   157 RBA 375833
Name: CSCNEW.TAB_CS_CALL_PICKUP
___________________________________________________________________
Reading /opt/OGG/dirdat/U3000000, current RBA 375833, 0 records
Report at 2011-12-02 09:09:32 (activity since 2011-12-02 09:09:32)
From Table CSCNEW.TAB_CS_CALL_PICKUP to SRT_CREEN.TAB_CS_CALL_PICKUP:
       #                   inserts:         0
       #                   updates:         0
       #                   deletes:         0
       #                  discards:         1
DDL replication statistics:
                    Operations:         0
             Mapped operations:         0
           Unmapped operations:         0
              Other operations:         0
           Excluded operations:         0
                        Errors:         0
                Retried errors:         0
              Discarded errors:         0
                Ignored errors:         0
Last log location read:
     FILE:      /opt/OGG/dirdat/U3000000
     SEQNO:     0
     RBA:       375833
     TIMESTAMP: 2011-12-02 11:52:49.559112
     EOF:       NO
     READERR:   0
2011-12-02 09:09:32  ERROR   OGG-01668  PROCESS ABENDING.
--这里可以看出我重设的当前的时间点对应的io time为2011-12-02 11:52:49.559112,而现在尚未到这个时间,进程启动失败
GGSCI (srtcreen) 2> alter r_3,begin 2011-12-02 18:00:00
REPLICAT altered.
--重设时间到今天早上我重设时间之前的错误时间之后
GGSCI (srtcreen) 3> start r_3
Sending START request to MANAGER ...
REPLICAT R_3 starting
GGSCI (srtcreen) 4> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     R_1         00:00:00      00:00:06
REPLICAT    RUNNING     R_2         00:00:00      00:00:01
REPLICAT    RUNNING     R_3         unknown       00:00:08
REPLICAT    RUNNING     R_4         00:00:00      00:00:09
REPLICAT    RUNNING     R_5         00:00:00      00:00:09
GGSCI (srtcreen) 5> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     R_1         00:00:00      00:00:09
REPLICAT    RUNNING     R_2         00:00:00      00:00:03
REPLICAT    RUNNING     R_3         00:00:00      00:00:00
REPLICAT    RUNNING     R_4         00:00:00      00:00:02
REPLICAT    RUNNING     R_5         00:00:00      00:00:01
GGSCI (srtcreen) 6> stats r_3
Sending STATS request to REPLICAT R_3 ...
No active replication maps
DDL replication statistics:
*** Total statistics since replicat started     ***
        Operations                                   0.00
        Mapped operations                            0.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
--进程启动,工作正常

三、补充说明
1、部署ogg前需要核对两边时间是否相同,为了避免不必要的麻烦,建议配置ntp同步时间
2、这里因为我们这要求该同步上线无严格时间要求,所以通过重设r_3时间点实现工作正常,如果事情比较紧急,建议删除trail文件,重建pump和replicat进程
3、这里说明ogg同步也还不是和时间一点关系都没有

OGG Troubleshooting TCP/IP Errors In Open Systems

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:OGG Troubleshooting TCP/IP Errors In Open Systems

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

经常和ogg打交道的同仁们,WARNING OGG-01223 TCP/IP error 111这个错误肯定不陌生,今天发现MOS上关于WARNING OGG-01223 TCP/IP error 111错误处理思路及其方案的文档写的非常好,看了之后深受启发,贡献出来给大家
WARNING OGG-01223 TCP/IP error 111
http://www.xifenfei.com/wp-content/uploads/2011/11/WARNING_OGG-01223_TCPIP_error_111.pdf

ERROR OGG-01224 TCP/IP error 110 (Connection timed out); retries exceeded.

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:ERROR OGG-01224 TCP/IP error 110 (Connection timed out); retries exceeded.

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

Cause

This is generally due due to basic issues like:
* The remote manager process is not running or is running with incorrect port number
* The RMTHOST parameter in the pump extract is not configured correctly.
In other cases, the issue could be due to firewalls that forbid the connection,
blocking certain ports or processes.
This is generally seen when there is a firewall between the source and target machine and
either the ports are not open or just the manager port is open.

Solution

The Extract, Replicat and Ggsci processes use ports normally starting at port 7840 and ascend sequentially.
The ggsci command 'send manager getportinfo detail ' will retrieve the current list of ports that have been
allocated by Manager and their corresponding process IDs.
If you have some port restrictions, then you could use the DYNAMICPORTLIST with some range so that the
collector process will allocate the ports from that range.
In general to overcome this issue, we could do something like below
1. Change the target manager parameter file to use something like the following
port 7809
dynamicportlist 7810-7820
2. Stop and start the manager
3. Open ports 7809 through 7820 in the firewall
4. Re-start the source pump
The port range used in dynamicportlist(7810-7820) and the manager port 7809 is just an example.
You can define your own ports there and have them open.

OGG Extract Pump abended with ERROR OGG-01224 TCP/IP error 110 (Connection timed out); retries exceeded

ogg中Time Since Chkpt显示unknown解决

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:ogg中Time Since Chkpt显示unknown解决

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

1、异常现象

[oracle@localhost ~]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.0.0 Build 078
Linux, x64, 64bit (optimized), Oracle 10 on Jul 28 2010 13:21:11
Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
GGSCI (localhost.localdomain) 1> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT-ECP     00:00:00      unknown
EXTRACT     RUNNING     EXT-EDS     00:00:00      unknown
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      unknown

2、尝试关闭异常进程重启

GGSCI (localhost.localdomain) 2> stop *
Sending STOP request to EXTRACT EXT-ECP ...
ERROR: sending message to EXTRACT EXT-ECP (Timeout waiting for message).
Sending STOP request to EXTRACT EXT-EDS ...
ERROR: sending message to EXTRACT EXT-EDS (Timeout waiting for message).
Sending STOP request to EXTRACT EXT-XZ ...
ERROR: sending message to EXTRACT EXT-XZ (Timeout waiting for message).
Sending STOP request to EXTRACT P-EDS ...
ERROR: sending message to EXTRACT P-EDS (Timeout waiting for message).
Sending STOP request to EXTRACT P-XZ ...
ERROR: sending message to EXTRACT P-XZ (Timeout waiting for message).
Sending STOP request to REPLICAT REP-BOS ...
ERROR: sending message to REPLICAT REP-BOS (Timeout waiting for message).
GGSCI (localhost.localdomain) 3> stop mgr!
Sending STOP request to MANAGER ...
Request processed.
Manager stopped.
GGSCI (localhost.localdomain) 4> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     STOPPED
EXTRACT     RUNNING     EXT-ECP     00:00:00      unknown
EXTRACT     RUNNING     EXT-EDS     00:00:00      unknown
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      unknown
GGSCI (localhost.localdomain) 5> kill EXT-ECP
ERROR: Manager not currently running.
GGSCI (localhost.localdomain) 6> kill EXT-EDS
ERROR: Manager not currently running.
GGSCI (localhost.localdomain) 7> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     STOPPED
EXTRACT     RUNNING     EXT-ECP     00:00:00      unknown
EXTRACT     RUNNING     EXT-EDS     00:00:00      unknown
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      unknown
GGSCI (localhost.localdomain) 8> exit
--使用stop 进程,stop mgr,kill 进程都不能正常关闭这些进程

3、系统系统级别kill相关ogg进程

[oracle@localhost OGG]$ ps -ef|grep /opt/OGG
oracle    7479     1  0 Nov10 ?        00:03:31 /opt/OGG/extract PARAMFILE /opt/OGG/dirprm/ext-ecp.prm REPORTFILE /opt/OGG/dirrpt/EXT-ECP.rpt PROCESSID EXT-ECP USESUBDIRS
oracle    7480     1  0 Nov10 ?        00:02:30 /opt/OGG/extract PARAMFILE /opt/OGG/dirprm/ext-eds.prm REPORTFILE /opt/OGG/dirrpt/EXT-EDS.rpt PROCESSID EXT-EDS USESUBDIRS
oracle    7482     1  0 Nov10 ?        00:03:07 /opt/OGG/extract PARAMFILE /opt/OGG/dirprm/ext-xz.prm REPORTFILE /opt/OGG/dirrpt/EXT-XZ.rpt PROCESSID EXT-XZ USESUBDIRS
oracle    7483     1  0 Nov10 ?        00:00:01 /opt/OGG/extract PARAMFILE /opt/OGG/dirprm/p-eds.prm REPORTFILE /opt/OGG/dirrpt/P-EDS.rpt PROCESSID P-EDS USESUBDIRS
oracle    7485     1  0 Nov10 ?        00:00:03 /opt/OGG/replicat PARAMFILE /opt/OGG/dirprm/rep-bos.prm REPORTFILE /opt/OGG/dirrpt/REP-BOS.rpt PROCESSID REP-BOS USESUBDIRS
oracle    7518     1  0 Nov10 ?        00:00:01 ./server -p 7847 -k -l /opt/OGG/ggserr.log
oracle    7677     1  0 Nov10 ?        00:00:15 /opt/OGG/extract PARAMFILE /opt/OGG/dirprm/p-xz.prm REPORTFILE /opt/OGG/dirrpt/P-XZ.rpt PROCESSID P-XZ USESUBDIRS
oracle   25261 25112  0 12:48 pts/1    00:00:00 grep /opt/OGG
[oracle@localhost OGG]$ kill -9 7479 7480 7482 7483 7485  7518 7677
[oracle@localhost OGG]$ ps -ef|grep /opt/OGG
oracle   25264 25112  0 12:48 pts/1    00:00:00 grep /opt/OGG

4、重启所有ogg进程

[oracle@localhost OGG]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.0.0 Build 078
Linux, x64, 64bit (optimized), Oracle 10 on Jul 28 2010 13:21:11
Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
GGSCI (localhost.localdomain) 1> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     STOPPED
EXTRACT     ABENDED     EXT-ECP     00:00:00      unknown
EXTRACT     ABENDED     EXT-EDS     00:00:00      unknown
EXTRACT     ABENDED     EXT-XZ      00:00:00      unknown
EXTRACT     ABENDED     P-EDS       00:00:00      unknown
EXTRACT     ABENDED     P-XZ        00:00:00      unknown
REPLICAT    ABENDED     REP-BOS     00:00:00      unknown
--进程状态还是异常
GGSCI (localhost.localdomain) 2> start mgr
Manager started.
GGSCI (localhost.localdomain) 3> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT-ECP     00:00:00      unknown
EXTRACT     RUNNING     EXT-EDS     00:00:00      unknown
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      unknown
--进程起来了,但是Time Since Chkpt还是不正确
GGSCI (localhost.localdomain) 4> stop ext-ecp
Sending STOP request to EXTRACT EXT-ECP ...
Request processed.
GGSCI (localhost.localdomain) 5> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     STOPPED     EXT-ECP     unknown       00:00:02
EXTRACT     RUNNING     EXT-EDS     00:00:00      unknown
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      unknown
--关闭EXT-ECP测试,状态正常
GGSCI (localhost.localdomain) 6> start ext-ecp
Sending START request to MANAGER ...
EXTRACT EXT-ECP starting
GGSCI (localhost.localdomain) 7> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT-ECP     unknown       00:00:14
EXTRACT     RUNNING     EXT-EDS     00:00:00      unknown
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      unknown
--Lag异常,等待恢复
GGSCI (localhost.localdomain) 8> stop ext-eds
Sending STOP request to EXTRACT EXT-EDS ...
Recovery is not complete.  This normal stop will wait and checkpoint recovery's
work when recovery has finished. To force Extract to stop now,
use the SEND EXTRACT EXT-EDS, FORCESTOP command.
--因为恢复没有完成导致该提示,可以忽略,等待
GGSCI (localhost.localdomain) 9> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT-ECP     unknown       00:00:02
EXTRACT     STOPPED     EXT-EDS     01:51:12      00:00:01
EXTRACT     RUNNING     EXT-IM      00:00:00      1059:44:26
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      unknown
GGSCI (localhost.localdomain) 10> start ext-eds
Sending START request to MANAGER ...
EXTRACT EXT-EDS starting
GGSCI (localhost.localdomain) 11> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT-ECP     99:53:02      00:00:01
EXTRACT     RUNNING     EXT-EDS     01:51:12      00:00:10
EXTRACT     RUNNING     EXT-XZ      00:00:00      unknown
EXTRACT     RUNNING     P-EDS       00:00:00      unknown
EXTRACT     RUNNING     P-XZ        00:00:00      unknown
REPLICAT    RUNNING     REP-BOS     00:00:00      00:00:00
GGSCI (localhost.localdomain) 12> stop ext-xz
Sending STOP request to EXTRACT EXT-XZ ...
Request processed.
GGSCI (localhost.localdomain) 13> start ext-xz
Sending START request to MANAGER ...
EXTRACT EXT-XZ starting
GGSCI (localhost.localdomain) 15> stop p-eds
Sending STOP request to EXTRACT P-EDS ...
Request processed.
GGSCI (localhost.localdomain) 16> start p-eds
Sending START request to MANAGER ...
EXTRACT P-EDS starting
GGSCI (localhost.localdomain) 17> stop p-xz
Sending STOP request to EXTRACT P-XZ ...
Request processed.
GGSCI (localhost.localdomain) 18> start p-xz
Sending START request to MANAGER ...
EXTRACT P-XZ starting
GGSCI (localhost.localdomain) 19> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
EXTRACT     RUNNING     EXT-ECP     00:00:00      00:00:01
EXTRACT     RUNNING     EXT-EDS     00:00:00      00:00:10
EXTRACT     RUNNING     EXT-IM      00:00:00      1059:45:28
EXTRACT     RUNNING     EXT-XZ      00:00:00      00:00:07
EXTRACT     RUNNING     P-EDS       00:00:00      00:00:04
EXTRACT     RUNNING     P-XZ        00:00:00      00:00:05
REPLICAT    RUNNING     REP-BOS     00:00:00      00:00:05
--重启所有异常进程,ogg工作正常
GGSCI (localhost.localdomain) 20>

5、总结处理步骤
强制关闭mgr,系统级别kill相关ogg进程,开启ogg主进程,重启相关进程

ggsci: error while loading shared libraries

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:ggsci: error while loading shared libraries

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

在部署goldengate过程中发现如下错误:
[oracle@localhost OGG]$ ggsci
ggsci: error while loading shared libraries: /opt/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1: cannot restore segment prot after reloc: Permission denied
查找资料,没有专门说ogg安装这个错误,是SELinux启用导致,但是有很多其他程序执行过程中报类此错误是有此导致,那么我抱着尝试的态度实验看看:
1、查看SELinux是否被关闭
[oracle@localhost tmp]$ more /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
说明已经关闭。那就奇怪了,既然已经闭关了那为什么还不行?于是我怀疑,是不是有人只是修改了SELINUX=disabled,没有重启系统或者使用命令使其生效导致。
2、查看SELINUX修改是否生效
[root@localhost ~]# getenforce
Enforcing
果然修改没有生效
3、使SELINUX生效
[root@localhost ~]# setenforce 0
再次查询,现在已经生效
[root@localhost ~]# getenforce
Permissive
4、然后启动ggsci
[oracle@localhost ~]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.1 OGGCORE_11.1.1.1.1_PLATFORMS_110729.1700
Linux, x64, 64bit (optimized), Oracle 10g on Jul 29 2011 19:43:29
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.