0% found this document useful (0 votes)
175 views

Oracle GoldenGate 18c Workshop Lab 3

This document provides instructions for configuring high availability for Oracle GoldenGate using the Oracle Grid Infrastructure Cross-Platform High Availability (XAG) agent. Key steps include: 1. Configuring an ACFS volume for shared storage. 2. Installing and configuring the Grid Infrastructure Agent for GoldenGate. 3. Creating a GoldenGate resource via the agctl command and integrating GoldenGate with the XAG infrastructure to enable automatic failover of the GoldenGate Manager and processes.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
175 views

Oracle GoldenGate 18c Workshop Lab 3

This document provides instructions for configuring high availability for Oracle GoldenGate using the Oracle Grid Infrastructure Cross-Platform High Availability (XAG) agent. Key steps include: 1. Configuring an ACFS volume for shared storage. 2. Installing and configuring the Grid Infrastructure Agent for GoldenGate. 3. Creating a GoldenGate resource via the agctl command and integrating GoldenGate with the XAG infrastructure to enable automatic failover of the GoldenGate Manager and processes.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop

Hands-on Lab Exercise 3


Configure High Availability for GoldenGate using XAG

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
1
Check the ACFS status

[root@rac01 bin]# xhost +


access control disabled, clients can connect from any host

[root@rac01 bin]# su – grid

[grid@rac01 ~]$ export DISPLAY=:0.0

[grid@rac01 ~]$ . oraenv


ORACLE_SID = [grid] ? +ASM1
The Oracle base has been set to /u01/app/grid

[grid@rac01 ~]$ asmca

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
2
Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
3
[grid@rac01 ~]$ asmcmd

ASMCMD> volinfo -G ACFS_DG -a


Diskgroup Name: ACFS_DG

Volume Name: ACFS_VOL


Volume Device: /dev/asm/acfs_vol-96
State: ENABLED
Size (MB): 12096
Resize Unit (MB): 64
Redundancy: UNPROT
Stripe Columns: 8
Stripe Width (K): 1024
Usage: ACFS
Mountpath: /acfs_oh

Note that the Manager process is only running on rac01 and not on rac02.

[oracle@rac01 goldengate]$ ps -ef |grep MGR.rpt |grep -v grep


oracle 31421 1 0 11:21 ? 00:00:01 ./mgr PARAMFILE /acfs_oh/app/goldengate/dirprm/mgr.prm REPORTFILE
/acfs_oh/app/goldengate/dirrpt/MGR.rpt PROCESSID MGR
[oracle@rac01 goldengate]$ netstat -an |grep 7809
tcp 0 0 :::7809 :::* LISTEN
udp 0 0 127.0.0.1:27809 0.0.0.0:*

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
4
[oracle@rac02 ~]$ ps -ef |grep MGR.rpt |grep -v grep
[oracle@rac02 ~]$ netstat -an |grep 7809

Create the clusterware managed Application VIP type resource.


[oracle@rac01 ~]$ su -
Password:

[root@rac01 ~]# cd /u01/app/12.2.0/grid/bin

[root@rac01 bin]# ./appvipcfg create -network=1 -ip=192.168.56.130 -vipname=ogg_vip -user=root -group=oinstall

Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params


The log of current session can be found at:
/u01/app/grid/crsdata/rac01/scripts/appvipcfg.log

[root@rac01 bin]# ./crsctl setperm resource ogg_vip -u user:oracle:r-x

Start the resource and test the relocation of the resource between nodes of the cluster

[root@rac01 bin]# ./crsctl start resource ogg_vip


CRS-2672: Attempting to start 'ogg_vip' on 'rac02'
CRS-2676: Start of 'ogg_vip' on 'rac02' succeeded

[root@rac01 bin]# ./crsctl status resource ogg_vip


NAME=ogg_vip
TYPE=app.appviptypex2.type

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
5
TARGET=ONLINE
STATE=ONLINE on rac02

[root@rac01 bin]# ./crsctl relocate resource ogg_vip -n rac01


CRS-2673: Attempting to stop 'ogg_vip' on 'rac02'
CRS-2677: Stop of 'ogg_vip' on 'rac02' succeeded
CRS-2672: Attempting to start 'ogg_vip' on 'rac01'
CRS-2676: Start of 'ogg_vip' on 'rac01' succeeded

[root@rac01 bin]# ./crsctl status resource ogg_vip


NAME=ogg_vip
TYPE=app.appviptypex2.type
TARGET=ONLINE
STATE=ONLINE on rac01

[root@rac01 bin]# ./crsctl status resource ogg_vip -p


