Friday, August 26, 2016

RAC Patching # opatch auto

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Applying opatch using response file # 

[root@tnc1 stage]# opatch auto /u01/stage/23274134 -ocmrf /u01/stage/first_node_file.rsp
Executing /u01/app/11.2.0.4/grid/perl/bin/perl /u01/app/11.2.0.4/grid/OPatch/crs/patch11203.pl -patchdir /u01/stage -patchn 23274134 -ocmrf /u01/stage/first_node_file.rsp -paramfile /u01/app/11.2.0.4/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0.4/grid/cfgtoollogs/opatchauto2016-08-26_13-35-20.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/11.2.0.4/grid/cfgtoollogs/opatchauto2016-08-26_13-35-20.report.log
2016-08-26 13:35:20: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
Stopping RAC /u01/app/oracle/product/11.2.0.4/db_1 ...
Stopped RAC /u01/app/oracle/product/11.2.0.4/db_1 successfully
patch /u01/stage/23274134/23054359  apply successful for home  /u01/app/oracle/product/11.2.0.4/db_1 
patch /u01/stage/23274134/23054319/custom/server/23054319  apply successful for home  /u01/app/oracle/product/11.2.0.4/db_1 
Stopping CRS...
Stopped CRS successfully
patch /u01/stage/23274134/23054359  apply successful for home  /u01/app/11.2.0.4/grid 
patch /u01/stage/23274134/23054319  apply successful for home  /u01/app/11.2.0.4/grid 
patch /u01/stage/23274134/22502505  apply successful for home  /u01/app/11.2.0.4/grid 
Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
Starting RAC /u01/app/oracle/product/11.2.0.4/db_1 ...
Started RAC /u01/app/oracle/product/11.2.0.4/db_1 successfully
opatch auto succeeded. 

#  +++++++++++      ++++++++++++++ +++++++++++++ +++++++++++++
This is the main log file: /u01/app/11.2.0.4/grid/cfgtoollogs/opatchauto2016-08-26_13-35-20.report.log

Steps executed to apply "opatch auto" in RAC cluster as follows # 

[root@tnc1 ~]# tail -100f /u01/app/11.2.0.4/grid/cfgtoollogs/opatchauto2016-08-26_13-35-20.report.log
***********  Configuration Data  ***********
* It shows only those targets that will be patched in this session *

crs_home=/u01/app/11.2.0.4/grid      owner=oracle      opatch_ver=11.2.0.3.12
rac_home=/u01/app/oracle/product/11.2.0.4/db_1      owner=oracle      opatch_ver=11.2.0.3.12

*********** Steps to be executed as owner unless specified as root ***********

1: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch prereq CheckComponents -ph /u01/stage/23274134/23054359 -oh /u01/app/oracle/product/11.2.0.4/db_1

2: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch prereq CheckComponents -ph /u01/stage/23274134/23054319/custom/server/23054319 -oh /u01/app/oracle/product/11.2.0.4/db_1

3: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch prereq CheckConflictAgainstOH -ph /u01/stage/23274134/23054359 -oh /u01/app/oracle/product/11.2.0.4/db_1

4: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch prereq CheckConflictAgainstOH -ph /u01/stage/23274134/23054319/custom/server/23054319 -oh /u01/app/oracle/product/11.2.0.4/db_1

5: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckComponents -ph /u01/stage/23274134/23054359 -oh /u01/app/11.2.0.4/grid

6: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckComponents -ph /u01/stage/23274134/23054319 -oh /u01/app/11.2.0.4/grid

7: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckComponents -ph /u01/stage/23274134/22502505 -oh /u01/app/11.2.0.4/grid

8: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckConflictAgainstOH -ph /u01/stage/23274134/23054359 -oh /u01/app/11.2.0.4/grid

9: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckConflictAgainstOH -ph /u01/stage/23274134/23054319 -oh /u01/app/11.2.0.4/grid

10: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckConflictAgainstOH -ph /u01/stage/23274134/22502505 -oh /u01/app/11.2.0.4/grid

11: /u01/app/oracle/product/11.2.0.4/db_1/bin/emctl stop dbconsole

12: /u01/app/oracle/product/11.2.0.4/db_1/bin/emctl stop agent

13: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch prereq CheckApplicable -ph /u01/stage/23274134/23054359 -oh /u01/app/oracle/product/11.2.0.4/db_1

14: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch prereq CheckApplicable -ph /u01/stage/23274134/23054319/custom/server/23054319 -oh /u01/app/oracle/product/11.2.0.4/db_1

15: /u01/app/oracle/product/11.2.0.4/db_1/bin/srvctl stop home -o /u01/app/oracle/product/11.2.0.4/db_1 -s /u01/app/oracle/product/11.2.0.4/db_1/srvm/admin/stophome.txt -n tnc1 -f

16: /u01/stage/23274134/23054319/custom/server/23054319/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0.4/db_1

17: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch napply /u01/stage/23274134/23054359 -local -silent -ocmrf /u01/stage/first_node_file.rsp -oh /u01/app/oracle/product/11.2.0.4/db_1 -invPtrLoc /u01/app/oracle/product/11.2.0.4/db_1/oraInst.loc

18: /u01/app/oracle/product/11.2.0.4/db_1/OPatch/opatch napply /u01/stage/23274134/23054319/custom/server/23054319 -local -silent -ocmrf /u01/stage/first_node_file.rsp -oh /u01/app/oracle/product/11.2.0.4/db_1 -invPtrLoc /u01/app/oracle/product/11.2.0.4/db_1/oraInst.loc

