Create Application VIP on GI 11gR2

###################################################################
## How to add an Application VIP to Oracle Cluster 11gR2
###################################################################

Oracle Clusterware includes the utility appvipcfg which allows to easily create application VIPs; below an example based on a cluster 11.2.0.3.1

[root@lnxcld02 ~]# appvipcfg -h
 Production Copyright 2007, 2008, Oracle.All rights reserved
 Unknown option: h
Usage: appvipcfg create -network=<network_number> -ip=<ip_address> -vipname=<vipname>
 -user=<user_name>[-group=<group_name>] [-failback=0 | 1]
 delete -vipname=<vipname>
--Example to run as root user:
 [root@lnxcld02 ~]# appvipcfg create -network=1 -ip=192.168.2.200 -vipname=myappvip -user=grid -group=oinstall
Production Copyright 2007, 2008, Oracle.All rights reserved
 2012-02-10 14:39:23: Creating Resource Type
 2012-02-10 14:39:23: Executing /home/GRID_INFRA/product/11.2.0.3/bin/crsctl add type app.appvip_net1.type -basetype ora.cluster_vip_net1.type -file /home/GRID_INFRA/product/11.2.0.3/crs/template/appvip.type
 2012-02-10 14:39:23: Executing cmd: /home/GRID_INFRA/product/11.2.0.3/bin/crsctl add type app.appvip_net1.type -basetype ora.cluster_vip_net1.type -file /home/GRID_INFRA/product/11.2.0.3/crs/template/appvip.type
 2012-02-10 14:39:26: Create the Resource
 2012-02-10 14:39:26: Executing /home/GRID_INFRA/product/11.2.0.3/bin/crsctl add resource myappvip -type app.appvip_net1.type -attr "USR_ORA_VIP=192.168.2.200,START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network),STOP_DEPENDENCIES=hard(ora.net1.network),ACL='owner:root:rwx,pgrp:root:r-x,other::r--,group:oinstall:r-x,user:grid:r-x',HOSTING_MEMBERS=lnxcld02,APPSVIP_FAILBACK="
 2012-02-10 14:39:26: Executing cmd: /home/GRID_INFRA/product/11.2.0.3/bin/crsctl add resource myappvip -type app.appvip_net1.type -attr "USR_ORA_VIP=192.168.2.200,START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network),STOP_DEPENDENCIES=hard(ora.net1.network),ACL='owner:root:rwx,pgrp:root:r-x,other::r--,group:oinstall:r-x,user:grid:r-x',HOSTING_MEMBERS=lnxcld02,APPSVIP_FAILBACK="
##############################################################################################
[grid@lnxcld02 trace]$ crsctl stat res -t
 --------------------------------------------------------------------------------
 NAME           TARGET  STATE        SERVER                   STATE_DETAILS
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.DATA1.dg
 ONLINE  ONLINE       lnxcld01
 ONLINE  ONLINE       lnxcld02
 ora.FRA1.dg
 ONLINE  ONLINE       lnxcld01
 ONLINE  ONLINE       lnxcld02
 ora.LISTENER.lsnr
 ONLINE  ONLINE       lnxcld01
 ONLINE  ONLINE       lnxcld02
 ora.OCRVOTING.dg
 ONLINE  ONLINE       lnxcld01
 ONLINE  ONLINE       lnxcld02
 ora.asm
 ONLINE  ONLINE       lnxcld01                 Started
 ONLINE  ONLINE       lnxcld02                 Started
 ora.gsd
 OFFLINE OFFLINE      lnxcld01
 OFFLINE OFFLINE      lnxcld02
 ora.net1.network
 ONLINE  ONLINE       lnxcld01
 ONLINE  ONLINE       lnxcld02
 ora.ons
 ONLINE  ONLINE       lnxcld01
 ONLINE  ONLINE       lnxcld02
 ora.registry.acfs
 ONLINE  ONLINE       lnxcld01
 ONLINE  ONLINE       lnxcld02
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 myappvip
 1        ONLINE  ONLINE       lnxcld02
 ora.LISTENER_SCAN1.lsnr
 1        ONLINE  ONLINE       lnxcld02
 ora.cvu
 1        ONLINE  ONLINE       lnxcld02
 ora.lnxcld01.vip
 1        ONLINE  ONLINE       lnxcld01
 ora.lnxcld02.vip
 1        ONLINE  ONLINE       lnxcld02
 ora.oc4j
 1        ONLINE  ONLINE       lnxcld02
 ora.scan1.vip
 1        ONLINE  ONLINE       lnxcld02
 ora.tpolicy.db
 1        ONLINE  ONLINE       lnxcld01                 Open
 2        ONLINE  ONLINE       lnxcld02                 Open
 ora.tpolicy.loadbalance_rw.svc
 1        ONLINE  ONLINE       lnxcld01
 2        ONLINE  ONLINE       lnxcld02
##############################################################################################
[grid@lnxcld02 ~]$ crsctl stat res myappvip -p
 NAME=myappvip
 TYPE=app.appvip_net1.type
 ACL=owner:root:rwx,pgrp:root:r-x,other::r--,group:oinstall:r-x,user:grid:r-x
 ACTION_FAILURE_TEMPLATE=
 ACTION_SCRIPT=
 ACTIVE_PLACEMENT=1
 AGENT_FILENAME=%CRS_HOME%/bin/orarootagent%CRS_EXE_SUFFIX%
 APPSVIP_FAILBACK=0
 AUTO_START=restore
 CARDINALITY=1
 CHECK_INTERVAL=1
 CHECK_TIMEOUT=30
 DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=vip)
 DEGREE=1
 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=lnxcld02
 LOAD=1
 LOGGING_LEVEL=1
 NLS_LANG=
 NOT_RESTARTING_TEMPLATE=
 OFFLINE_CHECK_INTERVAL=0
 PLACEMENT=balanced
 PROFILE_CHANGE_TEMPLATE=
 RESTART_ATTEMPTS=0
 SCRIPT_TIMEOUT=60
 SERVER_POOLS=*
 START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network)
 START_TIMEOUT=0
 STATE_CHANGE_TEMPLATE=
 STOP_DEPENDENCIES=hard(ora.net1.network)
 STOP_TIMEOUT=0
 TYPE_VERSION=2.1
 UPTIME_THRESHOLD=7d
 USR_ORA_ENV=
 USR_ORA_VIP=192.168.2.200
 VERSION=11.2.0.3.0

How to restore OCR and Voting disk

################################################################
# How to restore OCR and Voting disk  on Oracle 11g R2.
################################################################

--Location and status of OCR before starting the test:
 root@host1:/u01/GRID/11.2/cdata # /u01/GRID/11.2/bin/ocrcheck
 Status of Oracle Cluster Registry is as follows :
 Version                  :          3
 Total space (kbytes)     :     262120
 Used space (kbytes)      :       2744
 Available space (kbytes) :     259376
 ID                       :  401168391
 Device/File Name         : +OCRVOTING
 Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
--Check the existency of BACKUPS:
 root@host1:/root # /u01/GRID/11.2/bin/ocrconfig -showbackup
host1     2010/01/21 14:17:54     /u01/GRID/11.2/cdata/cluster01/backup00.ocr
host1     2010/01/21 05:58:31     /u01/GRID/11.2/cdata/cluster01/backup01.ocr
host1     2010/01/21 01:58:30     /u01/GRID/11.2/cdata/cluster01/backup02.ocr
host1     2010/01/20 05:58:21     /u01/GRID/11.2/cdata/cluster01/day.ocr
host1     2010/01/14 23:12:07     /u01/GRID/11.2/cdata/cluster01/week.ocr
 PROT-25: Manual backups for the Oracle Cluster Registry are not available
--Identify all the disks belong the Disk group +OCRVOTING:
NAME                                       PATH
 ------------------------------ ------------------------------------------------------------
 OCRVOTING_0000                 /dev/oracle/asm.25.lun
 OCRVOTING_0001                 /dev/oracle/asm.26.lun
 OCRVOTING_0002                 /dev/oracle/asm.27.lun
 OCRVOTING_0003                 /dev/oracle/asm.28.lun
 OCRVOTING_0004                 /dev/oracle/asm.29.lun
5 rows selected.
--Corrupt tht disks belong the Disk group +OCRVOTING:
 dd if=/tmp/corrupt_disk of=/dev/oracle/asm.25.lun bs=1024 count=1000
 dd if=/tmp/corrupt_disk of=/dev/oracle/asm.26.lun bs=1024 count=1000
 dd if=/tmp/corrupt_disk of=/dev/oracle/asm.27.lun bs=1024 count=1000
 dd if=/tmp/corrupt_disk of=/dev/oracle/asm.28.lun bs=1024 count=1000
 dd if=/tmp/corrupt_disk of=/dev/oracle/asm.29.lun bs=1024 count=1000
--OCR Check after Corruption:
 root@host1:/tmp # /u01/GRID/11.2/bin/ocrcheck
 Status of Oracle Cluster Registry is as follows :
 Version                  :          3
 Total space (kbytes)     :     262120
 Used space (kbytes)      :       2712
 Available space (kbytes) :     259408
 ID                       :  701409037
 Device/File Name         : +OCRVOTING
 Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
--Stop and Start of database instance after corruption
 oracle@host1:/u01/oracle/data $ srvctl stop instance -d DB -i DB1
 oracle@host1:/u01/oracle/data $ srvctl start instance -d DB -i DB1
--Stop and Start entire Cluster:
-host1:
 root@host1:/tmp # /u01/GRID/11.2/bin/crsctl stop crs
 CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'host1'
 CRS-2673: Attempting to stop 'ora.crsd' on 'host1'
 CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'host1'
 CRS-2673: Attempting to stop 'ora.OCRVOTING.dg' on 'host1'
 CRS-2673: Attempting to stop 'ora.db.db' on 'host1'
 CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'host1'
 CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.host1.vip' on 'host1'
 CRS-2677: Stop of 'ora.host1.vip' on 'host1' succeeded
 CRS-2677: Stop of 'ora.OCRVOTING.dg' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.scan2.vip' on 'host1'
 CRS-2673: Attempting to stop 'ora.scan3.vip' on 'host1'
 CRS-2673: Attempting to stop 'ora.host2.vip' on 'host1'
 CRS-2677: Stop of 'ora.scan2.vip' on 'host1' succeeded
 CRS-2677: Stop of 'ora.scan3.vip' on 'host1' succeeded
 CRS-2677: Stop of 'ora.host2.vip' on 'host1' succeeded
 CRS-2677: Stop of 'ora.db.db' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.DATA1.dg' on 'host1'
 CRS-2673: Attempting to stop 'ora.FRA1.dg' on 'host1'
 CRS-2677: Stop of 'ora.DATA1.dg' on 'host1' succeeded
 CRS-2677: Stop of 'ora.FRA1.dg' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.asm' on 'host1'
 CRS-2677: Stop of 'ora.asm' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.ons' on 'host1'
 CRS-2673: Attempting to stop 'ora.eons' on 'host1'
 CRS-2677: Stop of 'ora.ons' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.net1.network' on 'host1'
 CRS-2677: Stop of 'ora.net1.network' on 'host1' succeeded
 CRS-2677: Stop of 'ora.eons' on 'host1' succeeded
 CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'host1' has completed
 CRS-2677: Stop of 'ora.crsd' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.mdnsd' on 'host1'
 CRS-2673: Attempting to stop 'ora.gpnpd' on 'host1'
 CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'host1'
 CRS-2673: Attempting to stop 'ora.ctssd' on 'host1'
 CRS-2673: Attempting to stop 'ora.evmd' on 'host1'
 CRS-2673: Attempting to stop 'ora.asm' on 'host1'
 CRS-2677: Stop of 'ora.cssdmonitor' on 'host1' succeeded
 CRS-2677: Stop of 'ora.mdnsd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.gpnpd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.evmd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.ctssd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.asm' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.cssd' on 'host1'
 CRS-2677: Stop of 'ora.cssd' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.diskmon' on 'host1'
 CRS-2673: Attempting to stop 'ora.gipcd' on 'host1'
 CRS-2677: Stop of 'ora.gipcd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.diskmon' on 'host1' succeeded
 CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'host1' has completed
 CRS-4133: Oracle High Availability Services has been stopped.
--host2:
 root@host2:/root # /u01/GRID/11.2/bin/crsctl stop crs
 CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'host2'
 CRS-2673: Attempting to stop 'ora.crsd' on 'host2'
 CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'host2'
 CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'host2'
 CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'host2'
 CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'host2'
 CRS-2673: Attempting to stop 'ora.OCRVOTING.dg' on 'host2'
 CRS-2673: Attempting to stop 'ora.db.db' on 'host2'
 CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'host2'
 CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.scan2.vip' on 'host2'
 CRS-2677: Stop of 'ora.scan2.vip' on 'host2' succeeded
 CRS-2672: Attempting to start 'ora.scan2.vip' on 'host1'
 CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.scan3.vip' on 'host2'
 CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.host2.vip' on 'host2'
 CRS-2677: Stop of 'ora.scan3.vip' on 'host2' succeeded
 CRS-2672: Attempting to start 'ora.scan3.vip' on 'host1'
 CRS-2677: Stop of 'ora.host2.vip' on 'host2' succeeded
 CRS-2672: Attempting to start 'ora.host2.vip' on 'host1'
 CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.scan1.vip' on 'host2'
 CRS-2677: Stop of 'ora.scan1.vip' on 'host2' succeeded
 CRS-2676: Start of 'ora.scan2.vip' on 'host1' succeeded
 CRS-2676: Start of 'ora.scan3.vip' on 'host1' succeeded
 CRS-2676: Start of 'ora.host2.vip' on 'host1' succeeded
 CRS-2677: Stop of 'ora.OCRVOTING.dg' on 'host2' succeeded
 CRS-2677: Stop of 'ora.db.db' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.DATA1.dg' on 'host2'
 CRS-2673: Attempting to stop 'ora.FRA1.dg' on 'host2'
 CRS-2677: Stop of 'ora.DATA1.dg' on 'host2' succeeded
 CRS-2677: Stop of 'ora.FRA1.dg' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.asm' on 'host2'
 CRS-2677: Stop of 'ora.asm' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.ons' on 'host2'
 CRS-2673: Attempting to stop 'ora.eons' on 'host2'
 CRS-2677: Stop of 'ora.ons' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.net1.network' on 'host2'
 CRS-2677: Stop of 'ora.net1.network' on 'host2' succeeded
 CRS-2677: Stop of 'ora.eons' on 'host2' succeeded
 CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'host2' has completed
 CRS-2677: Stop of 'ora.crsd' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.gpnpd' on 'host2'
 CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'host2'
 CRS-2673: Attempting to stop 'ora.ctssd' on 'host2'
 CRS-2673: Attempting to stop 'ora.evmd' on 'host2'
 CRS-2673: Attempting to stop 'ora.asm' on 'host2'
 CRS-2673: Attempting to stop 'ora.mdnsd' on 'host2'
 CRS-2677: Stop of 'ora.cssdmonitor' on 'host2' succeeded
 CRS-2677: Stop of 'ora.gpnpd' on 'host2' succeeded
 CRS-2677: Stop of 'ora.evmd' on 'host2' succeeded
 CRS-2677: Stop of 'ora.mdnsd' on 'host2' succeeded
 CRS-2677: Stop of 'ora.asm' on 'host2' succeeded
 CRS-2677: Stop of 'ora.ctssd' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.cssd' on 'host2'
 CRS-2677: Stop of 'ora.cssd' on 'host2' succeeded
 CRS-2673: Attempting to stop 'ora.diskmon' on 'host2'
 CRS-2673: Attempting to stop 'ora.gipcd' on 'host2'
 CRS-2677: Stop of 'ora.gipcd' on 'host2' succeeded
 CRS-2677: Stop of 'ora.diskmon' on 'host2' succeeded
 CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'host2' has completed
 CRS-4133: Oracle High Availability Services has been stopped.
