Saturday, November 21, 2015

Steps Manual Apply PSU4 on 11.2.0.3 in RAC environment + Manual Rollback Steps

Manual Steps for Apply/Rollback Patch


Check & release libraries on AIX before patching
genkld | grep /tststg/oragrid/grid2
/usr/sbin/slibclean


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

Apply patch in tstdb01 - Node 1

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

Execute the following on each node of the cluster in non-shared CRS and DB home environment to apply the patch.

1) Stop the CRS managed resources running from DB homes.

   $ /tststg/oragrid/db2/bin/srvctl stop home -o /tststg/oragrid/db2 -s /home/oradb/status_tstprd1.txt -n tstdb01

2) Run the pre root script.

    $ /tststg/oragrid/grid2/crs/install/rootcrs.pl -unlock

3)  Apply the CRS patch using.

    As the GI home owner execute:

    $/tststg/oragrid/grid2/OPatch/opatch napply -oh /tststg/oragrid/grid2 -local /tststg/oraback/PSU4/14275572

    As the GI home owner execute:

    $/tststg/oragrid/grid2/OPatch/opatch apply -oh /tststg/oragrid/grid2 -local /tststg/oraback/PSU4/14275605

4) Run the pre script for DB component of the patch.

    As the database home owner execute:

   $ /tststg/oraback/PSU4/14275572/custom/server/14275572/custom/scripts/prepatch.sh -dbhome /tststg/oragrid/db2

    Apply the DB patch
    As the database home owner execute:

    $/tststg/oragrid/db2/OPatch/opatch napply -oh /tststg/oragrid/db2 -local          /tststg/oraback/PSU4/14275572/custom/server/14275572
    /tststg/oragrid/db2/OPatch/opatch apply -oh /tststg/oragrid/db2 -local /tststg/oraback/PSU4/14275605

5) Run the post script for DB component of the patch.

    As the database home owner execute:

    /tststg/oraback/PSU4/14275572/custom/server/14275572/custom/scripts/postpatch.sh -dbhome /tststg/oragrid/db2

6) Run the post script.

    As the root user execute:

    #/tststg/oragrid/grid2/rdbms/install/rootadd_rdbms.sh

    #/tststg/oragrid/grid2/crs/install/rootcrs.pl -patch


    $/tststg/oragrid/db2/bin/srvctl start home -o /tststg/oragrid/db2 -s /home/oradb/status_tstprd1.txt -n tstdb01



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

Apply patch in tstdb02

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

Execute the following on each node of the cluster in non-shared CRS and DB home environment to apply the patch.

1) Stop the CRS managed resources running from DB homes.

    $/tststg/oragrid/db2/bin/srvctl stop home -o /tststg/oragrid/db2 -s /home/oradb/status_tstprd2.txt -n tstdb02

2) Run the pre root script.

  $/tststg/oragrid/grid2/crs/install/rootcrs.pl -unlock

3)  Apply the CRS patch using.

    As the GI home owner execute:

   $ /tststg/oragrid/grid2/OPatch/opatch napply -oh /tststg/oragrid/grid2 -local /tststg/oraback/PSU4/14275572

    As the GI home owner execute:

    $/tststg/oragrid/grid2/OPatch/opatch apply -oh /tststg/oragrid/grid2 -local /tststg/oraback/PSU4/14275605

4) Run the pre script for DB component of the patch.

    As the database home owner execute:

    $/tststg/oraback/PSU4/14275572/custom/server/14275572/custom/scripts/prepatch.sh -dbhome /tststg/oragrid/db2

    Apply the DB patch.

    As the database home owner execute:

    $/tststg/oragrid/db2/OPatch/opatch napply -oh /tststg/oragrid/db2 -local /tststg/oraback/PSU4/14275572/custom/server/14275572
    $/tststg/oragrid/db2/OPatch/opatch apply -oh /tststg/oragrid/db2 -local /tststg/oraback/PSU4/14275605

5) Run the post script for DB component of the patch.

    As the database home owner execute:

    $/tststg/oraback/PSU4/14275572/custom/server/14275572/custom/scripts/postpatch.sh -dbhome /tststg/oragrid/db2

