Goldengate Upgrade Target (Replicat-side) upgrade

Source: Internet
Author: User

From the Red and Black Alliance Goldengate upgrade Target (Replicat-side upgrade

The reason to upgrade the Replicat side is that the target Ogg software version is different from the source-side Ogg software version, in the actual production application, often found that the replicat-side transaction loss situation, so, the target of the Ogg software to upgrade to the source of the same software version ogg.

1, pre-upgrade environmental conditions

Source-side Ogg version 11.2.1.0.1

Target Ogg version 11.1.1.1.2

Before upgrading, in order to resolve the source side, the target side of the Ogg version inconsistency is not normal synchronization problem, the source side to extract the tail file format, the format Release 11.1 formatted conversion command, in the extract and data pump process are configured, configured as follows:

Exttrail./DIRDAT/TR, Format release 11.1

2. Upgrade target

Upgrade the target Ogg version from 11.1.0.2 to the 11.2.0.1 version consistent with the source.

3, pre-upgrade Preparation 3.1 Stop the extract and datapump processes on the source side

Ggsci>stop exttr

Ggsci>stop DPETR

3.2 Stopping the Replicat and MGR processes on the target side

Ggsci>stop reptr

Ggsci>stop Mgr

3.3 Removing the format release parameter from the extract and datapump processes

Since the Formatrelease 11.1 keyword is configured in the extract and datadump processes, the configuration needs to be canceled after the target-side upgrade, but canceling the configuration does not just remove the simple thing from the configuration file, but also requires a etrollover operation of the process , the following error is reported when the process starts:

ERROR OGG-01416 File./dirdat/tr000008, with Format RELEASE 10.4/11.1, does not match

Current format specification of RELEASE 11.2.Modify The parameter file to specify format RELEASE 10.4/11.1

or issueetrollover prior to restart.

How to do this: in Ogg with edit paramsextract_name and edit params datadump_name the way into the modification (Specific operation: slightly).

3.4 To extract and datadump process etrollover operation

Because both extract and datadump have modified the format release information, it is necessary to do etrollover operations

Ggsci>alter Extract Exttretrollover

Ggsci>alter Extract Dpetretrollover

3.5 Modifying the source-side DataPump process extseqno and Extrba numbers

Because the extract-exttr process on the source side performs the etrollover operation, the Extseqno and Extrba of the process are reset to the No. 0 extseqno of the next Extrba number, And DataPump did not know that the extract process took place this change, still watch in extract etrollover before the extseqno and Extrba, and will never wait until this extseqno there are new RBA changes, It is impossible to transfer the extract data to the target side.

Therefore, after the extract process etrollover, you need to use "Alterextract group_name extseqno X, extrba 0" command, reset the checkpoint location, The datadump process can continue to pass data to the remote side normally.

3.5.1 Record the extseqno and Extrba numbers after the exttr process Etrollover

ggsci> Info exttr, detail

Ggsci (Server1) 140> info exttr, detail

EXTRACT exttr Initialized 2015-01-30 13:02 Status STOPPED

Checkpoint Lag 00:00:00 (updated 00:00:27 ago)

Log Read Checkpoint Oracle Redo Logs

2015-01-30 13:18:27 seqno 365, RBA 17822208

SCN 0.17726669 (17726669)

Target Extract Trails:

Remote Trail Name seqno RBA Max MB

./DIRDAT/TR 4 0 100

Extract Source Begin End

......

3.5.2 Modifying the extseqno and Extrba numbers of the datadump process

Ggsci>alter extract Dpetr extseqno 4,extrba 0

3.6 Identify the extseqno and Extrba of target extracttrails after Datadump process Etrollover

Ggsci (Server1) 160> info dpetr, detail

EXTRACT dpetr Initialized 2015-01-30 13:03 Status STOPPED

Checkpoint Lag 00:00:00 (updated 00:02:10 ago)

Log Read Checkpoint File./dirdat/tr000003

2015-01-30 13:18:18.000000 RBA 48953966

Target Extract Trails:

Remote Trail Name seqno RBA Max MB

./DIRDAT/TR 4 0 100

......

3.7 To backup the Ogg directory on the target side

#cp –ra/u01/ogg/u01/ogg_backup

3.8 Record The checkpoint information of the target end Replicat

Ggsci (server2) 1> info reptr , Showch

 

Replicat reptr last Started 2015-01-30 13:03 Status STOPPED

Checkpoint Lag 00:00:00 (up Dated 00:10:36 ago)

Log Read Checkpoint File./dirdat/tr000003

2015-01-30 13:18:16.296427 RBA 48953996

 

 

Current Checkpoint Detail:

 

Read Checkpoint #1

 

GGS Log Trail

 

Startup Checkpoint (starting position in the data source):

Sequence #: 0

rba:0

Timestamp:not Available

Extract Trail:./dirdat/tr

 

current Checkpoint (position's last record, read in the data source):

Sequence #: 3

rba:48953996

Timestamp:2015-01-30 13:18:16.296427

Extract Trail:./dirdat/tr

 

...

Current Checkpoint for Sequence #: 3 rba:48953996

4, OGG software upgrade 4.1 will be the new version of Ogg 11.2.1.0.1 software copied to the original old version of the Ogg directory

$ CP Ogg112101_fbo_ggs_linux_x64_ora11g_64bit.zip/u01/ogg

4.2 Delete the Fbo_ggs_linux_x64_ora11g_64bit.tar file under the Ogg directory

Fbo_ggs_linux_x64_ora11g_64bit.tar file is the old version of Ogg installed when the tar file, the new version of Ogg software unzip decompression, will also generate this file, of course, you can also use the unzip when extracting overrides manually deleted

$RM Fbo_ggs_linux_x64_ora11g_64bit.tar

4.3 Install (unzip) the new Ogg software in the original OGG directory

$unzip Ogg112101_fbo_ggs_linux_x64_ora11g_64bit.zip

$tar XVF Fbo_ggs_linux_x64_ora11g_64bit.tar

4.4 Verifying the success of the upgrade

$CD $OGG

[Email protected] u01]$ CD $OGG

[Email protected] 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, Oracle and/or its affiliates. All rights reserved.

Ggsci (Server2) 1>

As seen from here, the Ogg software version has been upgraded to 11.2.1.0.1

5. Verify that the checkpoint of Replicat after upgrade is consistent 5.1 view Replicat checkpoint after upgrade consistent with pre-upgrade

Ggsci (server2) 46> info reptr, Detail

Replicat reptr last Started 2015-01-30 13:03 Status STOPPED

Checkpoint Lag 00:00:00 (updated 00:12:58 ago)

Log Read Checkpoint File./dirdat/tr000003

2015-01-30 13:18:16.296427 RBA 48953996

Extract Source Begin End

./dirdat/tr000003 * Initialized * 2015-01-30 13:18

./dirdat/tr000000 * Initialized * First Record

Current Directory/u01/ogg

Report File/u01/ogg/dirrpt/reptr.rpt

Parameter FILE/U01/OGG/DIRPRM/REPTR.PRM

Checkpoint FILE/U01/OGG/DIRCHK/REPTR.CPR

Checkpoint table GOLDENGATE. Checkpoint_reptr_01

Process FILE/U01/OGG/DIRPCS/REPTR.PCR

Stdout File/u01/ogg/dirout/reptr.out

Error Log/u01/ogg/ggserr.log

Current Checkpoint, as before the upgrade, is still sequence #: 3 rba:48953996, further proving that the upgrade was successful.

6, verify that the upgrade can be normal synchronization of data scene preparation 6.1 record the source end, the target end of the data volume is consistent

(Production library Environment This step can be skipped, because the table of the production library is subject to constant changes in the operational data of the business, this case is to create a dedicated test upgrade of the table to test)

Source-side

Target side

Sql> Select COUNT (*) from GOLDENGATE.OGG_UPG;

COUNT (*)

----------

2150000

Sql> Select COUNT (*) from GOLDENGATE.OGG_UPG;

COUNT (*)

----------

2150000

The amount of data on the source and target side is consistent.

6.2 Delete some data at the source before the target-side replicat process starts

sql> Delete goldengate.ogg_upg where rownum <1000001;

1000000 rows deleted.

Sql> commit;

Sql> Select COUNT (*) from GOLDENGATE.OGG_UPG;

COUNT (*)

----------

1150000

7. Rebuilding the target end replicat process

reasons for rebuilding the Replicat process: ogg_11.1.1.1.2 Each replicat process has only checkpoint a table, and ogg_11.2.x.x.1 each replicat process has checkpoint, Checkpoint_lox Two tables , so if after the upgrade, the direct start of the REPLICAT process, is unable to start, will report the following error:

Error OGG-00665 OCI error describe for query (status = 942-ora-00942:table or view does not exist), Sql<select A.curre Nt_dir, A.seqno, A.rba, A.audit_ts, A.LOG_CSN, A.log_xid, A.LOG_CMPLT_CSN, A.log_cmplt_xids, b.log_cmplt_xids from GOLDENGATE. Checkpoint_reptr_01 a left JOIN GOLDENGATE. Checkpoint_reptr_01_lox b on a.group_name = B.group_name and A.group_key = B.group_key and A.LOG_CMPLT_CSN = B.log_cmplt_c sn WHERE a.group_name = ' reptr ' and a.group_key = 2810015614>.

2015-01-28 05:12:59 ERROR OGG-01668 PROCESS abending.

Hint table does not exist, this table refers to: Goldengate.checkpoint_reptr_01_lox table (Checkpoint_lox table), the ultimate goal of rebuilding Replicat is to let in the reconstruction process, Automatically creates two checkpoint tables automatically.

7.1 Delete Replicat process and checkpoint table

Ggsci>dblogin userid Goldengate,password goldengate

Ggsci>delete Replicat Reptr

Ggsci>delete checkpointtable GOLDENGATE. Checkpoint_reptr_01

7.2 Re-establishing the REPLICAT process

Ggsci>dbloginuserid goldengate, Password goldengate

Ggsci>add checkpointtable goldengate.checkpoint_reptr_01

Ggsci>add replicat reptr, exttrail./dirdat/tr,checkpointtable goldengate.checkpoint_reptr_01

To this step, replicat boot, still cannot continue to apply the source side of the trail, because the source side of the DataPump process has done etrollover, so need to manually modify Replicat sequence# and RBA to seqno and RBA in the target extract trails of the datadump process.

7.3 Modifying the Extseqno and Extrba of the target end Replicat

According to the previous step, isolate the source side of the Datadump process Remotetrail file seqno and RBA, decide replicat to change the extseqno and Extrba number

Ggsci (server2) 37> Alter replicat reptrextseqno 4, Extrba 0

7.4 View the seq# and RBA of the newly created REPLICAT process

Ggsci (server2) 27> info reptr, Showch

Ggsci (server2) 3> info reptr , Showch

 

Replicat reptr Initialized 2015-01-30 13:39 Status STOPPED

Checkpoint Lag 00:00:00 ( Updated 00:00:07 ago)

Log Read Checkpoint File./dirdat/tr000004

First Record RBA 0

 

 

Current Checkpoint Detail:

 

Read Checkpoint #1

 

GGS Log Trail

 

Startup Checkpoint (starting position in the data source):

Sequence #: 4

rba:0

Timestamp:not Available

Extract Trail:./dirdat/tr

 

Current Checkpoint (position of last record, read in the data source):

Sequence #: 4

rba:0

Timestamp:not Available

Extract Trail:./dirdat/tr

...

The sequence# and RBA of Start checkpoint have been manually positioned to the state after the source end Etrollover.

The sequence# and RBA of current checkpoint have been manually and have been positioned at the source end of the Etrollover state.

7.5 Viewing the data contents of the Checkpoint table

Sql>select * from goldengate.checkpoint_reptr_01;

No rows selected

Sql>select * from Goldengate.checkpoint_reptr_01_lox;

No rows selected

At this point, the data in the two checkpoint table is still empty, and the status information will be written to the checkpoint table when the Replicat starts running.

8. Start the source and target process 8.1 start the replicat and MGR processes on the target side

Ggsci>start Mgr

Ggsci>start reptr

8.2 Starting the DataPump process on the source side

Ggsci>start DPETR

9. Verify that you can continue synchronizing data

This step is most important to verify that when the upgrade time occurs, the actions made by the source side can be synchronized to the target library. In this case, 1000000 rows of data were deleted from the GOLDENGATE.OGG_UPG table during the upgrade process.

9.1 Viewing data changes for GOLDENGATE.OGG_UPG tables on the target side

Source-side

Target side

Sql> Select COUNT (*) from GOLDENGATE.OGG_UPG;

COUNT (*)

----------

2050000

Sql> Select COUNT (*) from GOLDENGATE.OGG_UPG;

COUNT (*)

----------

2050000

9.2 Target End View checkpoint check status in table

SELECT * FROM goldengate.checkpoint_reptr_01

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

Reptr 2149948420 4 19280017 2015-01-30 13:55:59.368501 2015/1/30 13:36:43 2015/1/30 14:01:01/u01/ogg 17929533 7.16.20512 17929533 7.16.20512 1

From the above two steps, after the upgrade Replicat normal, and then the state before the upgrade to synchronize data.

Goldengate Upgrade Target (Replicat-side) upgrade

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.