Loading....

In one of my earlier posts I had described how to handle GoldenGate version differences between the source and target environments. In that case my source was version 11.2 and the target was version 11.1.  We had to use the FORMAT RELEASE parameter to handle such a version difference.

 

https://gavinsoorma.com.au/2012/06/using-the-format-release-parameter-to-handle-goldengate-version-differences/

 

Let us now look at an example of how to upgrade the existing  target 11.1 environment to GoldenGate version 11.2.1.0.

Note – in my case, the source was already running on version 11.2 and we only had to upgrade the target from 11.1 to 11.2

But the same process should apply if we are upgrading both the source as well as target GoldenGate environments.

 

Take a backup of existing GoldenGate 11.1 software directory

[oracle@pdemora062rhv app]$ cp -fR goldengate goldengate_11.1

Create a new directory for GG 11.2 software

[oracle@pdemora062rhv app]$ mkdir goldengate_11.2

 

Check the extract status

 

Ensure that all our extract processes on the source have been completed.

In GGSCI on the source system, issue the SEND EXTRACT command with the LOGEND option until it shows there is no more redo data to capture.

In this case we see that some transactions are still bein processed:

GGSCI (pdemora061rhv.asgdemo.asggroup.com.au) 9> send extract testext logend

Sending LOGEND request to EXTRACT TESTEXT …

We run the same command again and we now see that the extract process has finished processing records.

GGSCI (pdemora061rhv.asgdemo.asggroup.com.au) 11> send extract testext logend

Sending LOGEND request to EXTRACT TESTEXT …

YES.

 

A good practice is to make a note of the redo log file currently being read from. You may need archive logs from this point if you receive any error on extract startup after upgrade.

 

GGSCI (pdemora061rhv.asgdemo.asggroup.com.au) 10> send extract testext showtrans

Sending SHOWTRANS request to EXTRACT TESTEXT …

No transactions found

Oldest redo log file necessary to restart Extract is:

Redo Log Sequence Number 235, RBA 10052624.

 

On the target site, check the Replicat status.

Ensure that all the Replicat groups have completed processing. In the case below, we see that one of the replicat processes is still active and not yet complete.

 

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 4> send replicat testrep status

Sending STATUS request to REPLICAT TESTREP …

Current status: Processing data

Sequence #: 1

RBA: 4722168

39491 records in current transaction

 

Now we see that the process has completed …

 

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 5>  send replicat testrep status

Sending STATUS request to REPLICAT TESTREP …

Current status: At EOF

Sequence #: 1

RBA: 6927789

0 records in current transaction

 

Stop the extract and manager processes on source

 

GGSCI (pdemora061rhv.asgdemo.asggroup.com.au) 12> stop extract testext

Sending STOP request to EXTRACT TESTEXT …

Request processed.

GGSCI (pdemora061rhv.asgdemo.asggroup.com.au) 13> stop manager

Manager process is required by other GGS processes.

Are you sure you want to stop it (y/n)? y

Sending STOP request to MANAGER …

Request processed.

Manager stopped.

 

Stop the replicat and manager processes on target

 

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 6> stop replicat testrep

Sending STOP request to REPLICAT TESTREP …

Request processed.

 

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 7> stop manager

Manager process is required by other GGS processes.

Are you sure you want to stop it (y/n)? y

Sending STOP request to MANAGER …

Request processed.

Manager stopped.

 

Note – if upgrading the source and if have configured DDL support, we need to disable the DDL trigger by running the ddl_disable script from the Oracle GoldenGate directory on the source system.

 

SQL> conn sys as sysdba

Enter password:

Connected.

SQL> @ddl_disable

Trigger altered.

 

Now unzip the 11.2 GoldenGate software.

 

[oracle@pdemora062rhv goldengate]$ cd ../goldengate_11.2

[oracle@pdemora062rhv goldengate_11.2]$ ls

V32400-01.zip

[oracle@pdemora062rhv goldengate_11.2]$ unzip *.zip

Archive:  V32400-01.zip

