Gavinsoorma.com.au



Oracle GoldenGate 18c and GoldenGate Cloud Services WorkshopHands-on Lab Exercise 3Configure High Availability for GoldenGate using XAGCheck 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 ~]$ . oraenvORACLE_SID = [grid] ? +ASM1The Oracle base has been set to /u01/app/grid[grid@rac01 ~]$ asmca[grid@rac01 ~]$ asmcmdASMCMD> volinfo -G ACFS_DG -aDiskgroup 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 7809tcp 0 0 :::7809 :::* LISTEN udp 0 0 127.0.0.1:27809 0.0.0.0:* [oracle@rac02 ~]$ ps -ef |grep MGR.rpt |grep -v grep [oracle@rac02 ~]$ netstat -an |grep 7809Create 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_paramsThe 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-xStart the resource and test the relocation of the resource between nodes of the cluster [root@rac01 bin]# ./crsctl start resource ogg_vipCRS-2672: Attempting to start 'ogg_vip' on 'rac02'CRS-2676: Start of 'ogg_vip' on 'rac02' succeeded[root@rac01 bin]# ./crsctl status resource ogg_vipNAME=ogg_vipTYPE=app.appviptypex2.typeTARGET=ONLINESTATE=ONLINE on rac02[root@rac01 bin]# ./crsctl relocate resource ogg_vip -n rac01CRS-2673: Attempting to stop 'ogg_vip' on 'rac02'CRS-2677: Stop of 'ogg_vip' on 'rac02' succeededCRS-2672: Attempting to start 'ogg_vip' on 'rac01'CRS-2676: Start of 'ogg_vip' on 'rac01' succeeded[root@rac01 bin]# ./crsctl status resource ogg_vipNAME=ogg_vipTYPE=app.appviptypex2.typeTARGET=ONLINESTATE=ONLINE on rac01[root@rac01 bin]# ./crsctl status resource ogg_vip -pNAME=ogg_vipTYPE=app.appviptypex2.typeACL=owner:root:rwx,pgrp:root:r-x,other::r--,group:oinstall:r-x,user:root:r-x,user:oracle:r-xACTIONS=ACTION_SCRIPT=ACTION_TIMEOUT=60ACTIVE_PLACEMENT=0AGENT_FILENAME=%CRS_HOME%/bin/orarootagent%CRS_EXE_SUFFIX%APPSVIP_FAILBACK=0AUTO_START=restoreCARDINALITY=1CHECK_INTERVAL=1CHECK_TIMEOUT=0CLEAN_TIMEOUT=60CSS_CRITICAL=noDEGREE=1DELETE_TIMEOUT=60DESCRIPTION=Application VIPENABLED=1FAILOVER_DELAY=0FAILURE_INTERVAL=0FAILURE_THRESHOLD=0GEN_USR_ORA_STATIC_VIP=GEN_USR_ORA_VIP=HOSTING_MEMBERS=IGNORE_TARGET_ON_FAILURE=noINSTANCE_FAILOVER=1INTERMEDIATE_TIMEOUT=0LOAD=1LOGGING_LEVEL=1MODIFY_TIMEOUT=60NETWORK_RESOURCE=NLS_LANG=OFFLINE_CHECK_INTERVAL=0PLACEMENT=balancedRELOCATE_BY_DEPENDENCY=1RELOCATE_KIND=offlineRESOURCE_GROUP=RESTART_ATTEMPTS=0RESTART_DELAY=0SCRIPT_TIMEOUT=60SERVER_CATEGORY=SERVER_POOLS=*START_CONCURRENCY=0START_DEPENDENCIES=hard(work) pullup(work)START_TIMEOUT=0STOP_CONCURRENCY=0STOP_DEPENDENCIES=hard(intermediate:work)STOP_TIMEOUT=0TARGET_DEFAULT=defaultTYPE_VERSION=1.1UPTIME_THRESHOLD=7dUSER_WORKLOAD=noUSE_STICKINESS=0USR_ORA_ENV=USR_ORA_VIP=192.168.56.130VERSION=12.1.0.1.0WORKLOAD_CPU=0WORKLOAD_CPU_CAP=0WORKLOAD_MEMORY_MAX=0WORKLOAD_MEMORY_TARGET=0Download and install Grid Infrastructure Agent for GoldenGate.[oracle@rac01 xag]$ su - gridPassword: [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_nodesInstalling Oracle Grid Infrastructure Agents on: rac01Installing Oracle Grid Infrastructure Agents on: rac02Done.Updating XAG resources.Successfully updated XAG resources.[grid@rac01 xag]$Create the GoldenGate Resource via agctl. [grid@rac01 xag]$ su - oraclePassword: [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_haInstance name: ogg_haApplication GoldenGate location is: /acfs_oh/app/goldengateGoldengate MicroServices Architecture environment : noGoldenGate instance type is: dualEXTRACT groups to monitor: ext1,pump1REPLICAT groups to monitor: Critical EXTRACT groups: ext1,pump1Critical REPLICAT groups: Autostart JAgent: noAutostart on DataGuard role transition to PRIMARY: noConfigured to run on Nodes: rac01 rac02ORACLE_HOME location is: /acfs_oh/product/12.2.0/dbhome_1Databases needed: ora.cdb1.dbFile System resources needed: ora.acfs_dg.acfs_vol.acfsVIP name: ogg_vip[oracle@rac01 ~]$ cd /u01/app/grid/xag/bin[oracle@rac01 bin]$ ./agctl status goldengate ogg_haGoldengate instance 'ogg_ha' is not running[oracle@rac01 bin]$ ./agctl start goldengate ogg_ha[oracle@rac01 bin]$ ./agctl status goldengate ogg_haGoldengate instance 'ogg_ha' is running on rac01Integrate GoldenGate with Grid Infrastructure XAG.Add variable GRID_HOME to the .bash_profile (on both rac01 and rac02)[oracle@rac01 ~]$ vi .bash_profileexport ORACLE_HOME=/acfs_oh/product/12.2.0/dbhome_1export PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport GRID_HOME=/u01/app/12.2.0/grid[oracle@rac01 ~]$ . ./.bash_profile[oracle@rac01 ~]$ echo $GRID_HOME/u01/app/12.2.0/gridAdd the parameter XAG_ENABLE to the GLOBALS file [oracle@rac01 goldengate]$ ./ggsciGGSCI (rac01.localdomain) 1> edit params ./GLOBALSCHECKPOINTTABLE pdb2.c##oggadmin.chkptabXAG_ENABLENote:Exit from ggsci and launch ggsci again.[oracle@rac01 ogg]$ ./ggsciGGSCI (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 pump1RMTHOST 192.168.56.130, MGRPORT 7809GGSCI (rac01.localdomain) 3> stop pump1Sending STOP request to EXTRACT PUMP1 ...Request processed.GGSCI (rac01.localdomain) 4> start pump1Sending START request to MANAGER ...EXTRACT PUMP1 startingCheck 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_haGoldengate instance 'ogg_ha' is not running[oracle@rac01 bin]$ ./agctl start goldengate ogg_ha[oracle@rac01 bin]$ ./agctl status goldengate ogg_haGoldengate instance 'ogg_ha' is running on rac01[oracle@rac01 bin]$ cd /acfs_oh/app/goldengate[oracle@rac01 goldengate]$ ./ggsciGGSCI (rac01.localdomain) 1> info allProgram Status Group Lag at Chkpt Time Since Chkpt XAG MANAGER RUNNING MANAGED/xag.ogg_ha.goldengate/rac01EXTRACT 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_haGoldengate instance 'ogg_ha' is running on rac01As root connect to rac01 and shut down the node.[oracle@rac01 bin]$ su - Password: [root@rac01 ~]# shutdown -h nowOn rac02, note the failover of GoldenGate to rac02 is in progress.[oracle@rac02 bin]$ ./agctl status goldengate ogg_haGoldengate instance 'ogg_ha' is not runningNote: it may take a few minutes to start GoldenGate processes on node rac02 after failover[oracle@rac02 bin]$ ./agctl status goldengate ogg_haGoldengate instance 'ogg_ha' is running on rac02 Additional Information: ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches