Oracle Grid Infrastructure provides the necessary components to manage high availability (HA) for any business critical application. Oracle Grid Infrastructure Agents (XAG) are Oracle Grid Infrastructure components that provide the HA framework to application resources and resource types managed through the agent management interface, AGCTL. This framework provides a complete, ready to use application HA solution that contains pre-defined Oracle Grid Infrastructure resource configurations and agents to integrate applications for complete application HA.Oracle GoldenGate Veridata12c is a high-speed,low-impact, heterogeneous data comparison ,and repair solution. Working primarily outside of the database system it quickly identifies, reports on, and fixes data discrepancies between databases without interrupting the on going business processes automatically. AGCTL, Agent Control, is the agent command line utility to manage Oracle Grid Infrastructure agents (XAG) for application HA using Oracle Grid Infrastructure. AGCTL is the interface to add an application to the Oracle Grid Infrastructure as a clustered resource under agent control. Once configured, AGCTL is the management interface to bring the application online, offline or relocate, as well as to check the application state and modify the agent configuration. There are AGCTL options to disable and remove the application from the Oracle Grid Infrastructure agent control. Prerequisite : 1) A shared filesystem for OGG recovery information such as checkpoint files, bounded recovery files and trail files is required. This can be either DBFS, OCFS (Oracle Cluster File system) or ACFS (ASM Cluster Filesystem). In our example, we are using ACFS, which is included in the 11.2 Clusterware bundle (by default). 2) A separate VIP for the golden gate resource. (In this example, we will use the IP address 192.168.45.159 for this purpose) 3) Xag installation directory must be same on all nodes 4) appvip must be required and resolve by DNS 5) add database service
1. Create the ASM Diskgroup
[oracle@west01 scp]$ sh asmdu.sh -m
Instances running on west01 : +ASM1, woravr1
DiskGroup Redundancy Total MB Usable MB % Free
--------- ----------- -------- --------- ------
ACFS EXTERN 199996.00 199860.00 99
DATA EXTERN 399996.00 394464.00 98
FRA EXTERN 150012.00 148796.00 99
OCR EXTERN 99998.00 98762.00 98
2. create asm volume for asfs file system
ASMCMD [+] > volinfo --all
Diskgroup Name: ACFS
Volume Name: ACFS1
Volume Device: /dev/asm/acfs1-148
State: ENABLED
Size (MB): 102400
Resize Unit (MB): 64
Redundancy: UNPROT
Stripe Columns: 8
Stripe Width (K): 1024
Usage:
Mountpath:
ASMCMD [+] >
3. Create folder on os layer
[root@west01 /]# mkdir acfs1
[root@west01 /]#
4. create ACFS file system
Create ACFS Command:
/sbin/mkfs -t acfs /dev/asm/acfs1-148
Following commands should be run as privileged user :
/u01/app/oracle/19c/grid_1/bin/srvctl add filesystem -d /dev/asm/acfs1-148 -m /acfs1 -fstype ACFS -autostart ALWAYS
/u01/app/oracle/19c/grid_1/bin/srvctl start filesystem -d /dev/asm/acfs1-148
chown : /acfs1
chmod 775 /acfs1
[root@west01 /]# cat /u01/app/oracle_base/cfgtoollogs/asmca/scripts/acfs_script.sh
#!/bin/sh
/u01/app/oracle/19c/grid_1/bin/srvctl add filesystem -d /dev/asm/acfs1-148 -m /acfs1 -fstype ACFS -autostart ALWAYS
if [ $? = "0" -o $? = "2" ]; then
/u01/app/oracle/19c/grid_1/bin/srvctl start filesystem -d /dev/asm/acfs1-148
if [ $? = "0" ]; then
chmod 775 /acfs1
/u01/app/oracle/19c/grid_1/bin/srvctl status filesystem -d /dev/asm/acfs1-148
exit 0
else
exit $?
fi
/u01/app/oracle/19c/grid_1/bin/srvctl status filesystem -d /dev/asm/acfs1-148
fi
[root@west01 /]# sh /u01/app/oracle_base/cfgtoollogs/asmca/scripts/acfs_script.sh
ACFS file system /acfs1 is mounted on nodes west01,west02
[root@west01 /]#
/sbin/mount.acfs -o all
--/bin/umount -t acfs -a
5 . check the status
[oracle@west01 ~]$ crsctl stat res -t | grep acfs
ora.acfs.acfs1.acfs
ONLINE ONLINE west01 mounted on /acfs1,ST
ONLINE ONLINE west02 mounted on /acfs1,ST
[oracle@west01 ~]$
1. Add service srvctl add service -d woravr -s woravrsvc -r west01 -a west02 -P PRECONNECT 2. Add VIP crsctl stat res -p |grep -ie .network -ie subnet |grep -ie name -ie subnet [root@west01 ~]# appvipcfg create -network=1 -ip=192.168.45.159 -vipname=westgg-vip -user=oracle Using configuration parameter file: /u01/app/oracle/19c/grid_1/crs/install/crsconfig_params The log of current session can be found at: /u01/app/oracle_base/crsdata/west01/scripts/appvipcfg.log [root@west01 ~]# [root@west01 ~]# crsctl start resource westgg-vip CRS-2672: Attempting to start 'westgg-vip' on 'west02' CRS-2676: Start of 'westgg-vip' on 'west02' succeeded
Download zip : zag.zip or page 1. unzip in /tmp folder
[oracle@west01 tmp]$ unzip xag.zip Archive: xag.zip creating: xag/ inflating: xag/xagsetup.sh inflating: xag/aggoldengate.pm inflating: xag/agapacheas.pm ……….skipped…………… inflating: xag/template/xag.ebs.type inflating: xag/template/xag.goldengate.type inflating: xag/template/xag.base.type 2. create same directory structure on all nodes west01: [root@west01 ]# mkdir -p /u01/app/oracle/19c/xag [root@west01 ]# chown oracle:oinstall -R xag west02: [root@west02 ]# mkdir -p /u01/app/oracle/19c/xag [root@west02 ]# chown oracle:oinstall -R xag 3. Install Xag west01: [oracle@west01 ]# cd /tmp/xag [oracle@west01 ]$ ./xagsetup.sh --install --directory /u01/app/oracle/19c/xag --nodes west01,west02 Installing Oracle Grid Infrastructure Agents on: west01 Installing Oracle Grid Infrastructure Agents on: west02 Done. 4. Add xag service with help of agctl
5. start the service
[oracle@west01 ]$ /u01/app/oracle/19c/xag/bin/agctl start goldengate westgg
[oracle@west01 ]$ /u01/app/oracle/19c/xag/bin/agctl status goldengate Goldengate instance 'westgg' is running on west01 [oracle@west01 ]$ crsctl stat res xag.westgg.goldengate NAME=xag.westgg.goldengate TYPE=xag.goldengate.type TARGET=ONLINE STATE=ONLINE on west01
8. Test the failover
I) Manual
Relocate the OGG Processes to another node to test failover (login as oracle):
[oracle@west01 ]$ /u01/app/oracle/19c/xag/bin/agctl relocate goldengate westgg --node west02
[oracle@west01 ]$ /u01/app/oracle/19c/xag/bin/agctl status goldengate Goldengate instance 'westgg' is running on west02
1 . We have specified the gg-vip IP address for the “rmthost” parameter of the PUMP process, so that the pump will be able to continue writing trail in case of any instance unavailability in target.
2. In case of failure of the node running the Manager, the cluster will restart the Manger process on first remaining available node. As soon as the Manager start, it will automatically restart all Extract and Replicate processes as we instruct it in the Manager configuration file (parameter AUTOSTART). The restarting of Extraction and Replication processes will be also done by the Manager and not by the cluster (so far with this release).
3. We can add Extract and Replicate processes as cluster resources but in this case it will only be monitored by the cluster and the cluster will update their states with ONLINE, OFFLINE, INTERMEDIATE or UNKNOWN depending the scenario.