inflating: fbo_ggs_Linux_x64_ora10g_64bit.tar

inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf

inflating: Oracle GoldenGate 11.2.1.0.1 README.txt

inflating: Oracle GoldenGate 11.2.1.0.1 README.doc

 

[oracle@pdemora062rhv goldengate_11.2]$ tar -xvf fbo_ggs_Linux_x64_ora10g_64bit.tar

 

Now copy the contents of the unzipped 11.2 directory to the existing 11.1 GoldenGate software location.

Note – we are not touching our other existing 11.1 GG sub-directories like dirprm and dirdat. They still have our 11.1 version files.

 

[oracle@pdemora062rhv goldengate_11.2]$ cp -fR * /u01/app/goldengate

 

Let us now test the GoldenGate software version. Note the warning pertains to the parameter ENABLEMONITORAGENT which we had enabled for GoldenGate Monitor is now deprecated in version 11.2. We can sort that out later.

So we can see that we are now using the version 11.2.1.0 GoldenGate software binaries.

 

[oracle@pdemora062rhv goldengate]$ ./ggsci

2012-06-23 06:41:17  WARNING OGG-00254  ENABLEMONITORAGENT is a deprecated parameter.

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 10g on Apr 23 2012 07:30:46

 

If we are upgrading the Target GoldenGate environment which is in my case, we have also to go and upgrade the Checkpoint Table as the 11.2 table structure is slightly different to the 11.1 structure.

 

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 1> dblogin userid ggs_owner, password ggs_owner

Successfully logged into database.

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 2> upgrade checkpointtable ggs_owner.chkptab

Successfully upgraded checkpoint table ggs_owner.chkptab.

 

Note:

This portion will now apply if we are upgrading the source GoldenGate environment and we would like to upgrade the DDL support as well to the 11.2 version.

 

SQL> conn sys as sysdba
Enter password:
Connected.

SQL> @ddl_disable

Trigger altered.
SQL> @ddl_remove

DDL replication removal script.
WARNING: this script removes all DDL replication objects and data.

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.

Enter Oracle GoldenGate schema name:GGS_OWNER
Working, please wait ...
Spooling to file ddl_remove_spool.txt

Script complete.

SQL> @marker_remove

Marker removal script.
WARNING: this script removes all marker objects and data.

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.

Enter Oracle GoldenGate schema name:GGS_OWNER

PL/SQL procedure successfully completed.
Sequence dropped.
Table dropped.
Script complete.
SQL> @marker_setup

Marker setup script

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.

Enter Oracle GoldenGate schema name:GGS_OWNER
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GGS_OWNER

MARKER TABLE
-------------------------------
OK

MARKER SEQUENCE
-------------------------------
OK

Script complete.
SQL>
SQL> @ddl_setup

Oracle GoldenGate DDL Replication setup script

Verifying that current user has privileges to install DDL Replication...

You will be prompted for the name of a schema for the Oracle GoldenGate database                                                                                                                                                              objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Ora                                                                                                                                                             cle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.

Enter Oracle GoldenGate schema name:GGS_OWNER

Working, please wait ...
Spooling to file ddl_setup_spool.txt

Checking for sessions that are holding locks on Oracle Golden Gate metadata tabl                                                                                                                                                             es ...

Check complete.

Using GGS_OWNER as a Oracle GoldenGate schema name.

Working, please wait ...

RECYCLEBIN must be empty.
This installation will purge RECYCLEBIN for all users.
To proceed, enter yes. To stop installation, enter no.

Enter yes or no:yes
DDL replication setup script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GGS_OWNER

CLEAR_TRACE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

CREATE_TRACE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

TRACE_PUT_LINE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

INITIAL_SETUP STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

DDLVERSIONSPECIFIC PACKAGE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

DDLREPLICATION PACKAGE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

DDLREPLICATION PACKAGE BODY STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

DDL IGNORE TABLE
-----------------------------------
OK

DDL IGNORE LOG TABLE
-----------------------------------
OK