NAME=ogg_vip
TYPE=app.appviptypex2.type
ACL=owner:root:rwx,pgrp:root:r-x,other::r--,group:oinstall:r-x,user:root:r-x,user:oracle:r-x
ACTIONS=
ACTION_SCRIPT=
ACTION_TIMEOUT=60
ACTIVE_PLACEMENT=0
AGENT_FILENAME=%CRS_HOME%/bin/orarootagent%CRS_EXE_SUFFIX%
APPSVIP_FAILBACK=0
AUTO_START=restore
CARDINALITY=1
CHECK_INTERVAL=1
CHECK_TIMEOUT=0

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
6
CLEAN_TIMEOUT=60
CSS_CRITICAL=no
DEGREE=1
DELETE_TIMEOUT=60
DESCRIPTION=Application VIP
ENABLED=1
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
GEN_USR_ORA_STATIC_VIP=
GEN_USR_ORA_VIP=
HOSTING_MEMBERS=
IGNORE_TARGET_ON_FAILURE=no
INSTANCE_FAILOVER=1
INTERMEDIATE_TIMEOUT=0
LOAD=1
LOGGING_LEVEL=1
MODIFY_TIMEOUT=60
NETWORK_RESOURCE=
NLS_LANG=
OFFLINE_CHECK_INTERVAL=0
PLACEMENT=balanced
RELOCATE_BY_DEPENDENCY=1
RELOCATE_KIND=offline
RESOURCE_GROUP=
RESTART_ATTEMPTS=0
RESTART_DELAY=0
SCRIPT_TIMEOUT=60
SERVER_CATEGORY=
SERVER_POOLS=*

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
7
START_CONCURRENCY=0
START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network)
START_TIMEOUT=0
STOP_CONCURRENCY=0
STOP_DEPENDENCIES=hard(intermediate:ora.net1.network)
STOP_TIMEOUT=0
TARGET_DEFAULT=default
TYPE_VERSION=1.1
UPTIME_THRESHOLD=7d
USER_WORKLOAD=no
USE_STICKINESS=0
USR_ORA_ENV=
USR_ORA_VIP=192.168.56.130
VERSION=12.1.0.1.0
WORKLOAD_CPU=0
WORKLOAD_CPU_CAP=0
WORKLOAD_MEMORY_MAX=0
WORKLOAD_MEMORY_TARGET=0

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
8
Download and install Grid Infrastructure Agent for GoldenGate.

http://www.oracle.com/technetwork/database/database-technologies/clusterware/downloads/xag-agents-downloads-3636484.html

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
9
Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
10
[oracle@rac01 xag]$ su - grid
Password:

[grid@rac01 ~]$ cp /media/sf_software/xagpack91.zip .

[grid@rac01 ~]$ unzip xagpack91.zip


Archive: xagpack91.zip
creating: xag/
creating: xag/sbs/
inflating: xag/sbs/agctl.sbs
inflating: xag/sbs/agpsappas.sbs
inflating: xag/sbs/aggoldengateas.sbs
inflating: xag/sbs/xagdiagcollection.sbs
inflating: xag/sbs/agwlas.sbs

[grid@rac01 ~]$ cd xag

[grid@rac01 xag]$ ./xagsetup.sh --install --directory /u01/app/grid/xag --all_nodes


Installing Oracle Grid Infrastructure Agents on: rac01
Installing Oracle Grid Infrastructure Agents on: rac02
Done.
Updating XAG resources.
Successfully updated XAG resources.
[grid@rac01 xag]$

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
11
Create the GoldenGate Resource via agctl.
[grid@rac01 xag]$ su - oracle
Password:

[oracle@rac01 ~]$ cd /u01/app/grid/xag/bin

[oracle@rac01 bin]$ ./agctl add goldengate ogg_ha --gg_home /acfs_oh/app/goldengate --nodes rac01,rac02 --vip_name ogg_vip --
filesystems ora.acfs_dg.acfs_vol.acfs --databases ora.cdb1.db --oracle_home /acfs_oh/product/12.2.0/dbhome_1 --monitor_extracts
ext1,pump1 --critical_extracts ext1,pump1

[oracle@rac01 bin]$ ./agctl config goldengate ogg_ha


Instance name: ogg_ha
Application GoldenGate location is: /acfs_oh/app/goldengate
Goldengate MicroServices Architecture environment : no
GoldenGate instance type is: dual
EXTRACT groups to monitor: ext1,pump1
REPLICAT groups to monitor:
Critical EXTRACT groups: ext1,pump1
Critical REPLICAT groups:
Autostart JAgent: no
Autostart on DataGuard role transition to PRIMARY: no
Configured to run on Nodes: rac01 rac02
ORACLE_HOME location is: /acfs_oh/product/12.2.0/dbhome_1
Databases needed: ora.cdb1.db
File System resources needed: ora.acfs_dg.acfs_vol.acfs
VIP name: ogg_vip

[oracle@rac01 ~]$ cd /u01/app/grid/xag/bin

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
12
[oracle@rac01 bin]$ ./agctl status goldengate ogg_ha
Goldengate instance 'ogg_ha' is not running

[oracle@rac01 bin]$ ./agctl start goldengate ogg_ha

[oracle@rac01 bin]$ ./agctl status goldengate ogg_ha


Goldengate instance 'ogg_ha' is running on rac01

Integrate GoldenGate with Grid Infrastructure XAG.

Add variable GRID_HOME to the .bash_profile (on both rac01 and rac02)
[oracle@rac01 ~]$ vi .bash_profile
export ORACLE_HOME=/acfs_oh/product/12.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export GRID_HOME=/u01/app/12.2.0/grid

[oracle@rac01 ~]$ . ./.bash_profile


[oracle@rac01 ~]$ echo $GRID_HOME
/u01/app/12.2.0/grid

Add the parameter XAG_ENABLE to the GLOBALS file


[oracle@rac01 goldengate]$ ./ggsci

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
13
GGSCI (rac01.localdomain) 1> edit params ./GLOBALS

CHECKPOINTTABLE pdb2.c##oggadmin.chkptab
XAG_ENABLE

Note:Exit from ggsci and launch ggsci again.

[oracle@rac01 ogg]$ ./ggsci

GGSCI (rac01.localdomain) 2> info all

Program Status Group Lag at Chkpt Time Since Chkpt XAG

MANAGER RUNNING MANAGED/xag.ogg_ha.goldengate/


EXTRACT RUNNING EXT1 00:00:00 00:00:00 CRITICAL
EXTRACT RUNNING PUMP1 00:00:00 00:00:05 CRITICAL
REPLICAT RUNNING REP1 00:00:00 00:00:03 NON-CRITICAL

Change the RMTHOST value in the PUMP1 parameter file

GGSCI (rac01.localdomain) 2> edit params pump1

RMTHOST 192.168.56.130, MGRPORT 7809

GGSCI (rac01.localdomain) 3> stop pump1

Sending STOP request to EXTRACT PUMP1 ...

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
14
Request processed.

GGSCI (rac01.localdomain) 4> start pump1

Sending START request to MANAGER ...


EXTRACT PUMP1 starting

Check the XAG/Goldengate Integration is working.

GGSCI (rac01.localdomain) 1> stop mgr!


Transparent Integration with XAG is enabled. Sending the command STOP MANAGER to XAG...

2019-01-13 12:03:37 INFO OGG-02407 CRS/XAG status: CRS-2677: Stop of 'xag.ogg_ha.goldengate' on 'rac01' succeeded.

[oracle@rac01 ~]$ cd /u01/app/grid/xag/bin

[oracle@rac01 bin]$ ./agctl status goldengate ogg_ha


Goldengate instance 'ogg_ha' is not running

[oracle@rac01 bin]$ ./agctl start goldengate ogg_ha

[oracle@rac01 bin]$ ./agctl status goldengate ogg_ha


Goldengate instance 'ogg_ha' is running on rac01

[oracle@rac01 bin]$ cd /acfs_oh/app/goldengate

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
15
[oracle@rac01 goldengate]$ ./ggsci

GGSCI (rac01.localdomain) 1> info all

Program Status Group Lag at Chkpt Time Since Chkpt XAG

MANAGER RUNNING MANAGED/xag.ogg_ha.goldengate/rac01


EXTRACT RUNNING EXT1 00:00:00 00:00:08 CRITICAL
EXTRACT RUNNING PUMP1 00:00:00 00:00:01 CRITICAL
REPLICAT RUNNING REP1 00:00:00 00:00:06 NON-CRITICAL

Test the Goldengate Failover by shutting down rac01 node.

[oracle@rac02 ~]$ cd /u01/app/grid/xag/bin

[oracle@rac02 bin]$ ./agctl status goldengate ogg_ha


Goldengate instance 'ogg_ha' is running on rac01

As root connect to rac01 and shut down the node.

[oracle@rac01 bin]$ su -
Password:

[root@rac01 ~]# shutdown -h now

On rac02, note the failover of GoldenGate to rac02 is in progress.

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
16
[oracle@rac02 bin]$ ./agctl status goldengate ogg_ha
Goldengate instance 'ogg_ha' is not running

Note: it may take a few minutes to start GoldenGate processes on node rac02 after failover

[oracle@rac02 bin]$ ./agctl status goldengate ogg_ha


Goldengate instance 'ogg_ha' is running on rac02

Additional Information:

https://www.oracle.com/technetwork/database/features/availability/maa-wp-gg-oracledbm-128760.pdf

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop Lab Exercise 3
17

You might also like