--host1
 root@host1:/root # /u01/GRID/11.2/bin/crsctl start crs
 CRS-4123: Oracle High Availability Services has been started.
--host2
 root@host2:/u01/GRID/11.2/cdata/cluster01 # /u01/GRID/11.2/bin/crsctl start crs
 CRS-4123: Oracle High Availability Services has been started.
--CRS Alert log: (Start failed because the Diskgroup is not available)
 2010-01-21 16:29:07.785
 [cssd(10123)]CRS-1705:Found 0 configured voting files but 1 voting files are required, terminating to ensure data integrity; details at (:CSSNM00065:) in /u01/GRID/11.2/log/host1/cssd/ocssd.log
 2010-01-21 16:29:07.785
 [cssd(10123)]CRS-1603:CSSD on node host1 shutdown by user.
 2010-01-21 16:29:07.918
 [ohasd(9931)]CRS-2765:Resource 'ora.cssdmonitor' has failed on server 'host1'.
 2010-01-21 16:30:05.489
 [/u01/GRID/11.2/bin/orarootagent.bin(10113)]CRS-5818:Aborted command 'start for resource: ora.diskmon 1 1' for resource 'ora.diskmon'. Details at (:CRSAGF00113:) in /u01/GRID/11.2/log/host1/agent/ohasd/orarootagent_root/orarootagent_root.log.
 2010-01-21 16:30:09.504
 [ohasd(9931)]CRS-2757:Command 'Start' timed out waiting for response from the resource 'ora.diskmon'. Details at (:CRSPE00111:) in /u01/GRID/11.2/log/host1/ohasd/ohasd.log.
 2010-01-21 16:30:20.687
 [cssd(10622)]CRS-1713:CSSD daemon is started in clustered mode
 2010-01-21 16:30:21.801
 [cssd(10622)]CRS-1705:Found 0 configured voting files but 1 voting files are required, terminating to ensure data integrity; details at (:CSSNM00065:) in /u01/GRID/11.2/log/host1/cssd/ocssd.log
 2010-01-21 16:30:21.801
 [cssd(10622)]CRS-1603:CSSD on node host1 shutdown by user.
--host1 STOP CRS because due to Voting Disk unavailability is not running properly:
 root@host1:/tmp # /u01/GRID/11.2/bin/crsctl stop crs
 CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'host1'
 CRS-2673: Attempting to stop 'ora.crsd' on 'host1'
 CRS-4548: Unable to connect to CRSD
 CRS-2675: Stop of 'ora.crsd' on 'host1' failed
 CRS-2679: Attempting to clean 'ora.crsd' on 'host1'
 CRS-4548: Unable to connect to CRSD
 CRS-2678: 'ora.crsd' on 'host1' has experienced an unrecoverable failure
 CRS-0267: Human intervention required to resume its availability.
 CRS-2795: Shutdown of Oracle High Availability Services-managed resources on 'host1' has failed
 CRS-4687: Shutdown command has completed with error(s).
 CRS-4000: Command Stop failed, or completed with errors.
--Because all the processes are not STOPPING, disable the cluster AUTO Start and reboot
 --the server for cleaning all the pending processes.
root@host1:/tmp # /u01/GRID/11.2/bin/crsctl disable crs
 CRS-4621: Oracle High Availability Services autostart is disabled.
root@host1:/tmp # reboot
--Start the Cluster in EXLUSIVE Mode in order to recreate ASM Diskgroup:
 root@host1:/root # /u01/GRID/11.2/bin/crsctl start crs -excl
 CRS-4123: Oracle High Availability Services has been started.
 CRS-2672: Attempting to start 'ora.gipcd' on 'host1'
 CRS-2672: Attempting to start 'ora.mdnsd' on 'host1'
 CRS-2676: Start of 'ora.gipcd' on 'host1' succeeded
 CRS-2676: Start of 'ora.mdnsd' on 'host1' succeeded
 CRS-2672: Attempting to start 'ora.gpnpd' on 'host1'
 CRS-2676: Start of 'ora.gpnpd' on 'host1' succeeded
 CRS-2672: Attempting to start 'ora.cssdmonitor' on 'host1'
 CRS-2676: Start of 'ora.cssdmonitor' on 'host1' succeeded
 CRS-2672: Attempting to start 'ora.cssd' on 'host1'
 CRS-2679: Attempting to clean 'ora.diskmon' on 'host1'
 CRS-2681: Clean of 'ora.diskmon' on 'host1' succeeded
 CRS-2672: Attempting to start 'ora.diskmon' on 'host1'
 CRS-2676: Start of 'ora.diskmon' on 'host1' succeeded
 CRS-2676: Start of 'ora.cssd' on 'host1' succeeded
 CRS-2672: Attempting to start 'ora.ctssd' on 'host1'
 CRS-2676: Start of 'ora.ctssd' on 'host1' succeeded
 CRS-2672: Attempting to start 'ora.asm' on 'host1'
 CRS-2676: Start of 'ora.asm' on 'host1' succeeded
 CRS-2672: Attempting to start 'ora.crsd' on 'host1'
 CRS-2676: Start of 'ora.crsd' on 'host1' succeeded
--Stop ASM and restart it using a pfile example:
 *.asm_diskgroups='DATA1','FRA1'
 *.asm_diskstring='/dev/oracle/asm*'
 *.diagnostic_dest='/u01/oracle'
 +ASM1.instance_number=1
 +ASM2.instance_number=2
 *.instance_type='asm'
 *.large_pool_size=12M
 *.processes=500
 *.sga_max_size=1G
 *.sga_target=1G
 *.shared_pool_size=300M
--Recreate ASM Diskgroup
 --This command FAILS because asmca is not able to update the OCR:
 asmca -silent -createDiskGroup -diskGroupName OCRVOTING  -disk '/dev/oracle/asm.25.lun' -disk '/dev/oracle/asm.26.lun'  -disk '/dev/oracle/asm.27.lun'  -disk '/dev/oracle/asm.28.lun'  -disk '/dev/oracle/asm.29.lun'  -redundancy HIGH -compatible.asm '11.2.0.0.0'  -compatible.rdbms '11.2.0.0.0' -compatible.advm '11.2.0.0.0'
--Create the Diskgroup Using SQLPLUS Create Diskgroup and save the ASM spfile inside:
 create Diskgroup OCRVOTING high redundancy disk '/dev/oracle/asm.25.lun',
 '/dev/oracle/asm.26.lun', '/dev/oracle/asm.27.lun',
 '/dev/oracle/asm.28.lun', '/dev/oracle/asm.29.lun'
 ATTRIBUTE  'compatible.asm'='11.2.0.0.0', 'compatible.rdbms'='11.2.0.0.0';
create spfile='+OCRVOTING' from pfile='/tmp/asm_pfile.ora';
File created.
SQL> shut immediate
 ASM diskgroups dismounted
 ASM instance shutdown
 SQL> startup
 ASM instance started
Total System Global Area 1069252608 bytes
 Fixed Size                  2154936 bytes
 Variable Size            1041931848 bytes
 ASM Cache                  25165824 bytes
 ASM diskgroups mounted
-- Restore OCR from backup:
 root@host1:/root # /u01/GRID/11.2/bin/ocrconfig -restore /u01/GRID/11.2/cdata/cluster01/backup00.ocr
--Check the OCR status after restore:
 root@host1:/root # /u01/GRID/11.2/bin/ocrcheck
 Status of Oracle Cluster Registry is as follows :
 Version                  :          3
 Total space (kbytes)     :     262120
 Used space (kbytes)      :       2712
 Available space (kbytes) :     259408
 ID                       :  701409037
 Device/File Name         : +OCRVOTING
 Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
--Restore the Voting Disk:
 root@host1:/root # /u01/GRID/11.2/bin/crsctl replace votedisk +OCRVOTING
 Successful addition of voting disk 7s16f9fbf4b64f74bfy0ee8826f15eb4.
 Successful addition of voting disk 9k6af49d3cd54fc5bf28a2fc3899c8c6.
 Successful addition of voting disk 876eb99563924ff6bfc1defe6865deeb.
 Successful addition of voting disk 12230b5ef41f4fc2bf2cae957f765fb0.
 Successful addition of voting disk 47812b7f6p034f33bf13490e6e136b8b.
 Successfully replaced voting disk group with +OCRVOTING.
 CRS-4266: Voting file(s) successfully replaced
--Re-enable CRS auto starup
 root@host1:/root # /u01/GRID/11.2/bin/crsctl enable crs
 CRS-4622: Oracle High Availability Services autostart is enabled.
--Stop CRS on host1
 root@host1:/root # /u01/GRID/11.2/bin/crsctl stop crs
 CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'host1'
 CRS-2673: Attempting to stop 'ora.crsd' on 'host1'
 CRS-2677: Stop of 'ora.crsd' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.gpnpd' on 'host1'
 CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'host1'
 CRS-2673: Attempting to stop 'ora.ctssd' on 'host1'
 CRS-2673: Attempting to stop 'ora.asm' on 'host1'
 CRS-2673: Attempting to stop 'ora.mdnsd' on 'host1'
 CRS-2677: Stop of 'ora.cssdmonitor' on 'host1' succeeded
 CRS-2677: Stop of 'ora.gpnpd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.mdnsd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.ctssd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.asm' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.cssd' on 'host1'
 CRS-2677: Stop of 'ora.cssd' on 'host1' succeeded
 CRS-2673: Attempting to stop 'ora.diskmon' on 'host1'
 CRS-2673: Attempting to stop 'ora.gipcd' on 'host1'
 CRS-2677: Stop of 'ora.gipcd' on 'host1' succeeded
 CRS-2677: Stop of 'ora.diskmon' on 'host1' succeeded
 CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'host1' has completed
 CRS-4133: Oracle High Availability Services has been stopped.
--Start CRS on host1
 root@host1:/root # /u01/GRID/11.2/bin/crsctl start crs
 CRS-4123: Oracle High Availability Services has been started.
--Start CRS on host2
 root@host2:/root # /u01/GRID/11.2/bin/crsctl start crs
 CRS-4123: Oracle High Availability Services has been started.
--Check if all the Resources are running:
 root@host1:/root # /u01/GRID/11.2/bin/crsctl stat res -t
 --------------------------------------------------------------------------------
 NAME           TARGET  STATE        SERVER                   STATE_DETAILS
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.DATA1.dg
 ONLINE  ONLINE       host1
 ONLINE  ONLINE       host2
 ora.FRA1.dg
 ONLINE  ONLINE       host1
 ONLINE  ONLINE       host2
 ora.LISTENER.lsnr
 ONLINE  ONLINE       host1
 ONLINE  ONLINE       host2
 ora.OCRVOTING.dg
 ONLINE  ONLINE       host1
 ONLINE  ONLINE       host2
 ora.asm
 ONLINE  ONLINE       host1                 Started
 ONLINE  ONLINE       host2                 Started
 ora.eons
 ONLINE  ONLINE       host1
 ONLINE  ONLINE       host2
 ora.gsd
 OFFLINE OFFLINE      host1
 OFFLINE OFFLINE      host2
 ora.net1.network
 ONLINE  ONLINE       host1
 ONLINE  ONLINE       host2
 ora.ons
 ONLINE  ONLINE       host1
 ONLINE  ONLINE       host2
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 ora.LISTENER_SCAN1.lsnr
 1        ONLINE  ONLINE       host1
 ora.LISTENER_SCAN2.lsnr
 1        ONLINE  ONLINE       host2
 ora.LISTENER_SCAN3.lsnr
 1        ONLINE  ONLINE       host2
 ora.db.db
 1        ONLINE  ONLINE       host1                 Open
 2        ONLINE  ONLINE       host2                 Open
 ora.oc4j
 1        OFFLINE OFFLINE
 ora.scan1.vip
 1        ONLINE  ONLINE       host1
 ora.scan2.vip
 1        ONLINE  ONLINE       host2
 ora.scan3.vip
 1        ONLINE  ONLINE       host2
 ora.host1.vip
 1        ONLINE  ONLINE       host1
 ora.host2.vip
 1        ONLINE  ONLINE       host2

Installation Oracle Grid Infrastrucure 12c

####################################

LINUX Setup click here

####################################

Setup OS

– Disable the Firewall

[root@oel6srv01 ~]# service iptables save
[root@oel6srv01 ~]# service iptables stop
[root@oel6srv01 ~]# chkconfig iptables off
[root@oel6srv01 ~]# service iptables status
-- If you are using IPv6 firewall, enter:
 [root@oel6srv01 ~]# service ip6tables save
 [root@oel6srv01 ~]# service ip6tables stop
 [root@oel6srv01 ~]# chkconfig ip6tables off
 [root@oel6srv01 ~]# service ip6tables status


– Disable the SELinux

[root@oel6srv01 ~]# vi /etc/sysconfig/selinux


– DISABLED kdump

[root@oel6srv01 ~]# chkconfig kdump on
[root@oel6srv01 ~]# chkconfig --list |grep kdump
kdump           0:off   1:off   2:off   3:off   4:off   5:off   6:off


– Network Setup

Public Cluster interphases, VIPs and SCAN

Subnet 10.0.0.x
Netmask 255.255.255.0

Private Cluster interphases

Subnet  192.168.0.x
Netmask 255.255.255.0

 


– Kernel add or amend the following lines  to the “/etc/sysctl.conf” file.

# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
 fs.file-max = 6815744
 kernel.shmall = 2097152
 kernel.shmmax = 1062637568
 kernel.shmmni = 4096
 # semaphores: semmsl, semmns, semopm, semmni
 kernel.sem = 250 32000 100 128
 net.ipv4.ip_local_port_range = 9000 65500
 net.core.rmem_default=262144
 net.core.rmem_max=4194304
 net.core.wmem_default=262144
 net.core.wmem_max=1048586
--Activate the current Kernel parameters:
/sbin/sysctl -p

– Add the following lines to /etc/security/limits.conf

# vi  /etc/security/limits.conf
## Go to the end
 grid     soft     nproc      2047
 grid     hard     nproc     16384
 grid     soft     nofile     1024
 grid     hard     nofile    65536
 oracle   soft     nproc      2047
 oracle   hard     nproc     16384
 oracle   soft     nofile     1024
 oracle   hard     nofile    65536

– Add the following line to /etc/pam.d/login

# vi /etc/pam.d/login
session     required    pam_limits.so


– Disable secure linux

–making sure the SELINUX flag is set as follows.

# vi /etc/selinux/config
SELINUX=disabled


– NTP Setup

–If you are using NTP, you must add the “-x” option into the following line in the “/etc/sysconfig/ntpd” file.

# vi /etc/sysconfig/ntpd
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
# service ntpd restart
 -- OR STOP NTP SERVER the Grid will start CSSD in Active mode instead of Observe:
 # service ntpd stop
 # chkconfig ntpd off
