当前位置:  数据库>oracle

升级 Goldengate 11.1.1.1.2 to 11.2.1.0.1

    来源: 互联网  发布时间:2017-06-15

    本文导语: 配置环境: Source:OGG:11.2.1.0.1Name:linuxidc1 Target:OGG:11.1.1.1.2Name:linuxidc2 现在将Target升级到与源端一样的版本 备份Target ogg安装目录:[root@linuxidc2 /]# cp -R ogg/ /database/ 查看Source端抽取进程是否active: GGSCI (linuxidc1) 6> send extract ext1 loge...

配置环境:

Source:
OGG:11.2.1.0.1
Name:linuxidc1

Target:
OGG:11.1.1.1.2
Name:linuxidc2

现在将Target升级到与源端一样的版本

备份Target ogg安装目录:
[root@linuxidc2 /]# cp -R ogg/ /database/

查看Source端抽取进程是否active:

GGSCI (linuxidc1) 6> send extract ext1 logend

Sending LOGEND request to EXTRACT EXT1 ...
YES.


GGSCI (linuxidc1) 7> send extract ext2 logend

Sending LOGEND request to EXTRACT EXT2 ...
YES.

发现没有抽取和传输数据,可以停止进程
查看Target端复制进行是否active:

GGSCI (linuxidc2) 2> send replicat rep1 status

Sending STATUS request to REPLICAT REP1 ...
  Current status: At EOF
  Sequence #: 3
  RBA: 2434
  0 records in current transaction

停止所有进程:

Source:
GGSCI (linuxidc1) 13> info all

Program    Status      Group      Lag at Chkpt  Time Since Chkpt

MANAGER    STOPPED                                         
EXTRACT    STOPPED    EXT1        00:00:00      00:01:35 
EXTRACT    STOPPED    EXT2        00:00:00      00:01:32


Target:
GGSCI (linuxidc2) 6> info all

Program    Status      Group      Lag          Time Since Chkpt

MANAGER    STOPPED                                         
REPLICAT    STOPPED    REP1        00:00:00      00:01:26 

Target:
删除以前ogg安装目录中的内容,将新版本的ogg解压在里面