DDLAUX  PACKAGE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

DDLAUX PACKAGE BODY STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

SYS.DDLCTXINFO  PACKAGE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

SYS.DDLCTXINFO  PACKAGE BODY STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

DDL HISTORY TABLE
-----------------------------------
OK

DDL HISTORY TABLE(1)
-----------------------------------
OK

DDL DUMP TABLES
-----------------------------------
OK

DDL DUMP COLUMNS
-----------------------------------
OK

DDL DUMP LOG GROUPS
-----------------------------------
OK

DDL DUMP PARTITIONS
-----------------------------------
OK

DDL DUMP PRIMARY KEYS
-----------------------------------
OK

DDL SEQUENCE
-----------------------------------
OK

GGS_TEMP_COLS
-----------------------------------
OK

GGS_TEMP_UK
-----------------------------------
OK

DDL TRIGGER CODE STATUS:

Line/pos                                 Error
---------------------------------------- ---------------------------------------                                                                                                                                                             --------------------------
No errors                                No errors

DDL TRIGGER INSTALL STATUS
-----------------------------------
OK

DDL TRIGGER RUNNING STATUS
--------------------------------------------------------------------------------                                                                                                                                                             ----------------------------------------
ENABLED

STAYMETADATA IN TRIGGER
--------------------------------------------------------------------------------                                                                                                                                                             ----------------------------------------
OFF

DDL TRIGGER SQL TRACING
--------------------------------------------------------------------------------                                                                                                                                                             ----------------------------------------
0

DDL TRIGGER TRACE LEVEL
--------------------------------------------------------------------------------                                                                                                                                                             ----------------------------------------
0

LOCATION OF DDL TRACE FILE
--------------------------------------------------------------------------------                                                                                                                                                             ----------------------------------------
/u01/app/oracle/oracle/product/10.2.0/db_1/admin/db10g/udump/ggs_ddl_trace.log

Analyzing installation status...
STATUS OF DDL REPLICATION
--------------------------------------------------------------------------------                                                                                                                                                             ----------------------------------------
SUCCESSFUL installation of DDL Replication software components

Script complete.

SQL> @role_setup

GGS Role setup script

This script will drop and recreate the role GGS_GGSUSER_ROLE
To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred name. (Do not run the script.)

You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.

Enter GoldenGate schema name:GGS_OWNER
Wrote file role_setup_set.txt

PL/SQL procedure successfully completed.
Role setup script complete

Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command:

GRANT GGS_GGSUSER_ROLE TO <loggedUser>

where <loggedUser> is the user assigned to the GoldenGate processes.
SQL> GRANT GGS_GGSUSER_ROLE TO ggs_owner;

Grant succeeded.

SQL> @ddl_enable

Trigger altered.

 

We now start the Manager on both source as well as target.

In my example my earlier configuration was source 11.2 and target 11.1,

So I had to use the FORMAT RELEASE 11.1 parameter in my extract parameter file to handle the version difference.

But now both source as well as target are GoldenGate version 11.2, so I can remove the FORMAT RELEASE from my extract parameter file.

I also want the extract to start writing to a new Trail file and use 11.2 version instead as Replicat now is also on the same 11.2 version. I use the ETROLLOVER to force a new trail file sequence and then start the extract process.

 

GGSCI (pdemora061rhv.asgdemo.asggroup.com.au) 21> alter extract testext etrollover

 

We also have to instruct the Replicat process that it needs to start reading from a new 11.2 version trail file via the ALTER REPLICAT command. After that we can start the replicat process.

 

 

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 8> alter replicat testrep extseqno 3

REPLICAT altered.

 

GGSCI (pdemora062rhv.asgdemo.asggroup.com.au) 9>  start replicat testrep

Sending START request to MANAGER …

REPLICAT TESTREP starting

 

 

Please follow and like us:

Last Update: May 8, 2017  

June 26, 2012 25 Gavin Soorma
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?

, ,

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*

Social media & sharing icons powered by UltimatelySocial
Back To Top

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?