---------------------------------------------
 - Mandatory Packages for Oracle Linux 6  and Red Hat Enterprise Linux 6
 ---------------------------------------------
 binutils-2.20.51.0.2-5.11.el6 (x86_64)
 compat-libcap1-1.10-1 (x86_64)
 compat-libstdc++-33-3.2.3-69.el6 (x86_64)
 compat-libstdc++-33-3.2.3-69.el6.i686
 gcc-4.4.4-13.el6 (x86_64)
 gcc-c++-4.4.4-13.el6 (x86_64)
 glibc-2.12-1.7.el6 (i686)
 glibc-2.12-1.7.el6 (x86_64)
 glibc-devel-2.12-1.7.el6 (x86_64)
 glibc-devel-2.12-1.7.el6.i686
 ksh
 libgcc-4.4.4-13.el6 (i686)
 libgcc-4.4.4-13.el6 (x86_64)
 libstdc++-4.4.4-13.el6 (x86_64)
 libstdc++-4.4.4-13.el6.i686
 libstdc++-devel-4.4.4-13.el6 (x86_64)
 libstdc++-devel-4.4.4-13.el6.i686
 libaio-0.3.107-10.el6 (x86_64)
 libaio-0.3.107-10.el6.i686
 libaio-devel-0.3.107-10.el6 (x86_64)
 libaio-devel-0.3.107-10.el6.i686
 make-3.81-19.el6
 sysstat-9.0.4-11.el6 (x86_64)

–Install the cvuqdisk RPM. Without cvuqdisk, Cluster Verification Utility cannot discover shared disks,
–and it raises the following error message “Package cvuqdisk not installed” when Cluster Verification Utility is executed.

–A copy of the cvuqdisk  package is present on the 1st Grid Infrastructure ZIP file.

— Log in as root.

  1. Use the following command to find if you have an existing version of the cvuqdisk package:
# rpm -qi cvuqdisk

2.  If you have an existing version, then enter the following command to deinstall the existing version:

rpm -e cvuqdisk

  1. Set the environment variable CVUQDISK_GRP to point to the group that will own cvuqdisk, typically oinstall. For example:
# CVUQDISK_GRP=oinstall; export CVUQDISK_GRP
4. Install the cvuqdisk package:
rpm -iv package
# rpm -iv cvuqdisk-1.0.9-1.rpm
--OR
you install oracle-rdbms-server-12cR1-preinstall


– OPTIONAL RPMs

--Minimum ODBC Drivers for Oracle and Red Hat Linux 6 on x86-64
 unixODBC-2.2.14-11.el6 (64-bit) or later
 unixODBC-devel-2.2.14-11.el6 (64-bit) or later

– UNIX Groups

/usr/sbin/groupadd -g 1000 oinstall
/usr/sbin/groupadd -g 1001 asmadmin
/usr/sbin/groupadd -g 1002 dba
/usr/sbin/groupadd -g 1003 asmdba
/usr/sbin/groupadd -g 1004 asmoper

–New optional roles which grant access to specific features like Data Guard, RMAN and Security have been added in 12c, but not implemented in this example.


– UNIX Users

useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper grid
useradd -u 1101 -g oinstall -G asmdba,dba oracle


– Set SSH timeout wait to unlimited

# vi /etc/ssh/sshd_config
LoginGraceTime 0

 


– Create the u01 file system