6) Run the post script.

    As the root user execute:

    $/tststg/oragrid/grid2/rdbms/install/rootadd_rdbms.sh

    $/tststg/oragrid/grid2/crs/install/rootcrs.pl -patch


    $/tststg/oragrid/db2/bin/srvctl start home -o /tststg/oragrid/db2 -s /home/oradb/status_tstprd2.txt -n tstdb02


########################################################################
                
$sqlplus / as sysdba

SQL>@?/rdbms/admin/catbundle.sql psu apply


SQL>select ACTION_TIME,ACTION,COMMENTS,BUNDLE_SERIES from registry$history order by 1;



########################################################################                
                >>>>>>>>>>>>>>>>>>>>>>>>  End  <<<<<<<<<<<<<<<<<<<<<<<<<<


Steps for Rolling Back the Patch From a GI Home


Execute the following on each node of the cluster in non-shared CRS and DB home environment to rollback the patch.

    Stop the CRS managed resources running from DB homes.

    If this is a GI Home environment, as the database home owner execute:

    $ /tststg/oragrid/db2/bin/srvctl stop home -o /tststg/oragrid/db2 -s <status file location> -n <node name>

    If this is an Oracle Restart Home environment, as the database home owner execute:

    $ /tststg/oragrid/db2/bin/srvctl stop home -o /tststg/oragrid/db2 -s <status file location> 


    Note:
    You need to make sure that the Oracle ACFS file systems are unmounted (see Section 2.8) and all other Oracle processes are shut down before you proceed.

    Run the pre root script.

    If this is a GI Home, as the root user execute:

    # /tststg/oragrid/grid2/crs/install/rootcrs.pl -unlock

    If this is an Oracle Restart Home, as the root user execute:

    # /tststg/oragrid/grid2/crs/install/roothas.pl -unlock

    Roll back the CRS patch.

    As the GI home owner execute:

    $ /tststg/oraback/11.2.3/OPatch/opatch rollback -local -id 14275572 -oh /tststg/oragrid/grid2 
    $ /tststg/oraback/11.2.3/OPatch/opatch rollback -local -id 14275605 -oh /tststg/oragrid/grid2 

    Run the pre script for DB component of the patch.

    As the database home owner execute:

    $ /tststg/oraback/PSU4/14275572/custom/server/14275572/custom/scripts/prepatch.sh -dbhome /tststg/oragrid/db2

    Roll back the DB patch from the database home.

    As the database home owner execute:

    $ /tststg/oraback/11.2.3/OPatch/opatch rollback -local -id 14275572 -oh /tststg/oragrid/db2 
    $ /tststg/oraback/11.2.3/OPatch/opatch rollback -local -id 14275605 -oh /tststg/oragrid/db2

    Run the post script for DB component of the patch.

    As the database home owner execute:

    $ /tststg/oraback/PSU4/14275572/custom/server/14275572/custom/scripts/postpatch.sh -dbhome /tststg/oragrid/db2

    Run the post script.

    As the root user execute:

    # /tststg/oragrid/grid2/rdbms/install/rootadd_rdbms.sh

    If this is a GI Home, as the root user execute:

    # /tststg/oragrid/grid2/crs/install/rootcrs.pl -patch

    If this is an Oracle Restart Home, as the root user execute:

    # /tststg/oragrid/grid2/crs/install/roothas.pl -patch
                
                

If the message, "A system reboot is recommended before using ACFS” is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.

Start the CRS managed resources that were earlier running from DB homes.

If this is a GI Home environment, as the database home owner execute:

$ /tststg/oragrid/db2/bin/srvctl start home -o /tststg/oragrid/db2 -s <status file location> -n <node name>

If this is an Oracle Restart Home environment, as the database home owner execute:

$ /tststg/oragrid/db2/bin/srvctl start home -o /tststg/oragrid/db2 -s <status file location> 

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

Source: http://vijaydbacorner.blogspot.in/2013/04/steps-manual-apply-psu4-on-11203-in-rac.html