19: /u01/stage/23274134/23054319/custom/server/23054319/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0.4/db_1

20: /u01/app/11.2.0.4/grid/crs/install/rootcrs.pl -unlock : run as root

21: /sbin/fuser -k /u01/app/11.2.0.4/grid/bin/crsctl.bin : run as root

22: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckApplicable -ph /u01/stage/23274134/23054359 -oh /u01/app/11.2.0.4/grid

23: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckApplicable -ph /u01/stage/23274134/23054319 -oh /u01/app/11.2.0.4/grid

24: /u01/app/11.2.0.4/grid/OPatch/opatch prereq CheckApplicable -ph /u01/stage/23274134/22502505 -oh /u01/app/11.2.0.4/grid

25: /u01/app/11.2.0.4/grid/OPatch/opatch napply /u01/stage/23274134/23054359 -local -silent -ocmrf /u01/stage/first_node_file.rsp -oh /u01/app/11.2.0.4/grid -invPtrLoc /u01/app/11.2.0.4/grid/oraInst.loc

26: /u01/app/11.2.0.4/grid/OPatch/opatch napply /u01/stage/23274134/23054319 -local -silent -ocmrf /u01/stage/first_node_file.rsp -oh /u01/app/11.2.0.4/grid -invPtrLoc /u01/app/11.2.0.4/grid/oraInst.loc

27: /u01/app/11.2.0.4/grid/OPatch/opatch napply /u01/stage/23274134/22502505 -local -silent -ocmrf /u01/stage/first_node_file.rsp -oh /u01/app/11.2.0.4/grid -invPtrLoc /u01/app/11.2.0.4/grid/oraInst.loc

28: /u01/app/11.2.0.4/grid/bin/emctl start dbconsole

29: /u01/app/11.2.0.4/grid/rdbms/install/rootadd_rdbms.sh : run as root

30: /u01/app/11.2.0.4/grid/crs/install/rootcrs.pl -patch : run as root

31: /u01/app/oracle/product/11.2.0.4/db_1/bin/emctl start dbconsole

32: /u01/app/oracle/product/11.2.0.4/db_1/bin/emctl start agent

33: /u01/app/oracle/product/11.2.0.4/db_1/bin/srvctl start home -o /u01/app/oracle/product/11.2.0.4/db_1 -s /u01/app/oracle/product/11.2.0.4/db_1/srvm/admin/stophome.txt -n tnc1

### Post Installation Steps ### After ...
Patch 23274134 - Oracle Grid Infrastructure Patch Set Update 11.2.0.4.160719 (Jul2016) (Includes Database PSU 11.2.0.4.160719)

SQL> @$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply
PL/SQL procedure successfully completed.

" catbundle.sql " will update "dba_registry_history" View 

SQL> column version format a10
SQL> column action_time format a30
SQL> column action format a10
SQL> select action_time,action,version,id from dba_registry_history;
ACTION_TIME                    ACTION     VERSION            ID
------------------------------ ---------- ---------- ----------
24-AUG-13 12.03.45.119862 PM   APPLY      11.2.0.4            0
19-JUL-16 03.56.57.399886 PM   APPLY      11.2.0.4            0
25-AUG-16 03.42.09.382630 PM   APPLY      11.2.0.4       160419
26-AUG-16 10.04.27.756443 PM   APPLY      11.2.0.4       160719
4 rows selected.

oracle@tnc1 ~]$ cd $ORACLE_BASE/cfgtoollogs/catbundle 
[oracle@tnc1 catbundle]$ ls -ltr
total 32
-rw-r--r-- 1 oracle oinstall 26377 Aug 26 22:04 catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log
-rw-r--r-- 1 oracle oinstall  2476 Aug 26 22:04 catbundle_PSU_TEST09_APPLY_2016Aug26_22_04_27.log
[oracle@tnc1 catbundle]$

[oracle@tnc1 catbundle]$ grep ERROR *
catbundle_PSU_TEST09_APPLY_2016Aug26_22_04_27.log:SQL> Rem    SQL_IGNORABLE_ERRORS: NONE
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log: 82        RAISE_APPLICATION_ERROR(-20000, 'INVALID_PATH during openScriptFile');
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log: 84        RAISE_APPLICATION_ERROR(-20000, 'INVALID_MODE during openScriptFile');
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log: 86        RAISE_APPLICATION_ERROR(-20000,
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log: 89        RAISE_APPLICATION_ERROR(-20000,
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:107        RAISE_APPLICATION_ERROR(-20000,
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:110        RAISE_APPLICATION_ERROR(-20000,
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:112      WHEN UTL_FILE.WRITE_ERROR THEN
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:113        RAISE_APPLICATION_ERROR(-20000,
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:114                                'WRITE_ERROR during insertScriptFile');
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:123        RAISE_APPLICATION_ERROR(-20000,
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:125      WHEN UTL_FILE.WRITE_ERROR THEN
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:126        RAISE_APPLICATION_ERROR(-20000,
catbundle_PSU_TEST09_GENERATE_2016Aug26_22_04_24.log:127                                'WRITE_ERROR during closeScriptFile');

 # Compile Invalid Objects - - -

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql 

+++Nikhil Tatineni +++

Querys to monitor RAC

following few  Query's will help to find out culprits-  Query to check long running transaction from last 8 hours  Col Sid Fo...