LogiUpSkill

Install and configure XAG Services Manager

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
Stage 1. Create file system :
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 ~]$ 
Stage 2 : Configure VIP and DB service for XAG
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 
Stage 3. Install and configure XAG setup
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   

Xag binary is located on “/u01/app/oracle/19c/xag/bin” for Microservices (Run from Root user) /u01/app/oracle/19c/xag/bin/agctl add goldengate westgg \ –gg_home /acfs1/ggate \ –service_manager \ –config_home /acfs1/ggate/deploy/etc/conf \ –var_home /acfs1/ggate/deploy/var \ –port 7900 \ –adminuser ggadmin \ –user oracle \ –group oinstall \ –vip_name westgg-vip \ –filesystems ora.acfs.acfs1.acfs \ –db_services ora.woravr.woravrsvc.svc \ –use_local_services \ –nodes west01,west02 for : classic Goldengate /u01/app/oracle/19c/xag/bin/agctl add goldengate westgg \ –gg_home /acfs/ggate \ –nodes west01,west02 \ –vip_name westgg-vip \ –filesystems ora.acfs.acfs1.acfs \ –databases ora.woravr.db \ –oracle_home /u01/app/oracle/19c/db_1 \ Where: –gg_home specifies the location of the Oracle GoldenGate software. –service_manager indicates this is an Oracle GoldenGate Microservices instance. –config_home specifies the Oracle GoldenGate deployment configuration home directory. –var_home specifies the Oracle GoldenGate deployment variable home directory. –port specifies the deployment Service Manager port number. –adminuser specifies the Oracle GoldenGate Microservices administrator account name. –user specifies the name of the operating system user that owns the Oracle GoldenGate deployment. –group specifies the name of the operating system group that owns the Oracle GoldenGate deployment. –network specifies the network subnet for the VIP, determined on page 17 (optional). –ip specifies the IP address for the VIP, which was determined on page 17 (optional). If you have already created a VIP, then specify it using the –vip_name parameter in place of –network and –ip. –filesystems specifies the CRS file system resource that must be mounted before the deployment is started.
5. start the service
[oracle@west01 ]$ /u01/app/oracle/19c/xag/bin/agctl start goldengate westgg 
6. check status
[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 

7. Check the mar or service manager status
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
II) Automatic
[root@west02 ]$ reboot [oracle@west01 ]$ /u01/app/oracle/19c/xag/bin/agctl status goldengate Goldengate instance ‘westgg’ is running on west01

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.

Xag 

Leave a Reply

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