[ogg@linuxidc2 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, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

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

 

GGSCI (linuxidc2) 1> info all

Program    Status      Group      Lag at Chkpt  Time Since Chkpt

MANAGER    STOPPED                                         


GGSCI (linuxidc2) 2> dblogin userid ogg,password ogg;
Successfully logged into database.

GGSCI (linuxidc2) 3> upgrade checkpointtable ogg.checkpoint

Successfully upgraded checkpoint table ogg.checkpoint.

在target数据库中:

Installing the DDL objects:
1、Run the @marker_setup.sql script. This script installs support for the Oracle GoldenGate
marker system, which is required for DDL support. You will be prompted for the name
of the Oracle GoldenGate schema.
drop trigger ggs_ddl_trigger_before;
grant create table,create view,create sequence to ogg;
2、Run the @ddl_setup.sql script  Script that installs the Oracle GoldenGate DDL extraction and
replication objects. (Oracle installations)
3、Run the @role_setup.sql script. This script drops and creates the role needed for DDL
synchronization. It grants DML permissions on the Oracle GoldenGate DDL objects
4、Grant the role to all Oracle GoldenGate Extract users. You may need to make multiple
grants if the processes have different user names.
Run the @ddl_enable.sql script to enable the DDL trigger.
5、To improve the performance of the DDL trigger, make the ddl_pin script part of the database
startup. It must be invoked with the Oracle GoldenGate DDL user name, as in:
@?/rdbms/admin/dbmspool.sql
SQL> @ddl_pin ogg
To improve the performance of the DDL trigger
This script pins the PL/SQL package that is used by the trigger into memory. If executing
this script from SQL*Plus, connect as SYSDBA from the Oracle GoldenGate home directory.
This script relies on the Oracle dmbs_shared_pool system package, so install that package
before using ddl_pin.

配置Target:

view param mgr
port 7839
DYNAMICPORTLIST 7840-7914
USERID ogg,PASSWORD ogg
AUTORESTART REPLICAT *,RETRIES 5,WAITMINUTES 3
PURGEOLDEXTRACTS ./DIRDAT/*,MINKEEPDAYS 3
PURGEDDLHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10,FREQUENCYMINUTES 30
PURGEMARKERHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45

GGSCI (linuxidc2) 1>  create subdirs
GGSCI (linuxidc2) 1>  view param ./GLOBALS
GGSCHEMA ogg
CHECKPOINTTABLE ogg.checkpoint
GGSCI (linuxidc2) 2>  add replicat rep1,exttrail /ogg/dirdat/sa, checkpointtable ogg.checkpoint
GGSCI (linuxidc2) 19> edit param rep1

REPLICAT rep1
ASSUMETARGETDEFS
USERID ogg, PASSWORD ogg
discardfile ./dirdat/rep1_discard.txt,append,megabytes 5
DDL INCLUDE MAPPED
DDLOPTIONS REPORT
--BATCHSQL
DBOPTIONS DEFERREFCONST
DBOPTIONS LOBWRITESIZE 102400
HANDLECOLLISIONS
DDLERROR DEFAULT DISCARD RETRYOP MAXRETRIES 5 RETRYDELAY 20
--grouptransops 1
--maxtransops 1
APPLYNOOPUPDATES
MAP linuxidc.*, TARGET linuxidc.*;

Source:
将版本控制参数 format release去掉

GGSCI (linuxidc1) 44> view param ext1

EXTRACT EXT1
setenv ( NLS_LANG = AMERICAN_AMERICA.ZHS16GBK )
USERID ogg,PASSWORD ogg
DDL &
INCLUDE MAPPED OBJTYPE 'TABLE' &
INCLUDE MAPPED OBJTYPE 'IDNEX' &
INCLUDE MAPPED OBJTYPE 'SEQUENCE' &
INCLUDE MAPPED OBJTYPE 'VIEW' &
INCLUDE MAPPED OBJTYPE 'PROCEDURE' &
INCLUDE MAPPED OBJTYPE 'FUNCTION' &
INCLUDE MAPPED OBJTYPE 'PACKAGE' &
INCLUDE MAPPED OBJTYPE 'MATERIALIZED VIEW' &
EXCLUDE OPTYPE COMMENT
DDLOPTIONS ADDTRANDATA NOCROSSRENAME REPORT
REPORTCOUNT EVERY 1 MINUTES,RATE
DISCARDFILE ./dirrpt/EXTSA.DSC,APPEND,MEGABYTES 1024
THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 60000 IOLATENCY 60000
DBOPTIONS ALLOWUNUSEDCOLUMN
WARNLONGTRANS 2H,CHECKINTERVAL 3M
--exttrail ./dirdat/sa,format release 11.1
exttrail ./dirdat/sa
FETCHOPTIONS NOUSESNAPSHOT,FETCHPKUPDATECOLS,MISSINGROW REPORT
table linuxidc.*;


GGSCI (linuxidc1) 45> view param ext2

EXTRACT EXT2
passthru
RMTHOST 192.168.56.61,MGRPORT 7839,COMPRESS
--RMTTRAIL ./dirdat/sa,format release 11.1
RMTTRAIL ./dirdat/sa
table linuxidc.*;

因为版本问题,以前trail文件将不可用,迫使抽取进程写一个新的trail文件:

GGSCI (linuxidc1) 47> alter extract ext1 etrollover

GGSCI (linuxidc1) 25> alter extract ext2 etrollover

2015-03-06 01:26:06  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
EXTRACT altered.

start mgr
start ext1

GGSCI (linuxidc1) 39> alter extract  ext2, EXTSEQNO 1,  EXTRBA 0
EXTRACT altered.


GGSCI (linuxidc1) 40> start ext2

Sending START request to MANAGER ...
EXTRACT EXT2 starting


GGSCI (linuxidc1) 41> info ext2

EXTRACT    EXT2      Last Started 2015-03-06 01:46  Status RUNNING
Checkpoint Lag      00:00:00 (updated 00:00:10 ago)
Log Read Checkpoint  File /ogg/dirdat/sa000001
                    First Record  RBA 0


Target:
GGSCI (linuxidc2) 4> alter REPLICAT rep1, EXTSEQNO 1,  EXTRBA 0
REPLICAT altered.


GGSCI (linuxidc2) 5> start rep1

Sending START request to MANAGER ...
REPLICAT REP1 starting


GGSCI (linuxidc2) 6> info all

Program    Status      Group      Lag at Chkpt  Time Since Chkpt

MANAGER    RUNNING                                         
REPLICAT    RUNNING    REP1        00:00:00      00:00:08 


GGSCI (linuxidc2) 7> info rep1

REPLICAT  REP1      Last Started 2015-03-06 01:43  Status RUNNING
Checkpoint Lag      00:00:00 (updated 00:00:00 ago)
Log Read Checkpoint  File /ogg/dirdat/sa000001
                    First Record  RBA 0

start mgr
start rep1

自此ogg目标端升级成功


    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Ubuntu系统安装及升级命令
  • 谁升级过rpm程序本身?我升级失败,现在只能通过源代码方式升级了~~~
  • CentOS 6内核升级:下载编译启用新内核版本详细过程
  • linux为什么要升级内核?升级内核有何作用?
  • CentOS 6.5 下载地址及如何升级内核(kernel)版本到 3.10.28
  • 我打算用yum来进行redhat一路升级到FC5,结果内核不升级
  • 必看!程序员升级之路,看了可以少走很多弯路
  • 升级gaim,有一配置也要升级?
  • 升级linux2.6的内核,还需要升级mkinitrd吗?
  • redhat8.0的安装----升级现有系统----每升级一次,grub里就多一条选择,为什么?
  • redhat它的内核如何升级及在哪儿下载可以升级的内核?
  • Red Hat linux 9 内核升级 2.4.480------>2.6.6,升级前要作哪些系统备份?
  • 我的redhat as 2.1想升级内核,请问具体该怎么做?现内核版本为2.4.9-e3,想升级为2.4.9-e系列的最新版本
  • GNOME2.4发布,但是如何升级啊?是一个一个软件包升级吗??
  • 服务器的升级策略问题,大家升级过哪些部件?
  • php-5.2.8升级到5.3.2有什么特别注意的地方吗,我在测试机上直接FU盖旧的目录,也没报错,但是从5.2升到5.3算是个大幅度的升级了,不出问题反倒不安
  • 极度郁闷中~!各位大虾,请帮帮忙!!我把我的ie5升级到了ie6,并上微软网站升级了一下系统!我的机子上的jsp网站就一个也运行不了了!郁
  • Red Hat linux 9 内核升级 2.4.480------>2.6.6,升级完之后系统不能启动,这是为什么?
  • red hat 升级问题
  • 怎样写升级程序?!!!!
  • 在fc5中怎么升级内核?


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3