[root@oel6srv01 ~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 2871.
 There is nothing wrong with that, but this is larger than 1024,
 and could in certain setups cause problems with:
 1) software that runs at boot time (e.g., old versions of LILO)
 2) booting and partitioning software from other OSs
 (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
 Command action
 e   extended
 p   primary partition (1-4)
 p
Partition number (1-4): 1
 First cylinder (1-2871, default 1):
 Using default value 1
 Last cylinder or +size or +sizeM or +sizeK (1-2871, default 2871):
 Using default value 2871
Command (m for help): w
 The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
 The kernel still uses the old table.
 The new table will be used at the next reboot.
 Syncing disks.
 [root@oel6srv01 ~]#
 [root@oel6srv01 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
 255 heads, 63 sectors/track, 2610 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
 /dev/sda1   *           1          13      104391   83  Linux
 /dev/sda2              14        2610    20860402+  8e  Linux LVM
Disk /dev/sdb: 23.6 GB, 23622320128 bytes
 255 heads, 63 sectors/track, 2871 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
 /dev/sdb1               1        2871    23061276   83  Linux
[root@oel6srv01 ~]# mkfs.ext4 /dev/sdb1
 mke4fs 1.41.12 (17-May-2010)
 Filesystem label=
 OS type: Linux
 Block size=4096 (log=2)
 Fragment size=4096 (log=2)
 Stride=0 blocks, Stripe width=0 blocks
 1441792 inodes, 5765319 blocks
 288265 blocks (5.00%) reserved for the super user
 First data block=0
 Maximum filesystem blocks=4294967296
 176 block groups
 32768 blocks per group, 32768 fragments per group
 8192 inodes per group
 Superblock backups stored on blocks:
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
 4096000
Writing inode tables: done
 Creating journal (32768 blocks): done
 Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
 180 days, whichever comes first.  Use tune4fs -c or -i to override.
 [root@oel6srv01 ~]#
[root@oel6srv01 /]# mkdir u01
 [root@oel6srv01 /]# cat /etc/fstab
..
..
/dev/sdb1               /u01                    ext4    defaults        0 0
[root@oel6srv01 /]# mount /u01
 [root@oel6srv01 /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
 15G  3.2G   12G  22% /
 /dev/sda1              99M   24M   71M  25% /boot
 tmpfs                 1.3G     0  1.3G   0% /dev/shm
 /dev/sdb1              22G  172M   21G   1% /u01

– Creation of GI and RDBMS directories

mkdir -p /u01/GRID/12.1.0.1
 mkdir -p /u01/app/product/12.1.0.1
#Oracle Base
 chown -R oracle:oinstall /u01/app
 chmod -R 775 /u01/app
#Oracle RDBMS Home
 chown -R oracle:oinstall /u01/app/product/12.1.0.1
 chmod -R 775 /u01/app/product/12.1.0.1
#Grid Home
 chown -R grid:oinstall /u01/GRID
 chmod -R 775 /u01/GRID/12.1.0.1

– Add this entries to the generic User Profile

# vi /etc/profile
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
 if [ $SHELL = "/bin/ksh" ]; then
 ulimit -p 16384
 ulimit -n 65536
 else
 ulimit -u 16384 -n 65536
 fi
 umask 022
 fi
 if [ $USER = "root" ]; then
 umask 022
 fi

— Configure the shared storage for ASM

##########################################################
##  Installation Oracle Grid Infrastructure
##########################################################

--Run 12c Cluvfy with the following options to verify that all prerequisites are met:
 ./runcluvfy.sh stage -post hwos -n oel6srv01,oel6srv02,oel6srv03,oel6srv04 -verbose

# Start the Grid Installation…..

[grid@oel6srv01 grid]$ ./runInstaller
 Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 39776 MB    Passed
 Checking swap space: must be greater than 150 MB.   Actual 4031 MB    Passed
 Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
 Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-06-25_08-23-26PM. Please wait ..

 

##############################################################
##  Grid Infrastructure crsctl output
##############################################################

[grid@oel6srv01 ~]$ crsctl stat res -t
 --------------------------------------------------------------------------------
 Name           Target  State        Server                   State details
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.ASMNET2LSNR_ASM.lsnr
 ONLINE  ONLINE       oel6srv01                STABLE
 ONLINE  ONLINE       oel6srv02                STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 ora.DATA1.VOL_CLOUD01.advm
 ONLINE  ONLINE       oel6srv01                Volume device /dev/a
 sm/vol_cloud01-178 i
 s online,STABLE
 ONLINE  ONLINE       oel6srv02                Volume device /dev/a
 sm/vol_cloud01-178 i
 s online,STABLE
 ONLINE  ONLINE       oel6srv03                Volume device /dev/a
 sm/vol_cloud01-178 i
 s online,STABLE
 ONLINE  ONLINE       oel6srv04                Volume device /dev/a
 sm/vol_cloud01-178 i
 s online,STABLE
 ora.DATA1.dg
 OFFLINE OFFLINE      oel6srv01               STABLE
 OFFLINE OFFLINE      oel6srv02               STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 ora.FRA1.dg
 OFFLINE OFFLINE      oel6srv01               STABLE
 OFFLINE OFFLINE      oel6srv02               STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 ora.LISTENER.lsnr
 ONLINE  ONLINE       oel6srv01                STABLE
 ONLINE  ONLINE       oel6srv02                STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 ora.OCRVOTING.dg
 OFFLINE OFFLINE      oel6srv01               STABLE
 OFFLINE OFFLINE      oel6srv02               STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 ora.data1.vol_cloud01.acfs
 ONLINE  ONLINE       oel6srv01                mounted on /cloudfs,
 STABLE
 ONLINE  ONLINE       oel6srv02                mounted on /cloudfs,
 STABLE
 ONLINE  ONLINE       oel6srv03                mounted on /cloudfs,
 STABLE
 ONLINE  ONLINE       oel6srv04                mounted on /cloudfs,
 STABLE
 ora.net1.network
 ONLINE  ONLINE       oel6srv01                STABLE
 ONLINE  ONLINE       oel6srv02                STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 ora.ons
 ONLINE  ONLINE       oel6srv01                STABLE
 ONLINE  ONLINE       oel6srv02                STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 ora.proxy_advm
 ONLINE  ONLINE       oel6srv01                STABLE
 ONLINE  ONLINE       oel6srv02                STABLE
 ONLINE  ONLINE       oel6srv03                STABLE
 ONLINE  ONLINE       oel6srv04                STABLE
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 ora.LISTENER_SCAN1.lsnr
 1        ONLINE  ONLINE       oel6srv04                STABLE
 ora.MGMTLSNR
 1        ONLINE  ONLINE       oel6srv04                169.254.25.188 192.1
 68.0.114 192.168.0.1
 24,STABLE
 ora.asm
 1        ONLINE  ONLINE       oel6srv04                STABLE
 3        ONLINE  ONLINE       oel6srv03                STABLE
 ora.cvu
 1        ONLINE  ONLINE       oel6srv04                STABLE
 ora.mgmtdb
 1        ONLINE  ONLINE       oel6srv04                Open,STABLE
 ora.oc4j
 1        ONLINE  ONLINE       oel6srv01                STABLE
 ora.oel6srv01.vip
 1        ONLINE  ONLINE       oel6srv01                STABLE
 ora.oel6srv02.vip
 1        ONLINE  ONLINE       oel6srv02                STABLE
 ora.oel6srv03.vip
 1        ONLINE  ONLINE       oel6srv03                STABLE
 ora.oel6srv04.vip
 1        ONLINE  ONLINE       oel6srv04                STABLE
 ora.scan1.vip
 1        ONLINE  ONLINE       oel6srv04                STABLE
 --------------------------------------------------------------------------------

ASM Commands

################################################################
# Adding/Removing/Managing ASM instances
################################################################

--Use the following syntax to add configuration information about an existing ASM instance:
 srvctl add asm -n node_name -i +asm_instance_name -o oracle_home

--Use the following syntax to remove an ASM instance:
 srvctl remove asm -n node_name [-i +asm_instance_name]

--Use the following syntax to enable an ASM instance:
 srvctl enable asm -n node_name [-i ] +asm_instance_name

--Use the following syntax to disable an ASM instance:
 srvctl disable asm -n node_name [-i +asm_instance_name]

--Use the following syntax to start an ASM instance:
 srvctl start asm -n node_name [-i +asm_instance_name] [-o start_options]

--Use the following syntax to stop an ASM instance:
 srvctl stop asm -n node_name [-i +asm_instance_name] [-o stop_options]

--Use the following syntax to show the configuration of an ASM instance:
 srvctl config asm -n node_name

--Use the following syntax to obtain the status of an ASM instance:
 srvctl status asm -n node_name

P.S.:

For all of the SRVCTL commands in this section for which an option is not required, if the instance name “-i” is not specified the command applies  to all ASM instances.

 

###################################
# Managing DiskGroup inside ASM:
###################################

–Note that adding or dropping disks will initiate a rebalance of the data on the disks.
–The status of these processes can be shown by selecting from v$asm_operation.

--Quering ASM Disk Groups
 col name format a25
 col DATABASE_COMPATIBILITY format a10
 col COMPATIBILITY format a10
 select * from v$asm_diskgroup;
 --or
 select name, state, type, total_mb, free_mb from v$asm_diskgroup;
--Quering ASM Disks
 col PATH format a55
 col name format a25
 select name, path, group_number, TOTAL_MB, FREE_MB, READS, WRITES, READ_TIME,
 WRITE_TIME from v$asm_disk order by 3,1;
 --or
 col PATH format a50
 col HEADER_STATUS  format a12
 col name format a25
 --select INCARNATION,
 select name, path, MOUNT_STATUS,HEADER_STATUS, MODE_STATUS, STATE, group_number,
 OS_MB, TOTAL_MB, FREE_MB, READS, WRITES, READ_TIME, WRITE_TIME, BYTES_READ,
 BYTES_WRITTEN, REPAIR_TIMER, MOUNT_DATE, CREATE_DATE from v$asm_disk;

 

 

################################################################
# Tuning and Analysis
################################################################

–Performance Statistics

–N.B Time in Hundred seconds!

 col READ_TIME format 9999999999.99
 col WRITE_TIME format 9999999999.99
 col BYTES_READ format 99999999999999.99
 col BYTES_WRITTEN  format 99999999999999.99
 select name, STATE, group_number, TOTAL_MB, FREE_MB,READS, WRITES, READ_TIME,
 WRITE_TIME, BYTES_READ, BYTES_WRITTEN, REPAIR_TIMER,MOUNT_DATE
 from v$asm_disk order by group_number, name;

 

--Check the Num of Extents in use per Disk inside one Disk Group.
 select max(substr(name,1,30)) group_name, count(PXN_KFFXP) extents_per_disk,
 DISK_KFFXP, GROUP_KFFXP from x$kffxp, v$ASM_DISKGROUP gr
 where GROUP_KFFXP=&group_nr and GROUP_KFFXP=GROUP_NUMBER
 group by GROUP_KFFXP, DISK_KFFXP order by GROUP_KFFXP, DISK_KFFXP;

--Find The File distribution Between Disks
 SELECT * FROM v$asm_alias  WHERE  name='PWX_DATA.272.669293645';

SELECT GROUP_KFFXP Group#,DISK_KFFXP Disk#,AU_KFFXP AU#,XNUM_KFFXP Extent#
 FROM   X$KFFXP WHERE  number_kffxp=(SELECT file_number FROM v$asm_alias
 WHERE name='PWX_DATA.272.669293645');

--or

SELECT GROUP_KFFXP Group#,DISK_KFFXP Disk#,AU_KFFXP AU#,XNUM_KFFXP Extent#
 FROM X$KFFXP WHERE  number_kffxp=&DataFile_Number;

--or
 select d.name, XV.GROUP_KFFXP Group#, XV.DISK_KFFXP Disk#,
 XV.NUMBER_KFFXP File_Number, XV.AU_KFFXP AU#, XV.XNUM_KFFXP Extent#,
 XV.ADDR, XV.INDX, XV.INST_ID, XV.COMPOUND_KFFXP, XV.INCARN_KFFXP,
 XV.PXN_KFFXP, XV.XNUM_KFFXP,XV.LXN_KFFXP, XV.FLAGS_KFFXP,
 XV.CHK_KFFXP, XV.SIZE_KFFXP from v$asm_disk d, X$KFFXP XV
 where d.GROUP_NUMBER=XV.GROUP_KFFXP and d.DISK_NUMBER=XV.DISK_KFFXP
 and number_kffxp=&File_NUM order by 2,3,4;

--List the hierarchical tree of files stored in the diskgroup
 SELECT concat('+'||gname, sys_connect_by_path(aname, '/')) full_alias_path FROM
 (SELECT g.name gname, a.parent_index pindex, a.name aname,
 a.reference_index rindex FROM v$asm_alias a, v$asm_diskgroup g
 WHERE a.group_number = g.group_number)
 START WITH (mod(pindex, power(2, 24))) = 0
 CONNECT BY PRIOR rindex = pindex;

 

 

###################################
#Create and Modify Disk Group
###################################

create diskgroup FRA1 external redundancy disk '/dev/vx/rdsk/oraASMdg/fra1'
 ATTRIBUTE 'compatible.rdbms' = '11.1', 'compatible.asm' = '11.1';

alter diskgroup FRA1  check all;

--on +ASM2 :
 alter diskgroup FRA1 mount;

--Add a second disk:
 alter diskgroup FRA1 add disk '/dev/vx/rdsk/oraASMdg/fra2';

--Add several disks with a wildcard:
 alter diskgroup FRA1 add disk '/dev/vx/rdsk/oraASMdg/fra*';

--Remove a disk from a diskgroup:
 alter diskgroup FRA1 drop disk 'FRA1_0002';

--Drop the entire DiskGroup
 drop diskgroup DATA1 including contents;

--How to DROP the entire DiskGroup when it is in NOMOUNT Status
 --Generate the dd command which will reset the header of all the
 --disks belong the GROUP_NUMBER=0!!!!
 select 'dd if=/dev/zero of=''' ||PATH||''' bs=8192 count=100' from v$asm_disk
 where GROUP_NUMBER=0;

select * from v$asm_operation;

————————————————————————–

alter diskgroup FRA1 drop disk 'FRA1_0002';
 alter diskgroup FRA1 add disk '/dev/vx/rdsk/fra1dg/fra3';

alter diskgroup FRA1 drop disk 'FRA1_0003';
 alter diskgroup FRA1 add disk '/dev/vx/rdsk/fra1dg/fra4';

 

When a new diskgroup is created, it is only mounted on the local instance,
and only the instance-specific entry for the asm_diskgroups parameter is updated.
By manually mounting the diskgroup on other instances, the asm_diskgroups parameter on those instances are updated.

--on +ASM1 :
 create diskgroup FRA1 external redundancy disk '/dev/vx/rdsk/fradg/fra1'
 ATTRIBUTE 'compatible.rdbms' = '11.1', 'compatible.asm' = '11.1';

--on +ASM2 :
 alter diskgroup FRA1 mount;

--It works even for on going balances!!!
 alter diskgroup DATA1 rebalance power 10;

 

################################################################
# New ASM Command Line Utility (ASMCMD) Commands and Options
################################################################

ASMCMD Command Reference:

Command Description
 --------------------
 - cd Command Changes the current directory to the specified directory.
 - cp Command Enables you to copy files between ASM disk groups on a local instance and remote instances.
 - du Command Displays the total disk space occupied by ASM files in the specified
 - ASM directory and all of its subdirectories, recursively.
 - exit Command Exits ASMCMD.
 - find Command Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory.
 - help Command Displays the syntax and description of ASMCMD commands.
 - ls Command Lists the contents of an ASM directory, the attributes of the specified
 - file, or the names and attributes of all disk groups.
 - lsct Command Lists information about current ASM clients.
 - lsdg Command Lists all disk groups and their attributes.
 - lsdsk Command Lists disks visible to ASM.
 - md_backup Command Creates a backup of all of the mounted disk groups.
 - md_restore Command Restores disk groups from a backup.
 - mkalias Command Creates an alias for system-generated filenames.
 - mkdir Command Creates ASM directories.
 - pwd Command Displays the path of the current ASM directory.
 - remap Command Repairs a range of physical blocks on a disk.
 - rm Command Deletes the specified ASM files or directories.
 - rmalias Command Deletes the specified alias, retaining the file that the alias points to.

--------
 -- kfed tool From Unix Prompt for reading ASM disk header.
 kfed read /dev/vx/rdsk/fra1dg/fra1

 

################################################################
# CREATE and Manage Tablespaces and Datafiles on ASM
################################################################

CREATE TABLESPACE my_ts DATAFILE '+disk_group_1' SIZE 100M AUTOEXTEND ON;

ALTER TABLESPACE sysaux ADD DATAFILE '+disk_group_1' SIZE 100M;

ALTER DATABASE DATAFILE '+DATA1/dbname/datafile/audit.259.668957419' RESIZE 150M;
-------------------------
 create diskgroup DATA1 external redundancy disk '/dev/vx/rdsk/oraASMdg/fra1'
 ATTRIBUTE 'compatible.rdbms' = '11.1', 'compatible.asm' = '11.1';

select 'alter diskgroup DATA1 add disk ''' || PATH || ''';' from v$asm_disk
 where GROUP_NUMBER=0 and rownum<=&Num_Disks_to_add;

select 'alter diskgroup FRA1 add disk ''' || PATH || ''';' from v$asm_disk
 where GROUP_NUMBER=0 and rownum<=&Num_Disks_to_add;

--Remove ASM header
 select 'dd if=/dev/zero of=''' ||PATH||''' bs=8192 count=100' from v$asm_disk
 where GROUP_NUMBER=0;

Setup ASM Lib

#####################################
##       How to install and setup ASMLib packages         ##
#####################################

###### List of Platform depenfent but Kernel independent packages ######
 oracleasm-support-2.1.3-1.<distro>.x86_64.rpm
 oracleasmlib-2.0.4-1.<distro>.x86_64.rpm
###### List of Platform and Kernel dependent packages ######
 oracleasm-2.6.16.46-0.12-smp-2.0.3-1.x86_64.rpm
 oracleasm-2.6.16.46-0.12-default-2.0.3-1.x86_64.rpm
-- Install the packages using the command rpm –ivh on all the nodes
###### ASMLib Configuration (to repeat on all nodes of the cluster)  ######
 [root@lrh-node1 /]# /etc/init.d/oracleasm configure
 Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
 driver. The following questions will determine whether the driver is
 loaded on boot and what permissions it will have. The current values
 will be shown in brackets ('[]'). Hitting without typing an
 answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
 Default group to own the driver interface []: asmdba
 Start Oracle ASM library driver on boot (y/n) [n]: y
 Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
 Writing Oracle ASM library driver configuration [ OK ]
 Creating /dev/oracleasm mount point [ OK ]
 Loading module "oracleasm" [ OK ]
 Mounting ASMlib driver filesystem [ OK ]
 Scanning system for ASM disks [ OK ]
--------------------------------------------------------
 -- Create disk partitions and  ASM disks
 -- (from one of the nodes of the cluster)
 --------------------------------------------------------
-- Having a list of devices dedicated to ASM create one primary partition per disk or LUN using fdisk
 -- command and than use ASMLib utility to implement one ASM Disk per device.
lrh-node1:/u01 # fdisk -l /dev/sdh
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
 255 heads, 63 sectors/track, 4699 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
 /dev/sdh1               1        4700    37747712   83  Linux
 lrh-node1:/u01 # fdisk -l /dev/sdi
Disk /dev/sdi: 38.6 GB, 38654705664 bytes
 255 heads, 63 sectors/track, 4699 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
 /dev/sdi1               1        4700    37747712   83  Linux
 lrh-node1:/u01 # fdisk -l /dev/sdj
Disk /dev/sdj: 38.6 GB, 38654705664 bytes
 255 heads, 63 sectors/track, 4699 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
 /dev/sdj1               1        4699    37744686   83  Linux
 lrh-node1:/u01 #
 lrh-node1:/u01 # fdisk /dev/sdh
The number of cylinders for this disk is set to 4699.
 There is nothing wrong with that, but this is larger than 1024,
 and could in certain setups cause problems with:
 1) software that runs at boot time (e.g., old versions of LILO)
 2) booting and partitioning software from other OSs
 (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): d
 Selected partition 1
Command (m for help): p
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
 255 heads, 63 sectors/track, 4699 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
Command (m for help): n
 Command action
 e   extended
 p   primary partition (1-4)
 p
 Partition number (1-4): 1
 First cylinder (1-4699, default 1): 1
 Last cylinder or +size or +sizeM or +sizeK (1-4699, default 4699): +1024M
Command (m for help): p
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
 255 heads, 63 sectors/track, 4699 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
 /dev/sdh1               1         125     1004031   83  Linux
Command (m for help): n
 Command action
 e   extended
 p   primary partition (1-4)
 p
 Partition number (1-4): 2
 First cylinder (126-4699, default 126):
 Using default value 126
 Last cylinder or +size or +sizeM or +sizeK (126-4699, default 4699):
 Using default value 4699
Command (m for help): p
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
 255 heads, 63 sectors/track, 4699 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
 /dev/sdh1               1         125     1004031   83  Linux
 /dev/sdh2             126        4699    36740655   83  Linux
Command (m for help): w
 The partition table has been altered!
Calling ioctl() to re-read partition table.
 Syncing disks.
 lrh-node1:/u01 #partprobe
######  Once the disks have been sliced the ASM Disks can be created ######
 lrh-node1:/u01 # /etc/init.d/oracleasm
 Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
 lrh-node1:/u01 # /etc/init.d/oracleasm createdisk OCR1 /dev/sdh1
 Marking disk "/dev/sdh1" as an ASM disk:                              done
 lrh-node1:/u01 # /etc/init.d/oracleasm createdisk DATA1 /dev/sdh2
 Marking disk "/dev/sdh2" as an ASM disk:                              done
 lrh-node1:/u01 # /etc/init.d/oracleasm scandisks
 Scanning system for ASM disks:                                           done
 lrh-node1:/u01 #
--  After having created all the ASM Disks runs the utility scandisks  on all nodes of the cluster,
 --  this allows ASM to discover all the new ASM Disks created.
lrh-node2:/dev/oracleasm/disks # /etc/init.d/oracleasm scandisks
 Scanning system for ASM disks:                                          done
 lrh-node2:/dev/oracleasm/disks # /etc/init.d/oracleasm listdisks
 DATA1
 DATA2
 DATA3
 OCR1
 OCR2
 OCR3
######  ASM diskstring and diskgroup parameters ######
 *.asm_diskstring='ORCL:*'
 *.asm_diskgroups='OCR_VOT','DATA1','FRA1'

Duplicate database from active database

— Source database     = TRAC
— Duplicate database = TDUP10

##############################
## PREREQUISITES for Cloning
##############################

## Create the diag structure
 mkdir -p <diag_directory_DB_Name>
## Generate the PFILE from the Original DB and copy to the target host:
 alter system create pfile'/tmp/pfile.ora' from spfile;
 scp /tmp/pfile.ora lclus01:/tmp
## Adjust the following pfile parameters:
 DB_NAME
 LOG_FILE_NAME_CONVERT
 DB_FILE_NAME_CONVERT
 DB_CREATE_FILE_DEST
##Statup nomount and create the spfile:
 alter system create spfile='+DATA/TDUP10/spfile_TDUP10.ora' from pfile'/tmp/pfile.ora';
#############################################################
##############################
 Network Configuration
 ##############################
##Listener Static Entry:
 SID_LIST_LISTENER =
 (SID_LIST =
 (SID_DESC =
 (SID_NAME = PLSExtProc)
 (ORACLE_HOME = /u01/oracle/product/11.2.0.1)
 (PROGRAM = extproc)
 )
 (SID_DESC =
 (global_dbname = TDUP10.emilianofusaglia.net)
 (ORACLE_HOME = /u01/oracle/product/11.2.0.1)
 (sid_name = TDUP11)
 )
 )
##TNS entry
 TDUP10.emilianofusaglia.net =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = loraclu-scan.emilianofusaglia.net)(PORT = 1526))
 (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = TDUP10.emilianofusaglia.net)
 )
 )
#############################################################
##############################
 ##RMAN Duplicate
 ##############################
#rman
 connect target /
 connect auxiliary sys/xxxxx@TDUP10.emilianofusaglia.net
 duplicate target database
 to TDUP10
 from active database
 DB_FILE_NAME_CONVERT 'TRAC','TDUP10'
 skip tablespace POR_READONLY;
##Register the database into the Grid Infrastructure
 srvctl add database -d TDUP10 -o $ORACLE_HOME
 srvctl add instance -d TDUP10 -i TDUP11 -n lclus01
 srvctl add instance -d TDUP10 -i TDUP12 -n lclus02
##Create the password file on each node using the utility orapwd.
 #cd $ORACLE_HOME/dbs
 #orapwd file=<password_file_name> password=<sys_password> entries=n
## Add oratab entry
 <DB_NAME>:<ORACLE_HOME>:N

Oracle Resource Manager

 

#############################################################
##    How to implement Oracle Resource Manager granting    ##
##    CONSUMER GROUPS to Clusterware services              ##
#############################################################

--Create a service for OLTP sessions
srvctl add service -d dbrac10 -s DBRAC10_OLTP -r dbrac11,dbrac12,dbrac13
srvctl start service -d dbrac10 -s DBRAC10_OLTP

--Create a service for BATCH sessions
srvctl add service -d dbrac10 -s DBRAC10_BATCH -r dbrac11,dbrac12,dbrac13
srvctl start service -d dbrac10 -s DBRAC10_BATCH


###################################################################
## Resource Plan Design:
## MGMT_P1=75% SYS_GROUP,  MGMT_P2=80% OLTP, MGMT_P2=10% BATCH, MGMT_P2=5%
## ORA$AUTOTASK_SUB_PLAN,  MGMT_P2=5% ORA$DIAGNOSTICS, MGMT_P3=70% OTHER_GROUPS           
###################################################################       

## Resource Plan Implementation:
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'REAL_TIME_PLAN', COMMENT => 'Respurce Plan for OLTP database');
DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (CONSUMER_GROUP => 'OLTP',CATEGORY => 'INTERACTIVE', COMMENT => 'OLTP sessions');
DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (CONSUMER_GROUP => 'BATCH', CATEGORY => 'BATCH', COMMENT => 'BATCH sessions');
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'REAL_TIME_PLAN', GROUP_OR_SUBPLAN => 'OLTP', COMMENT => 'OLTP group', MGMT_P2 => 80);
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'REAL_TIME_PLAN', GROUP_OR_SUBPLAN => 'BATCH', COMMENT => 'BATCH group',
MGMT_P3 => 70, PARALLEL_DEGREE_LIMIT_P1 => 6, ACTIVE_SESS_POOL_P1 => 4, MAX_IDLE_TIME => 240);
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'REAL_TIME_PLAN', GROUP_OR_SUBPLAN => 'SYS_GROUP', COMMENT => 'SYS group', MGMT_P1 => 70);
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'REAL_TIME_PLAN', GROUP_OR_SUBPLAN => 'OTHER_GROUPS', COMMENT => 'OTHER group', MGMT_P4 => 50);
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'REAL_TIME_PLAN',GROUP_OR_SUBPLAN => 'ORA$AUTOTASK_SUB_PLAN', COMMENT => 'ORA$AUTOTASK_SUB_PLAN group', MGMT_P3 => 20);
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'REAL_TIME_PLAN', GROUP_OR_SUBPLAN => 'ORA$DIAGNOSTICS', COMMENT => 'ORA$DIAGNOSTICS group', MGMT_P3 => 10);
DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING (DBMS_RESOURCE_MANAGER.SERVICE_NAME, 'DBRAC10_OLTP', 'OLTP');
DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(DBMS_RESOURCE_MANAGER.SERVICE_NAME, 'DBRAC10_BATCH', 'BATCH');
DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
END;
/

###################################################################


## Grant the Switch to the Users
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();    
dbms_resource_manager_privs.grant_switch_consumer_group ('PERF_TEST','OLTP',FALSE); 
dbms_resource_manager_privs.grant_switch_consumer_group ('PERF_TEST','BATCH',FALSE); 
DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
END;
/

###################################################################       
## Enable the Resource plan with the FORCE Option to avoid the Scheduler window to
## activate a different plan during the job execution.
ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = 'FORCE:REAL_TIME_PLAN';
###################################################################       

## Example of Group and Plan Deletion:

BEGIN
DBMS_RESOURCE_MANAGER.DELETE_PLAN (PLAN => 'REAL_TIME_PLAN');
END;
/

BEGIN
DBMS_RESOURCE_MANAGER.DELETE_CONSUMER_GROUP(CONSUMER_GROUP => 'OLTP');
END;
/

BEGIN
DBMS_RESOURCE_MANAGER.DELETE_CONSUMER_GROUP(CONSUMER_GROUP => 'BATCH');
END;
/


###################################################################
## SQL Queries for monitoring Resource Manager  utilization:
###################################################################

## Check the service name used by each session
select inst_id, username, SERVICE_NAME, count(*) from gv$session 
where SERVICE_NAME <>'SYS$BACKGROUND'
group by inst_id, username, SERVICE_NAME order by  order by 2,3,1;


## List the Active Resource Consumer Groups:
select INST_ID, NAME, ACTIVE_SESSIONS, EXECUTION_WAITERS, REQUESTS, 
CPU_WAIT_TIME, CPU_WAITS, CONSUMED_CPU_TIME, YIELDS, QUEUE_LENGTH, 
ACTIVE_SESSION_LIMIT_HIT from gV$RSRC_CONSUMER_GROUP where name in 
('SYS_GROUP','BATCH','OLTP','OTHER_GROUPS') order by 2,1;

ODA CPU Capping

####################################################################
# How to reduce the number of active CPU cores on ODA system
####################################################################

--Find the ODA Serial Number
 [root@odanode1 ~]# /usr/sbin/dmidecode -t1 |grep Serial
 Serial Number: 1xxxxxXXXXxG
--Login to MOS and generate the CPU Key using the ODA Serial Number.
####################################################################
 ## ODA CPU Capping
 ####################################################################
------------------------------------
 -- Target  active CPU cores --
 ------------------------------------
   HOSTNAME    |   CPU COUNT  
 ---------------|----------------
 odanode1        |      6
 ---------------|----------------
 odanode2        |      6
 --------------------------------
-------------------------------------------------------------------------------
 --Reduce the CPU cores running the following command from the first node only!
 -------------------------------------------------------------------------------
 /opt/oracle/oak/bin/oakcli show core_config_key
 /opt/oracle/oak/bin/oakcli apply core_config_key /tmp/CPU_KEY
------------------------------------------
 --Activity Log
 ------------------------------------------
 [root@odanode1 tmp]# vi CPU_KEY  <--- Store the CPU key generated on MOS
 [root@odanode1 tmp]# /opt/oracle/oak/bin/oakcli show core_config_key
 Optional core_config_key is not applied on this machine yet !
 [root@odanode1 tmp]# pwd
 /tmp
 [root@odanode1 tmp]# /opt/oracle/oak/bin/oakcli apply core_config_key /tmp/CPU_KEY
 INFO: Both nodes get rebooted automatically after applying the license
 Do you want to continue: [Y/N]?:
 Y
 INFO: User has confirmed the reboot
Please enter the root password:
............done
INFO: Applying core_config_key on '192.168.16.25'
 ...
 INFO   : Running as root: /usr/bin/ssh -l root 192.168.16.25 /tmp/tmp_lic_exec.pl
 INFO   : Running as root: /usr/bin/ssh -l root 192.168.16.25 /opt/oracle/oak/bin/oakcli enforce core_config_key /tmp/.lic_file
 Waiting for the Node '192.168.16.25' to reboot...........................
 Node '192.168.16.25' is  rebooted
 Waiting for the Node '192.168.16.25' to be up before applying the license on the node '192.168.16.24'.
 .............................................
 INFO: Applying core_config_key on '192.168.16.24'
 ...
 INFO   : Running as root: /usr/bin/ssh -l root 192.168.16.24 /tmp/tmp_lic_exec.pl
 INFO   : Running as root: /usr/bin/ssh -l root 192.168.16.24 /opt/oracle/oak/bin/oakcli enforce core_config_key /tmp/.lic_file
Broadcast message from root (Fri Jun  7 15:18:34 2013):
The system is going down for reboot NOW!
 [root@odanode1 tmp]#
-------------------------------------------------------------
 --Check the new Number of active cores
 -------------------------------------------------------------
[root@odanode1 ~]# /opt/oracle/oak/bin/oakcli show core_config_key
Host's serialnumber                    =                     1xxxxxXXXXxG
 Enabled Cores (per server)             =                                   6
 Total Enabled Cores (on two servers)   =                             12
 Server type                            =        V1 -> SUN FIRE X4370 M2
 Hyperthreading is enabled.  Each core has 2 threads. Operating system displays 12 processors per server
 [root@odanode1 ~]#

	

Oracle Database Appliance Bundle 2.6

##################################################################
# Installation Oracle Database Appliance (ODA) bundle patch 2.6.0.0
##################################################################

--Path where all ODA logs are stored:
 /opt/oracle/oak/log/odanode1/patch/2.6.0.0.0
-------------------------------------------------
 --ODA Software version before patching
 -------------------------------------------------
 [root@odanode1 bin]# /opt/oracle/oak/bin/oakcli show version -detail
 reporting the metadata. It takes a while...
 System Version          Component Name                Installed Version               Supported Version
 -------------------         ---------------------    ------------------            -----------------
 2.4.0.0.0
 Controller                      11.05.02.00                     Up-to-date
 Expander                       0342                              Up-to-date
 SSD_SHARED                   E125                              Up-to-date
 HDD_LOCAL                     5G08                              Up-to-date
 HDD_SHARED                   A700                              A6C0
 ILOM                              3.0.16.22.a r75629           Up-to-date
 BIOS                              12010310                        Up-to-date
 IPMI                               1.8.10.5                          Up-to-date
 HMP                               2.2.4                              Up-to-date
 OAK                               2.4.0.0.0                         Up-to-date
 OEL                                5.8                                Up-to-date
 TFA                                2.4                                Up-to-date
 GI_HOME                         1.2.0.3.4(14275605,          Up-to-date
 14275572)
 DB_HOME                       11.2.0.3.4(14275605,         Up-to-date
 14275572)
 ASR                                Unknown                         3.9
 [root@odanode1 bin]#
####################################################################################################
-------------------------------------------------
 --Unzip the patch bundle 2.6.0.0.
 -------------------------------------------------
 --ODA Node 1
 [root@odanode1 u01]# cd /opt/oracle/oak/bin
 [root@odanode1 bin]# ./oakcli unpack -package /u01/ODA_patches/bundle_2600/p16744915_26000_Linux-x86-64.zip
 Unpacking takes a while,  pls wait....
 Successfully unpacked the files to repository.
 [root@odanode1 bin]#
--ODA Node 2
 [root@odanode2 u01]# cd /opt/oracle/oak/bin
 [root@odanode2 bin]# ./oakcli unpack -package /u01/ODA_patches/bundle_2600/p16744915_26000_Linux-x86-64.zip
 Unpacking takes a while,  pls wait....
 Successfully unpacked the files to repository.
 [root@odanode2 bin]#
-------------------------------------------------
 --Apply the Patch to the Infrastructure
 -------------------------------------------------
--ODA Node 1 ONLY
 [root@odanode1 bin]# cd /opt/oracle/oak/bin
 [root@odanode1 bin]# ./oakcli update -patch 2.6.0.0.0 --infra
 INFO: DB, ASM, Clusterware may be stopped during the patch if required
 INFO: Both nodes may get rebooted automatically during the patch if required
 Do you want to continue: [Y/N]?: Y
 INFO: User has confirmed the reboot
 INFO: Patch bundle must be unpacked on the second node also before applying this patch
 Did you unpack the patch bundle on the second node?: [Y/N]?: Y
Please enter the 'root' user password:
 Please re-enter the 'root' user password:
 INFO: Setting up the SSH
 ..........done
 INFO: Running pre-install scripts
 ..........done
 INFO: 2013-05-15 11:04:11: Running pre patch script for 2.6.0.0.0
 INFO: 2013-05-15 11:04:14: Completed pre patch script for 2.6.0.0.0
INFO: 2013-05-15 11:04:19: ------------------Patching HMP-------------------------
 SUCCESS: 2013-05-15 11:04:50: Successfully upgraded the HMP
INFO: 2013-05-15 11:04:50: ----------------------Patching OAK---------------------
 SUCCESS: 2013-05-15 11:05:13: Succesfully upgraded OAK
INFO: 2013-05-15 11:05:15: -----------------Installing / Patching  TFA-----------------
 SUCCESS: 2013-05-15 11:06:55: Successfully updated / installed the TFA
 ...
INFO: 2013-05-15 11:06:56: ------------------Patching OS-------------------------
 INFO: 2013-05-15 11:07:05: Clusterware is running on one or more nodes of the cluster
 INFO: 2013-05-15 11:07:05: Attempting to stop clusterware and its resources across the cluster
 SUCCESS: 2013-05-15 11:09:08: Successfully stopped the clusterware
SUCCESS: 2013-05-15 11:09:49: Successfully upgraded the OS
INFO: 2013-05-15 11:09:53: ----------------------Patching IPMI---------------------
 SUCCESS: 2013-05-15 11:09:55: Succesfully upgraded IPMI
INFO: 2013-05-15 11:10:02: ----------------Patching the Storage-------------------
 INFO: 2013-05-15 11:10:02: ....................Patching SSDs...............
 INFO: 2013-05-15 11:10:02: Updating the  Disk : d20 with the firmware : ZeusIOPs G3 E12B
 SUCCESS: 2013-05-15 11:10:27: Successfully updated the firmware on  Disk : d20 to ZeusIOPs G3 E12B
 INFO: 2013-05-15 11:10:27: Updating the  Disk : d21 with the firmware : ZeusIOPs G3 E12B
 SUCCESS: 2013-05-15 11:10:48: Successfully updated the firmware on  Disk : d21 to ZeusIOPs G3 E12B
 INFO: 2013-05-15 11:10:48: Updating the  Disk : d22 with the firmware : ZeusIOPs G3 E12B
 SUCCESS: 2013-05-15 11:11:10: Successfully updated the firmware on  Disk : d22 to ZeusIOPs G3 E12B
 INFO: 2013-05-15 11:11:11: Updating the  Disk : d23 with the firmware : ZeusIOPs G3 E12B
 SUCCESS: 2013-05-15 11:11:34: Successfully updated the firmware on  Disk : d23 to ZeusIOPs G3 E12B
 INFO: 2013-05-15 11:11:34: ....................Patching shared HDDs...............
 INFO: 2013-05-15 11:11:34: Disk : d0  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:34: Disk : d1  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:34: Disk : d2  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:35: Disk : d3  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:35: Disk : d4  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:35: Disk : d5  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:35: Disk : d6  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:35: Disk : d7  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:36: Disk : d8  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:36: Disk : d9  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:36: Disk : d10  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:36: Disk : d11  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:37: Disk : d12  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:37: Disk : d13  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:37: Disk : d14  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:37: Disk : d15  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:38: Disk : d16  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:38: Disk : d17  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:38: Disk : d18  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:38: Disk : d19  is alreporty running with : HUS1560SCSUN600G A700
 INFO: 2013-05-15 11:11:38: ....................Patching local HDDs...............
 INFO: 2013-05-15 11:11:38: Disk : c0d0  is alreporty running with : WD500BLHXSUN 5G08
 INFO: 2013-05-15 11:11:39: Disk : c0d1  is alreporty running with : WD500BLHXSUN 5G08
 INFO: 2013-05-15 11:11:39: ....................Patching Expanders...............
 INFO: 2013-05-15 11:11:39: Expander : x0  is alreporty running with : T4 Storage 0342
 INFO: 2013-05-15 11:11:39: Expander : x1  is alreporty running with : T4 Storage 0342
 INFO: 2013-05-15 11:11:39: ....................Patching Controllers...............
 INFO: 2013-05-15 11:11:39: No-update for the Controller: c0
 INFO: 2013-05-15 11:11:39: Controller : c1  is alreporty running with : 0x0072 11.05.02.00
 INFO: 2013-05-15 11:11:39: Controller : c2  is alreporty running with : 0x0072 11.05.02.00
 INFO: 2013-05-15 11:11:39: ------------Finished the storage Patching------------
INFO: 2013-05-15 11:11:40: -----------------Patching Ilom & Bios-----------------
 INFO: 2013-05-15 11:11:41: Getting the ILOM Ip address
 INFO: 2013-05-15 11:11:42: Updating the Ilom using LAN+ protocol
 INFO: 2013-05-15 11:11:43: Updating the ILOM. It takes a while
 INFO: 2013-05-15 11:16:24: Verifying the updated Ilom Version, it may take a while if ServiceProcessor is booting
 INFO: 2013-05-15 11:16:25: Waiting for the service processor to be up
 SUCCESS: 2013-05-15 11:20:09: Successfully updated the ILOM with the firmware 3.0.16.22.b r78329
INFO: Patching the infrastructure on node: odanode2 , it may take upto 30 minutes. Please wait
 ...
 ............done
INFO: Infrastructure patching summary on node: 192.168.16.24
 SUCCESS: 2013-05-15 11:31:05:  Successfully upgraded the HMP
 SUCCESS: 2013-05-15 11:31:05:  Succesfully updated the OAK
 SUCCESS: 2013-05-15 11:31:05:  Successfully updated the TFA
 SUCCESS: 2013-05-15 11:31:05:  Successfully upgraded the OS
 SUCCESS: 2013-05-15 11:31:05:  Succesfully updated the IPMI
 INFO: 2013-05-15 11:31:05:  Storage patching summary
 SUCCESS: 2013-05-15 11:31:05:  No failures during storage upgrade
 SUCCESS: 2013-05-15 11:31:05:  Successfully updated the ILOM & Bios
INFO: Infrastructure patching summary on node: 192.168.16.25
 SUCCESS: 2013-05-15 11:31:05:  Successfully upgraded the HMP
 SUCCESS: 2013-05-15 11:31:05:  Succesfully updated the OAK
 SUCCESS: 2013-05-15 11:31:05:  Successfully upgraded the OS
 SUCCESS: 2013-05-15 11:31:05:  Succesfully updated the IPMI
 INFO: 2013-05-15 11:31:05:  Storage patching summary
 SUCCESS: 2013-05-15 11:31:05:  No failures during storage upgrade
 SUCCESS: 2013-05-15 11:31:05:  Successfully updated the ILOM & Bios
INFO: Running post-install scripts
 ............done
 INFO: Some of the patched components require node reboot. Rebooting the nodes
 INFO: Setting up the SSH
 ............done
Broadcast message from root (Wed May 15 11:35:50 2013):
The system is going down for system halt NOW!
-------------------------------------------------
 --Apply the Patch to the Grid Infrastructure
 -------------------------------------------------
--ODA on BOTH Nodes
 [oracle@odanode1 OPatch]$ /u01/app/oracle/product/agent12c/agent_inst/bin/emctl stop agent
 Oracle Enterprise Manager Cloud Control 12c Release 2
 Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
 Stopping agent ..... stopped.
--ODA Node 1 ONLY
 [root@odanode1 bin]# cd /opt/oracle/oak/bin
 [root@odanode1 bin]# ./oakcli update -patch 2.6.0.0.0 --gi
Please enter the 'root' user password:
 Please re-enter the 'root' user password:
Please enter the 'grid' user password:
 Please re-enter the 'grid' user password:
 INFO: Setting up the SSH
 ..........done
 ...
 ...
..........done
 ...
 SUCCESS: All nodes in /opt/oracle/oak/temp_clunodes.txt are pingable and alive.
 INFO: 2013-05-15 11:56:10: Setting up the ssh for grid user
 ..........done
 ...
 SUCCESS: All nodes in /opt/oracle/oak/temp_clunodes.txt are pingable and alive.
 INFO: 2013-05-15 11:56:30: Patching the GI home on node odanode1
 INFO: 2013-05-15 11:56:30: Updating the opatch
 INFO: 2013-05-15 11:56:56: Performing the conflict checks
 SUCCESS: 2013-05-15 11:57:07: Conflict checks passed for all the homes
 INFO: 2013-05-15 11:57:07: Checking if the patch is alreporty applied on any of the homes
 INFO: 2013-05-15 11:57:10: No home is alreporty up-to-date
 SUCCESS: 2013-05-15 11:57:21: Successfully stopped the dbconsoles
 SUCCESS: 2013-05-15 11:57:36: Successfully stopped the EM agents
 INFO: 2013-05-15 11:57:41: Applying patch on the homes: /u01/app/11.2.0.3/grid
 INFO: 2013-05-15 11:57:41: It may take upto 15 mins
 SUCCESS: 2013-05-15 12:08:27: Successfully applied the patch on home: /u01/app/11.2.0.3/grid
 SUCCESS: 2013-05-15 12:08:27: Successfully started the dbconsoles
 SUCCESS: 2013-05-15 12:08:38: Successfully started the EM Agents
 INFO: 2013-05-15 12:08:39: Patching the GI home on node odanode2
 ...
..........done
INFO: GI patching summary on node: odanode1
 SUCCESS: 2013-05-15 12:22:58:  Successfully applied the patch on home /u01/app/11.2.0.3/grid
INFO: GI patching summary on node: odanode2
 SUCCESS: 2013-05-15 12:22:58:  Successfully applied the patch on home /u01/app/11.2.0.3/grid
INFO: Running post-install scripts
 ..........done
 INFO: Setting up the SSH
 ..........done
[root@odanode1 bin]#
[root@odanode2 ~]# su - grid
 [grid@odanode2 ~]$ cd /u01/app/11.2.0.3/grid/OPatch/
 [grid@odanode2 OPatch]$ ./opatch lsinv
 Oracle Interim Patch Installer version 11.2.0.3.4
 Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/11.2.0.3/grid
 Central Inventory : /u01/app/oraInventory
 from           : /u01/app/11.2.0.3/grid/oraInst.loc
 OPatch version    : 11.2.0.3.4
 OUI version       : 11.2.0.3.0
 Log file location : /u01/app/11.2.0.3/grid/cfgtoollogs/opatch/opatch2013-05-15_12-33-15PM_1.log
Lsinventory Output file location : /u01/app/11.2.0.3/grid/cfgtoollogs/opatch/lsinv/lsinventory2013-05-15_12-33-15PM.txt
--------------------------------------------------------------------------------
 Installed Top-level Products (1):
Oracle Grid Infrastructure                                           11.2.0.3.0
 There are 1 products installed in this Oracle Home.
Interim patches (2) :
Patch  16056266     : applied on Wed May 15 12:18:38 CEST 2013
 Unique Patch ID:  15962803
 Patch description:  "Database Patch Set Update : 11.2.0.3.6 (16056266)"
 Created on 12 Mar 2013, 02:14:47 hrs PST8PDT
 Sub-patch  14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
 Sub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
 Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
 Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
 Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
 Bugs fixed:
 13566938, 13593999, 10350832, 14138130, 12919564, 13561951, 13624984
 13588248, 13080778, 13914613, 13804294, 14258925, 12873183, 13645875
 14472647, 12880299, 14664355, 14409183, 12998795, 14469008, 13719081
 13492735, 13496884, 12857027, 14263036, 14263073, 13732226, 13742433
 16368108, 16314469, 12905058, 13742434, 12849688, 12950644, 13742435
 13464002, 13534412, 12879027, 13958038, 14613900, 12585543, 12535346
 12588744, 11877623, 13786142, 12847466, 13649031, 13981051, 12582664
 12797765, 14262913, 12923168, 13384182, 13612575, 13466801, 13484963
 14207163, 11063191, 13772618, 13070939, 12797420, 13041324, 16314467
 16314468, 12976376, 11708510, 13680405, 14589750, 13026410, 13742437
 13737746, 14644185, 13742438, 13326736, 13596521, 13001379, 16344871
 13099577, 9873405, 14275605, 13742436, 9858539, 14841812, 11715084
 16231699, 14040433, 12662040, 9703627, 12617123, 12845115, 12764337
 13354082, 14459552, 13397104, 13913630, 12964067, 12983611, 13550185
 13810393, 12780983, 12583611, 14546575, 13476583, 15862016, 11840910
 13903046, 15862017, 13572659, 16294378, 13718279, 14088346, 13657605
 13448206, 16314466, 14480676, 13419660, 13632717, 14063281, 14110275
 13430938, 13467683, 13420224, 13812031, 14548763, 16299830, 12646784
 13616375, 14035825, 12861463, 12834027, 15862021, 13632809, 13377816
 13036331, 14727310, 13685544, 15862018, 13499128, 16175381, 13584130
 12829021, 15862019, 12794305, 14546673, 12791981, 13787482, 13503598
 10133521, 12718090, 13399435, 14023636, 13860201, 12401111, 13257247
 13362079, 14176879, 12917230, 13923374, 14220725, 14480675, 13524899
 13559697, 9706792, 14480674, 13916709, 13098318, 13773133, 14076523
 13340388, 13366202, 13528551, 12894807, 13454210, 13343438, 12748240
 14205448, 13385346, 15853081, 14273397, 12971775, 13582702, 10242202
 13035804, 13544396, 16382353, 8547978, 14226599, 14062795, 13035360
 12693626, 13332439, 14038787, 14062796, 12913474, 14841409, 14390252
 16314470, 13370330, 13059165, 14062797, 14062794, 12959852, 13358781
 12345082, 12960925, 9659614, 13699124, 14546638, 13936424, 13338048
 12938841, 12658411, 12620823, 12656535, 14062793, 12678920, 13038684
 14062792, 13807411, 13250244, 12594032, 15862022, 9761357, 12612118
 13742464, 14052474, 13911821, 13457582, 13527323, 15862020, 13910420
 13502183, 12780098, 13705338, 13696216, 14841558, 10263668, 15862023
 16056266, 15862024, 13554409, 13645917, 13103913, 13011409, 14063280
Patch  16315641     : applied on Wed May 15 12:17:13 CEST 2013
 Unique Patch ID:  15966967
 Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.6 (16083653)"
 Created on 1 Apr 2013, 03:41:20 hrs PST8PDT
 Bugs fixed:
 16315641, 15876003, 14275572, 13919095, 13696251, 13348650, 12659561
 14305980, 14277586, 13987807, 14625969, 13825231, 12794268, 13000491
 13498267, 11675721, 14082976, 12771830, 14515980, 14085018, 13943175
 14102704, 14171552, 12594616, 13879428, 12897902, 12726222, 12829429
 13079948, 13090686, 12995950, 13251796, 13582411, 12990582, 13857364
 13082238, 12947871, 13256955, 13037709, 14535011, 12878750, 14048512
 11772838, 13058611, 13001955, 13440962, 13727853, 13425727, 12885323
 12870400, 14212634, 14407395, 13332363, 13430626, 13811209, 12709476
 14168708, 14096821, 14626717, 13460353, 13694885, 12857064, 12899169
 13111013, 12558569, 13323698, 10260842, 13085732, 10317921, 13869978
 12914824, 13789135, 12730342, 12950823, 13355963, 13531373, 14268365
 13776758, 12720728, 13620816, 13023609, 13024624, 13039908, 13036424
 13938166, 13011520, 13569812, 12758736, 13001901, 13077654, 13430715
 13550689, 13806545, 13634583, 14271305, 12538907, 13947200, 12996428
 13066371, 13483672, 12897651, 13540563, 12896850, 13241779, 12728585
 12876314, 12925041, 12650672, 12398492, 12848480, 13652088, 16307750
 12917897, 12975811, 13653178, 13371153, 14800989, 10114953, 14001941
 11836951, 14179376, 12965049, 14773530, 12765467, 13339443, 13965075
 16210540, 14307855, 12784559, 14242977, 13955385, 12704789, 13745317
 13074261, 12971251, 13993634, 13523527, 13719731, 13396284, 12639013
 12867511, 12959140, 14748254, 12829917, 12349553, 12849377, 12934171
 13843080, 14496536, 13924431, 12680491, 13334158, 10418841, 12832204
 13838047, 13002015, 12791719, 13886023, 13821454, 12782756, 14100232
 14186070, 14569263, 12873909, 13845120, 14214257, 12914722, 12842804
 12772345, 12663376, 14059576, 13889047, 12695029, 13924910, 13146560
 14070200, 13820621, 14304758, 12996572, 13941934, 14711358, 13019958
 13888719, 16463033, 12823838, 13877508, 12823042, 14494305, 13582706
 13617861, 12825835, 13025879, 13853089, 13410987, 13570879, 13247273
 13255295, 14152875, 13912373, 13011182, 13243172, 13045518, 12765868
 11825850, 15986571, 13345868, 13683090, 12932852, 13038806, 14588629
 14251904, 13396356, 13697828, 12834777, 13258062, 14371335, 13657366
 12810890, 15917085, 13502441, 14637577, 13880925, 13726162, 14153867
 13506114, 12820045, 13604057, 13263435, 14009845, 12827493, 13637590, 13068077
Rac system comprising of multiple nodes
 Local node = odanode2
 Remote node = odanode1
--------------------------------------------------------------------------------
OPatch succeeded.
 [grid@odanode2 OPatch]$
--Stop CRS on both Nodes
 [root@odanode1 2.6.0.0.0]# /u01/app/11.2.0.3/grid/bin/crsctl stop crs
 CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'odanode1'
 CRS-2673: Attempting to stop 'ora.crsd' on 'odanode1'
 CRS-2790: Starting shutdown of Cluster reporty Services-managed resources on 'odanode1'
 CRS-2673: Attempting to stop 'ora.cvu' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.efboeur.efbo_applb.efow.com.svc' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.efcteur.efct_applb.efow.com.svc' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.efpheur.efph_applb.efow.com.svc' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'odanode1'
 CRS-2677: Stop of 'ora.efboeur.efbo_applb.efow.com.svc' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.efpheur.efph_applb.efow.com.svc' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.efcteur.efct_applb.efow.com.svc' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.efboeur.db' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.efpheur.db' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.efcteur.db' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.registry.acfs' on 'odanode1'
 CRS-2677: Stop of 'ora.cvu' on 'odanode1' succeeded
 CRS-2672: Attempting to start 'ora.cvu' on 'odanode2'
 CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.odanode1.vip' on 'odanode1'
 CRS-2676: Start of 'ora.cvu' on 'odanode2' succeeded
 CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.scan2.vip' on 'odanode1'
 CRS-2677: Stop of 'ora.registry.acfs' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.efboeur.db' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.efpheur.db' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.efcteur.db' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.RECO.dg' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.REDO.dg' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.DATA.dg' on 'odanode1'
 CRS-2677: Stop of 'ora.odanode1.vip' on 'odanode1' succeeded
 CRS-2672: Attempting to start 'ora.odanode1.vip' on 'odanode2'
 CRS-2677: Stop of 'ora.REDO.dg' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.scan2.vip' on 'odanode1' succeeded
 CRS-2672: Attempting to start 'ora.scan2.vip' on 'odanode2'
 CRS-2677: Stop of 'ora.RECO.dg' on 'odanode1' succeeded
 CRS-2676: Start of 'ora.odanode1.vip' on 'odanode2' succeeded
 CRS-2676: Start of 'ora.scan2.vip' on 'odanode2' succeeded
 CRS-2677: Stop of 'ora.DATA.dg' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.asm' on 'odanode1'
 CRS-2677: Stop of 'ora.asm' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.ons' on 'odanode1'
 CRS-2677: Stop of 'ora.ons' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.net1.network' on 'odanode1'
 CRS-2677: Stop of 'ora.net1.network' on 'odanode1' succeeded
 CRS-2792: Shutdown of Cluster reporty Services-managed resources on 'odanode1' has completed
 CRS-2677: Stop of 'ora.crsd' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.ctssd' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.evmd' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.asm' on 'odanode1'
 CRS-2673: Attempting to stop 'ora.mdnsd' on 'odanode1'
 CRS-2677: Stop of 'ora.evmd' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.mdnsd' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.ctssd' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.drivers.acfs' on 'odanode1' succeeded
 CRS-2677: Stop of 'ora.asm' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'odanode1'
 CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.cssd' on 'odanode1'
 CRS-2677: Stop of 'ora.cssd' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.crf' on 'odanode1'
 CRS-2677: Stop of 'ora.crf' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.gipcd' on 'odanode1'
 CRS-2677: Stop of 'ora.gipcd' on 'odanode1' succeeded
 CRS-2673: Attempting to stop 'ora.gpnpd' on 'odanode1'
 CRS-2677: Stop of 'ora.gpnpd' on 'odanode1' succeeded
 CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'odanode1' has completed
 CRS-4133: Oracle High Availability Services has been stopped.
 [root@odanode1 2.6.0.0.0]#
--Start CRS on both Nodes
 [root@odanode1 2.6.0.0.0]# /u01/app/11.2.0.3/grid/bin/crsctl start crs
 CRS-4123: Oracle High Availability Services has been started.
--Check GI status
 [root@odanode1 2.6.0.0.0]# /u01/app/11.2.0.3/grid/bin/crsctl status res -t
 --------------------------------------------------------------------------------
 NAME           TARGET  STATE        SERVER                   STATE_DETAILS
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.DATA.dg
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.LISTENER.lsnr
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.RECO.dg
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.REDO.dg
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.asm
 ONLINE  ONLINE       odanode1               Started
 ONLINE  ONLINE       odanode2               Started
 ora.gsd
 OFFLINE OFFLINE      odanode1
 OFFLINE OFFLINE      odanode2
 ora.net1.network
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.ons
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.registry.acfs
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 ora.LISTENER_SCAN1.lsnr
 1        ONLINE  ONLINE       odanode1
 ora.LISTENER_SCAN2.lsnr
 1        ONLINE  ONLINE       odanode2
 ora.cvu
 1        ONLINE  ONLINE       odanode2
 ora.efboeur.db
 1        ONLINE  ONLINE       odanode1               Open
 2        ONLINE  ONLINE       odanode2               Open
 ora.efboeur.efbo_applb.efow.com.svc
 1        ONLINE  ONLINE       odanode1
 2        ONLINE  ONLINE       odanode2
 ora.efboeur.efbo_report.efow.com.svc
 1        OFFLINE OFFLINE
 2        OFFLINE OFFLINE
 ora.efcteur.db
 1        ONLINE  ONLINE       odanode1               Open
 2        ONLINE  ONLINE       odanode2               Open
 ora.efcteur.efct_applb.efow.com.svc
 1        ONLINE  ONLINE       odanode1
 2        ONLINE  ONLINE       odanode2
 ora.efcteur.efct_report.efow.com.svc
 1        OFFLINE OFFLINE
 2        OFFLINE OFFLINE
 ora.odanode1.vip
 1        ONLINE  ONLINE       odanode1
 ora.odanode2.vip
 1        ONLINE  ONLINE       odanode2
 ora.efpheur.db
 1        ONLINE  ONLINE       odanode1               Open
 2        ONLINE  ONLINE       odanode2               Open
 ora.efpheur.efph_applb.efow.com.svc
 1        ONLINE  ONLINE       odanode1
 2        ONLINE  ONLINE       odanode2
 ora.efpheur.efph_report.efow.com.svc
 1        OFFLINE OFFLINE
 2        OFFLINE OFFLINE
 ora.oc4j
 1        ONLINE  ONLINE       odanode2
 ora.scan1.vip
 1        ONLINE  ONLINE       odanode1
 ora.scan2.vip
 1        ONLINE  ONLINE       odanode2
 [root@odanode1 2.6.0.0.0]#
-------------------------------------------------
 --Apply the Patch to the RDBMS
 -------------------------------------------------
 --Check the RDBMS patch level before applying the PSU
 [root@odanode1 bin]# /opt/oracle/oak/bin/oakcli show databases
 Database Name    Database Type   Database HomeName    Database HomeLocation                                        Database Version
 ----------------       -----------            ----------------                   ---------------------------------------                           ---------------------
 efboeur                RAC                   OraDb11203_home1      /u01/app/oracle/product/11.2.0.3/dbhome_1         11.2.0.3.4(14275605,14275572)
 efcteur                 RAC                  OraDb11203_home1      /u01/app/oracle/product/11.2.0.3/dbhome_1          11.2.0.3.4(14275605,14275572)
 efpheur                RAC                  OraDb11203_home1      /u01/app/oracle/product/11.2.0.3/dbhome_1          11.2.0.3.4(14275605,14275572)
 [root@odanode1 bin]#
--ODA on BOTH Nodes
 [oracle@odanode1 OPatch]$ /u01/app/oracle/product/agent12c/agent_inst/bin/emctl stop agent
 Oracle Enterprise Manager Cloud Control 12c Release 2
 Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
 Stopping agent ..... stopped.
--In addition to avoind issue while patching the RDBMS:
 --ODA on BOTH Nodes
 [root@efoda01n1 ~]# /sbin/fuser /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libclntsh.so.11.1
 /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libclntsh.so.11.1: 18877m 18911m
[root@efoda01n1 ~]# ps -ef|grep 18877
 oracle   18877 18791  0 10:06 ?        00:00:22 /u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/bin/java -server -Xmx384M -XX:MaxPermSize=400M -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -DORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1 -Doracle.home=/u01/app/oracle/product/11.2.0.3/dbhome_1/oc4j -Doracle.oc4j.localhome=/u01/app/oracle/product/11.2.0.3/dbhome_1/efoda01n1_test/sysman -DEMSTATE=/u01/app/oracle/product/11.2.0.3/dbhome_1/efoda01n1_test -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/u01/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/OC4J_DBConsole_efoda01n1_test/config/jazn.xml -Djava.security.policy=/u01/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/OC4J_DBConsole_efoda01n1_test/config/java2.policy -Djavax.net.ssl.KeyStore=/u01/app/oracle/product/11.2.0.3/dbhome_1/sysman/config/OCMTrustedCerts.txt-Djava.security.properties=/u01/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/u01/app/oracle/product/11.2.0.3/dbhome_1/efoda01n1_test -Dsysman.md5password=true -Drepapi.oracle.home=/u01/app/oracle/product/11.2.0.3/dbhome_1 -Ddisable.checkForUpdate=true -Doracle.sysman.ccr.ocmSDK.websvc.keystore=/u01/app/oracle/product/11.2.0.3/dbhome_1/jlib/emocmclnt.ks -Dice.pilots.html4.ignoreNonGenericFonts=true -Djava.awt.headless=true -jar /u01/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/home/oc4j.jar -config /u01/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/OC4J_DBConsole_efoda01n1_test/config/server.xml
[root@efoda01n1 ~]# kill -9 18877 18911
--ODA Node 1 ONLY
 [root@odanode1 bin]# ./oakcli update -patch 2.6.0.0.0 --database
Please enter the 'root' user password:
 Please re-enter the 'root' user password:
Please enter the 'oracle' user password:
 Please re-enter the 'oracle' user password:
 INFO: Setting up the SSH
 ..........done
 ...
 ...
..........done
 ...
 SUCCESS: All nodes in /opt/oracle/oak/temp_clunodes.txt are pingable and alive.
 INFO: 2013-05-15 15:10:16: Getting the possible database homes for patching
 ...
 INFO: 2013-05-15 15:10:21: Patching 11.2.0.3 Database homes on node odanode1
Found the following 11.2.0.3 homes possible for patching:
HOME_NAME                      HOME_LOCATION
 ---------                      -------------
 OraDb11203_home1               /u01/app/oracle/product/11.2.0.3/dbhome_1
[Please note that few of the above database homes may be alreporty up-to-date. They will be automatically ignored]
Would you like to patch all the above homes: Y | N ? :Y
 INFO: 2013-05-15 15:15:48: Setting up ssh for the user oracle
 ..........done
 ...
 SUCCESS: All nodes in /opt/oracle/oak/temp_clunodes.txt are pingable and alive.
 INFO: 2013-05-15 15:16:07: Updating the opatch
 INFO: 2013-05-15 15:16:24: Performing the conflict checks
 SUCCESS: 2013-05-15 15:16:42: Conflict checks passed for all the homes
 INFO: 2013-05-15 15:16:42: Checking if the patch is alreporty applied on any of the homes
 INFO: 2013-05-15 15:16:46: No home is alreporty up-to-date
 SUCCESS: 2013-05-15 15:16:52: Successfully stopped the dbconsoles
 SUCCESS: 2013-05-15 15:16:58: Successfully stopped the EM agents
 INFO: 2013-05-15 15:17:03: Applying patch on the homes: /u01/app/oracle/product/11.2.0.3/dbhome_1
 INFO: 2013-05-15 15:17:03: It may take upto 15 mins
 SUCCESS: 2013-05-15 15:21:35: Successfully applied the patch on home: /u01/app/oracle/product/11.2.0.3/dbhome_1
 SUCCESS: 2013-05-15 15:21:35: Successfully started the dbconsoles
 SUCCESS: 2013-05-15 15:21:35: Successfully started the EM Agents
 INFO: 2013-05-15 15:21:37: Patching 11.2.0.3 Database homes on node odanode2
 INFO: 2013-05-15 15:22:11: Running the catbundle.sql
 INFO: 2013-05-15 15:22:18: Running catbundle.sql on the database efboeur
 INFO: 2013-05-15 15:22:26: Running catbundle.sql on the database efcteur
 INFO: 2013-05-15 15:22:35: Running catbundle.sql on the database efpheur
..........done
INFO: DB patching summary on node: odanode1
 SUCCESS: 2013-05-15 15:22:57:  Successfully applied the patch on home /u01/app/oracle/product/11.2.0.3/dbhome_1
INFO: DB patching summary on node: odanode2
 INFO: 2013-05-15 15:22:57:  Homes /u01/app/oracle/product/11.2.0.3/dbhome_1 are alreporty up-to-date
INFO: Setting up the SSH
 ..........done
[root@odanode1 bin]#
[root@odanode1 2.6.0.0.0]# /opt/oracle/oak/bin/oakcli show databases
 Database Name    Database Type   Database HomeName    Database HomeLocation                                        Database Version
 ----------------       -----------            ----------------                   ---------------------------------------                           ---------------------
 efboeur                RAC                   OraDb11203_home1      /u01/app/oracle/product/11.2.0.3/dbhome_1         11.2.0.3.6(16056266,16083653)
 efcteur                 RAC                  OraDb11203_home1      /u01/app/oracle/product/11.2.0.3/dbhome_1          11.2.0.3.6(16056266,16083653)
 efpheur                RAC                  OraDb11203_home1      /u01/app/oracle/product/11.2.0.3/dbhome_1          11.2.0.3.6(16056266,16083653)
 [root@odanode1 bin]#
[oracle@odanode2 OPatch]$ ./opatch lsinv
 Oracle Interim Patch Installer version 11.2.0.3.4
 Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/oracle/product/11.2.0.3/dbhome_1
 Central Inventory : /u01/app/oraInventory
 from           : /u01/app/oracle/product/11.2.0.3/dbhome_1/oraInst.loc
 OPatch version    : 11.2.0.3.4
 OUI version       : 11.2.0.3.0
 Log file location : /u01/app/oracle/product/11.2.0.3/dbhome_1/cfgtoollogs/opatch/opatch2013-05-15_15-49-48PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0.3/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2013-05-15_15-49-48PM.txt
--------------------------------------------------------------------------------
 Installed Top-level Products (1):
Oracle Database 11g                                                  11.2.0.3.0
 There are 1 products installed in this Oracle Home.
Interim patches (2) :
Patch  16056266     : applied on Wed May 15 15:00:15 CEST 2013
 Unique Patch ID:  15962803
 Patch description:  "Database Patch Set Update : 11.2.0.3.6 (16056266)"
 Created on 12 Mar 2013, 02:14:47 hrs PST8PDT
 Sub-patch  14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"
 Sub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
 Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
 Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
 Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
 Bugs fixed:
 13566938, 13593999, 10350832, 14138130, 12919564, 13561951, 13624984
 13588248, 13080778, 13914613, 13804294, 14258925, 12873183, 13645875
 14472647, 12880299, 14664355, 14409183, 12998795, 14469008, 13719081
 13492735, 13496884, 12857027, 14263036, 14263073, 13732226, 13742433
 16368108, 16314469, 12905058, 13742434, 12849688, 12950644, 13742435
 13464002, 13534412, 12879027, 13958038, 14613900, 12585543, 12535346
 12588744, 11877623, 13786142, 12847466, 13649031, 13981051, 12582664
 12797765, 14262913, 12923168, 13384182, 13612575, 13466801, 13484963
 14207163, 11063191, 13772618, 13070939, 12797420, 13041324, 16314467
 16314468, 12976376, 11708510, 13680405, 14589750, 13026410, 13742437
 13737746, 14644185, 13742438, 13326736, 13596521, 13001379, 16344871
 13099577, 9873405, 14275605, 13742436, 9858539, 14841812, 11715084
 16231699, 14040433, 12662040, 9703627, 12617123, 12845115, 12764337
 13354082, 14459552, 13397104, 13913630, 12964067, 12983611, 13550185
 13810393, 12780983, 12583611, 14546575, 13476583, 15862016, 11840910
 13903046, 15862017, 13572659, 16294378, 13718279, 14088346, 13657605
 13448206, 16314466, 14480676, 13419660, 13632717, 14063281, 14110275
 13430938, 13467683, 13420224, 13812031, 14548763, 16299830, 12646784
 13616375, 14035825, 12861463, 12834027, 15862021, 13632809, 13377816
 13036331, 14727310, 13685544, 15862018, 13499128, 16175381, 13584130
 12829021, 15862019, 12794305, 14546673, 12791981, 13787482, 13503598
 10133521, 12718090, 13399435, 14023636, 13860201, 12401111, 13257247
 13362079, 14176879, 12917230, 13923374, 14220725, 14480675, 13524899
 13559697, 9706792, 14480674, 13916709, 13098318, 13773133, 14076523
 13340388, 13366202, 13528551, 12894807, 13454210, 13343438, 12748240
 14205448, 13385346, 15853081, 14273397, 12971775, 13582702, 10242202
 13035804, 13544396, 16382353, 8547978, 14226599, 14062795, 13035360
 12693626, 13332439, 14038787, 14062796, 12913474, 14841409, 14390252
 16314470, 13370330, 13059165, 14062797, 14062794, 12959852, 13358781
 12345082, 12960925, 9659614, 13699124, 14546638, 13936424, 13338048
 12938841, 12658411, 12620823, 12656535, 14062793, 12678920, 13038684
 14062792, 13807411, 13250244, 12594032, 15862022, 9761357, 12612118
 13742464, 14052474, 13911821, 13457582, 13527323, 15862020, 13910420
 13502183, 12780098, 13705338, 13696216, 14841558, 10263668, 15862023
 16056266, 15862024, 13554409, 13645917, 13103913, 13011409, 14063280
Patch  16315641     : applied on Wed May 15 13:58:54 CEST 2013
 Unique Patch ID:  15966967
 Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.6 (16083653)"
 Created on 1 Apr 2013, 03:41:20 hrs PST8PDT
 Bugs fixed:
 16315641, 15876003, 14275572, 13919095, 13696251, 13348650, 12659561
 14305980, 14277586, 13987807, 14625969, 13825231, 12794268, 13000491
 13498267, 11675721, 14082976, 12771830, 14515980, 14085018, 13943175
 14102704, 14171552, 12594616, 13879428, 12897902, 12726222, 12829429
 13079948, 13090686, 12995950, 13251796, 13582411, 12990582, 13857364
 13082238, 12947871, 13256955, 13037709, 14535011, 12878750, 14048512
 11772838, 13058611, 13001955, 13440962, 13727853, 13425727, 12885323
 12870400, 14212634, 14407395, 13332363, 13430626, 13811209, 12709476
 14168708, 14096821, 14626717, 13460353, 13694885, 12857064, 12899169
 13111013, 12558569, 13323698, 10260842, 13085732, 10317921, 13869978
 12914824, 13789135, 12730342, 12950823, 13355963, 13531373, 14268365
 13776758, 12720728, 13620816, 13023609, 13024624, 13039908, 13036424
 13938166, 13011520, 13569812, 12758736, 13001901, 13077654, 13430715
 13550689, 13806545, 13634583, 14271305, 12538907, 13947200, 12996428
 13066371, 13483672, 12897651, 13540563, 12896850, 13241779, 12728585
 12876314, 12925041, 12650672, 12398492, 12848480, 13652088, 16307750
 12917897, 12975811, 13653178, 13371153, 14800989, 10114953, 14001941
 11836951, 14179376, 12965049, 14773530, 12765467, 13339443, 13965075
 16210540, 14307855, 12784559, 14242977, 13955385, 12704789, 13745317
 13074261, 12971251, 13993634, 13523527, 13719731, 13396284, 12639013
 12867511, 12959140, 14748254, 12829917, 12349553, 12849377, 12934171
 13843080, 14496536, 13924431, 12680491, 13334158, 10418841, 12832204
 13838047, 13002015, 12791719
Rac system comprising of multiple nodes
 Local node = odanode2
 Remote node = odanode1
--------------------------------------------------------------------------------
OPatch succeeded.
 [oracle@odanode2 OPatch]$
-------------------------------------------------
 --ODA Software version after patching
 -------------------------------------------------
 [root@odanode1 bin]# /opt/oracle/oak/bin/oakcli show version -detail
 reporting the metadata. It takes a while...
 System Version         Component Name            Installed Version                Supported Version
 --------------          ---------------              ---------------------         ----------------------
 2.6.0.0.0
 Controller                        11.05.02.00                      Up-to-date
 Expander                         0342                               Up-to-date
 SSD_SHARED                    E12B                               Up-to-date
 HDD_LOCAL                      5G08                               Up-to-date
 HDD_SHARED                    A700                               Up-to-date
 ILOM                               3.0.16.22.b r78329            Up-to-date
 BIOS                               12010310                         Up-to-date
 IPMI                                1.8.10.5                          Up-to-date
 HMP                                2.2.6.1                            Up-to-date
 OAK                                2.6.0.0.0                          Up-to-date
 OEL                                5.8                                  Up-to-date
 TFA                                2.5.1.4                            Up-to-date
 GI_HOME                         11.2.0.3.6(16056266,         Up-to-date
 16083653)
 DB_HOME                         11.2.0.3.6(16056266,          Up-to-date
 16083653)
 ASR                                  Unknown                          4.4
 [root@odanode1 bin]#
[grid@odanode2 ~]$ crsctl stat res -t
 --------------------------------------------------------------------------------
 NAME           TARGET  STATE        SERVER                   STATE_DETAILS
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.DATA.dg
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.LISTENER.lsnr
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.RECO.dg
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.REDO.dg
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.asm
 ONLINE  ONLINE       odanode1               Started
 ONLINE  ONLINE       odanode2               Started
 ora.gsd
 OFFLINE OFFLINE      odanode1
 OFFLINE OFFLINE      odanode2
 ora.net1.network
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.ons
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 ora.registry.acfs
 ONLINE  ONLINE       odanode1
 ONLINE  ONLINE       odanode2
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 ora.LISTENER_SCAN1.lsnr
 1        ONLINE  ONLINE       odanode2
 ora.LISTENER_SCAN2.lsnr
 1        ONLINE  ONLINE       odanode1
 ora.cvu
 1        ONLINE  ONLINE       odanode1
 ora.efboeur.db
 1        ONLINE  ONLINE       odanode1               Open
 2        ONLINE  ONLINE       odanode2               Open
 ora.efboeur.efbo_applb.efow.com.svc
 1        ONLINE  ONLINE       odanode2
 2        ONLINE  ONLINE       odanode1
 ora.efboeur.efbo_report.efow.com.svc
 1        OFFLINE OFFLINE
 2        OFFLINE OFFLINE
 ora.efcteur.db
 1        ONLINE  ONLINE       odanode1               Open
 2        ONLINE  ONLINE       odanode2               Open
 ora.efcteur.efct_applb.efow.com.svc
 1        ONLINE  ONLINE       odanode1
 2        ONLINE  ONLINE       odanode2
 ora.efcteur.efct_report.efow.com.svc
 1        OFFLINE OFFLINE
 2        OFFLINE OFFLINE
 ora.odanode1.vip
 1        ONLINE  ONLINE       odanode1
 ora.odanode2.vip
 1        ONLINE  ONLINE       odanode2
 ora.efpheur.db
 1        ONLINE  ONLINE       odanode1               Open
 2        ONLINE  ONLINE       odanode2               Open
 ora.efpheur.efph_applb.efow.com.svc
 1        ONLINE  ONLINE       odanode2
 2        ONLINE  ONLINE       odanode1
 ora.efpheur.efph_report.efow.com.svc
 1        OFFLINE OFFLINE
 2        OFFLINE OFFLINE
 ora.oc4j
 1        ONLINE  ONLINE       odanode1
 ora.scan1.vip
 1        ONLINE  ONLINE       odanode2
 ora.scan2.vip
 1        ONLINE  ONLINE       odanode1
 [grid@odanode2 ~]$

	

Oracle Cluster Name

#################################################
##    How to display Oracle Cluster name       ##
#################################################

Oracle Clusterware includes the utility cemutlo which provides 
cluster name and version.

[grid@lnxcld01 ~]$ cemutlo -h
Usage: /GRID_INFRA/product/11.2.0.3/bin/cemutlo.bin [-n] [-w]
        where:
        -n prints the cluster name
        -w prints the clusterware version in the following format:
                 <major_version>:<minor_version>:<vendor_info>


--Cluster Name
[grid@lnxcld01 ~]$ cemutlo -n
cloud01

--Cluster Version
[grid@lnxcld01 ~]$ cemutlo -w
2:1:

DB Remote Connection in Restricted Mode

##################################################
##   How to establish remote connection to a    ##  
##   database in restricted or NO MOUNT mode    ##
##################################################

Connections via listener to an instance that is in RESTRICTED status or 
in NO MOUNT status fail with TNS-12526, TNS-12527 or TNS-12528 even 
when supplying the credentials for a privileged account.
   
The lsnrctl services output will show that the service handler for this 
instance is in state: BLOCKED or RESTRICTED.

 
DBTEST_PRIV = 
   (DESCRIPTION = 
     (ADDRESS_LIST = 
          (ADDRESS = (PROTOCOL = TCP)(HOST = rm01it.emilianofusaglia.net)(PORT = 1522)))
      (CONNECT_DATA = 
          (UR=A) 
          (SERVICE_NAME = dbtest.emilianofusaglia.net) 
       ) 
     ) 
 

 
Note that the (UR=A) clause is intended to work with a dynamically 
registered handler so the use of SERVICE_NAME versus SID is preferred.  
SID may connect to a statically configured handler.

Data Guard Broker

###################################################
##      How to configure DATA GUARD BROKER    ##
###################################################

# Create the data guard broker files

--Primary
alter system set dg_broker_config_file1 = '+DATA1/TEFOXTR/DATAGUARDCONFIG/brokerconfig01.dat';
alter system set dg_broker_config_file2 = '+FRA1/TEFOXTR/DATAGUARDCONFIG/brokerconfig02.dat';

--Standby
alter system set dg_broker_config_file1 = '+DATA1/TEFOXZH/DATAGUARDCONFIG/brokerconfig01.dat';
alter system set dg_broker_config_file2 = '+FRA1/TEFOXZH/DATAGUARDCONFIG/brokerconfig02.dat';


--Start the broker on both databases
alter system set dg_broker_start=true;


--From the primary database connect to the broker and create the configuration
#dgmgrl

DGMGRL>
connect sys/xxxxxxx@TEFOXTR.emilianofusaglia.net

--Create the configuration for primary database
create configuration 'BRKTEFOX' as primary database is 'TEFOXTR' connect identifier is TEFOXTR_DGBHA.emilianofusaglia.net;

--Add standby database
add database 'TEFOXZH' as connect identifier is TEFOXZH_DGBHA.emilianofusaglia.net;

--Setup the properties
edit database 'TEFOXTR' set property 'LogXptMode' = 'SYNC';
edit database 'TEFOXZH' set property 'LogXptMode' = 'SYNC';
--or
edit database 'TEFOXTR' set property 'LogXptMode' = 'ASYNC';
edit database 'TEFOXZH' set property 'LogXptMode' = 'ASYNC';

edit configuration set protection mode as maxprotection;
--or
edit configuration set protection mode as maxavailability;
--or
edit configuration set protection mode as maxperformance;

edit database 'TEFOXTR' set property 'NetTimeout' = '20';
edit database 'TEFOXZH' set property 'NetTimeout' = '20';

edit database 'TEFOXTR' set property 'Binding' = 'MANDATORY';
edit database 'TEFOXZH' set property 'Binding' = 'MANDATORY';

enable configuration;

-- Switchover command:
DGMGRL> SWITCHOVER to "TEFOXZH";

--Stop Recovery
edit database 'TEFOXZH' set state = 'APPLY-OFF';
--Start Recovery
edit database 'TEFOXZH' set state = 'APPLY-ON';
edit database 'TEFOXZH' set state = 'APPLY-ON' WITH APPLY INSTANCE ='TEFOXZH1';

--Enable ArchiveLog Tracing on Primary and Standby for Troubleshooting
edit instance 'TEFOXTR1' on database 'TEFOXTR' set property 'LogArchiveTrace' = '1';    
edit instance 'TEFOXZH1' on database 'TEFOXZH' set property 'LogArchiveTrace' = '6345';

Oracle 11gR1 Data Guard Setup

############################################################
## DATA GUARD IMPLEMENTATION on 11g R1 RAC ##
############################################################

--Primary DB: USA10
--Standby DB: EURO10

############################
--From the Primary Database:
alter database force logging;

alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;
alter database add standby logfile  size 1G;

select * from v$standby_log;

 alter system set parallel_execution_message_size=8192 scope=spfile;
 alter system set fast_start_mttr_target=3600;
 
############################
--From the Standby Site:

--Dump the pfile and change the following parameters for the Standby:
*.control_files='+DATA1/EURO10/CONTROLFILE/CURRENT01.CTR','+FRA1/EURO10/CONTROLFILE/CURRENT02.CTR'
*.db_file_name_convert='/USA10/','/EURO10/'
*.log_file_name_convert='/USA10/','/EURO10/'
*.db_unique_name='EURO10'
--AS this is a single instance RAC
_disable_interface_checking = TRUE


LISTENER =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = lneuron01.emilianofusaglia.net)(PORT = 1526))
  )

alter system set local_listener='LISTENER' scope=spfile sid='EURO11';
---
mkdir -p /u01/oracle/admin/EURO10/adump
mkdir -p /u01/oracle/diag/rdbms/euro10/EURO11/cdump


######################################################################
 ################## #Network Congiguration ########################
######################################################################


##########################################
## Static Listener Entries:
##########################################

--Primary Cluster Node 1
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (global_dbname = USA10_DGMGRL.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA11)
    )
    (SID_DESC =
      (global_dbname = USA10_DGB.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA11)
    )
    (SID_DESC =
      (global_dbname = USA10.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA11)
    )
  )

--Primary Cluster Node 2
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (global_dbname = USA10_DGMGRL.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA12)
    )
    (SID_DESC =
      (global_dbname = USA10_DGB.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA12)
    )
    (SID_DESC =
      (global_dbname = USA10.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA12)
    )
  )

--Primary Cluster Node 3
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (global_dbname = USA10_DGMGRL.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA13)
    )
    (SID_DESC =
      (global_dbname = USA10_DGB.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA13)
    )
    (SID_DESC =
      (global_dbname = USA10.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = USA13)
    )
  )

--Standby Cluster Node 1
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (global_dbname = EURO10_DGMGRL.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = EURO11)
    )
    (SID_DESC =
      (global_dbname = EURO10_DGB.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = EURO11)
    )
    (SID_DESC =
      (global_dbname = EURO10.emilianofusaglia.net)
      (ORACLE_HOME = /u01/oracle/product/11.1.0.7)
      (sid_name = EURO11)
    )
  )


##########################################
##TNS Entries Primary & Standby Cluster
##########################################
EURO11.emilianofusaglia.net =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = lneuron01-vip.emilianofusaglia.net)(PORT = 1526))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = EURO10.emilianofusaglia.net)
      (INSTANCE_NAME = EURO11)
    )
  )

EURO10.emilianofusaglia.net =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = lneuron01-vip.emilianofusaglia.net)(PORT = 1526))
      (FAILOVER = on)
      (LOAD_BALANCE = on)
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = EURO10.emilianofusaglia.net)
    )
  )

USA10.emilianofusaglia.net =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = lnusan01-vip.emilianofusaglia.net)(PORT = 1526))
      (ADDRESS = (PROTOCOL = TCP)(HOST = lnusan02-vip.emilianofusaglia.net)(PORT = 1526))
      (ADDRESS = (PROTOCOL = TCP)(HOST = lnusan03-vip.emilianofusaglia.net)(PORT = 1526))
      (FAILOVER = on)
      (LOAD_BALANCE = on)
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = USA10.emilianofusaglia.net)
    )
  )


##########################################
## Standby Controlfile Setup ##
##########################################

alter database create standby controlfile as '/u01/oracle/emiliano/USA10.stby.ctl';

# scp  /u01/oracle/emiliano/USA10.stby.ctl lneuron01:/tmp


### Execute the following steps:
Startup nomount pfile='/u01/oracle/emiliano/PFILES/EURO10_for_GD.ora';
Create the spfile on ASM
Startup nomount exclusive;


## Do not RESTORE the Controlfile automatically DONE by the CLONE Procedure
## Which update also Contro_file parameter into SPFIE!!!!
rman target /
RMAN> restore controlfile from '/u01/oracle/emiliano/USA10.stby.ctl';

---
##########################################
## Duplicate the Database
##########################################

##From Primary DB Restore the DB to the Standby Side:
rman
connect target sys/xxxxxxx@USA10                             ----PS No domain for Target
connect auxiliary sys/xxxxxxx@EURO10.emilianofusaglia.net      ----PS Use domain for Auxiliary

run {
   allocate channel p1 type disk;
   allocate auxiliary channel s1 type disk;
   duplicate target database for standby from active database
   dorecover;
    }

--or

run {
   allocate channel p1 type disk;
   allocate channel p2 type disk;
   allocate channel p3 type disk;
   allocate channel p4 type disk;
   allocate auxiliary channel s1 type disk;
   allocate auxiliary channel s2 type disk;
   allocate auxiliary channel s3 type disk;
   allocate auxiliary channel s4 type disk;
   duplicate target database for standby from active database
   dorecover;
    }

##########################################
## Register the Standby Database to CRS
##########################################

srvctl add database -d EURO10 -o $ORACLE_HOME
srvctl add instance -d EURO10 -i EURO11 -n lneuron01

##########################################
## Data Guard Broker Configuration
##########################################

--Primary
alter system set dg_broker_config_file1 = '+DATA1/USA10/DATAGUARDCONFIG/brokerconfig01.dat';
alter system set dg_broker_config_file2 = '+DATA1/USA10/DATAGUARDCONFIG/brokerconfig02.dat';

--Standby
alter system set dg_broker_config_file1 = '+DATA1/EURO10/DATAGUARDCONFIG/brokerconfig01.dat';
alter system set dg_broker_config_file2 = '+DATA1/EURO10/DATAGUARDCONFIG/brokerconfig02.dat';

--on both databases
alter system set dg_broker_start=true;

--From a primary node connect to the broker and create the configuration

#dgmgrl

DGMGRL> connect sys/xxxxxxxx@USA10.emilianofusaglia.net
Connected.

create configuration 'CONFDG10' as primary database is 'USA10' connect identifier is USA10.emilianofusaglia.net;
   
add database 'EURO10' as connect identifier is EURO10.emilianofusaglia.net;

edit database 'USA10' set property 'LogXptMode' = 'SYNC';
edit database 'EURO10' set property 'LogXptMode' = 'SYNC';

edit database 'USA10' set property 'LogXptMode' = 'ASYNC';
edit database 'EURO10' set property 'LogXptMode' = 'ASYNC';

--edit configuration set protection mode as maxavailability;
edit configuration set protection mode as maxprotection;
--edit configuration set protection mode as maxavailability;
--edit configuration set protection mode as maxperformance;
enable configuration;

edit database 'USA10' set property 'NetTimeout' = '20';
edit database 'EURO10' set property 'NetTimeout' = '20';

exit;

DGMGRL> SWITCHOVER to "EURO10";

--Stop Recovery
edit database 'EURO10' set state = 'APPLY-OFF';
--Start Recovery
edit database 'EURO10' set state = 'APPLY-ON';

--Enabling ArchiveLog Tracing on Primary and Standby Good for Troubleshooting!!
edit instance 'USA11' on database 'USA10' set property 'LogArchiveTrace' = '1';    
edit instance 'USA12' on database 'USA10' set property 'LogArchiveTrace' = '1';    
edit instance 'USA13' on database 'USA10' set property 'LogArchiveTrace' = '1';    

edit instance 'EURO11' on database 'EURO10' set property 'LogArchiveTrace' = '6345';    

##############################################################################