Upgrade Goldengate 11.1.1.1.2 to 11.2.1.0.1

Source: Internet
Author: User

Upgrade Goldengate 11.1.1.1.2 to 11.2.1.0.1

Configuration environment:

Source:
OGG: 11.2.1.0.1
Name: bkjia1

Target:
OGG: 11.1.1.1.2
Name: bkjia2

Upgrade Target to the same version as the source.

Backup Target ogg installation directory:
[Root @ bkjia2/] # cp-R ogg // database/

Check whether the Source extraction process is active:

GGSCI (bkjia1) 6> send extract ext1 logend

Sending LOGEND request to EXTRACT EXT1...
YES.


GGSCI (bkjia1) 7> send extract ext2 logend

Sending LOGEND request to EXTRACT EXT2...
YES.

If no data is extracted or transmitted, stop the process.
Check whether the Target replication is active:

GGSCI (bkjia2) 2> send replicat rep1 status

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

Stop all processes:

Source:
GGSCI (bkjia1) 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 (bkjia2) 6> info all

Program Status Group Lag Time Since Chkpt

MANAGER STOPPED
Replicat stopped REP1 00:00:00

Target:
Delete the content in the previous ogg installation directory and decompress the new version of ogg.

[Ogg @ bkjia2 ogg] $./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 oggcore_11.2.1.0.20.platforms_120423.0230_fbo
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

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

 

GGSCI (bkjia2) 1> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER STOPPED


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

GGSCI (bkjia2) 3> upgrade checkpointtable ogg. checkpoint

Successfully upgraded checkpoint table ogg. checkpoint.

In the target database:

Installing the DDL objects:
1. Run the @ marker_setup. SQL script. This script installsupport 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 INSTALLThe 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.

Configure 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 (bkjia2) 1> create subdirs
GGSCI (bkjia2) 1> view param./GLOBALS
GGSCHEMA ogg
CHECKPOINTTABLE ogg. checkpoint
GGSCI (bkjia2) 2> add replicat rep1, exttrail/ogg/dirdat/sa, checkpointtable ogg. checkpoint
GGSCI (bkjia2) 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 bkjia. *, TARGET bkjia .*;

Source:
Remove the Version Control Parameter format release.

GGSCI (bkjia1) 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 'processed '&
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 2 H, CHECKINTERVAL 3 M
-- Exttrail./dirdat/sa, format release 11.1
Exttrail./dirdat/sa
Fetchoptions nousesnapshot, FETCHPKUPDATECOLS, MISSINGROW REPORT
Table bkjia .*;


GGSCI (bkjia1) 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 bkjia .*;

Due to version issues, the previous trail file will be unavailable, forcing the extraction process to write a new trail file:

GGSCI (bkjia1) 47> alter extract ext1 etrolover

GGSCI (bkjia1) 25> alter extract ext2 etrolover

01:26:06 INFO OGG-01520 rolover completed MED. 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 (bkjia1) 39> alter extract ext2, EXTSEQNO 1, EXTRBA 0
EXTRACT altered.


GGSCI (bkjia1) 40> start ext2

Sending START request to MANAGER...
EXTRACT EXT2 starting


GGSCI (bkjia1) 41> info ext2

EXTRACT EXT2 Last Started 2015-03-06 0: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 (bkjia2) 4> alter REPLICAT rep1, EXTSEQNO 1, EXTRBA 0
REPLICAT altered.


GGSCI (bkjia2) 5> start rep1

Sending START request to MANAGER...
REPLICAT REP1 starting


GGSCI (bkjia2) 6> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
Replicat running REP1 00:00:00


GGSCI (bkjia2) 7> info rep1

REPLICAT REP1 Last Started 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

The ogg target end has been upgraded since then.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.