Guenadi N Jilevski's Oracle BLOG

Oracle RAC, DG, EBS, DR and HA DBA BLOG

Patching Oracle 11.2.0.2 GI and RDBMS with patch 12311357

Patching Oracle 11.2.0.2 GI and RDBMS with patch 12311357

In the article you will look at patching Oracle Grid Infrastructure and RDBMS homes in a two node RAC OEL cluster. The methodology applies on any 11.2.0.2 cluster based on OEL.

Download the following patches.

  • 12311357 – 11.2.0.2
  • 6880880 – OPatch 11.2

Make sure that you unzip 6880880 in $GRID_HOME/Opatch by issuing unzip –o p6880880<name> -d $Grid_home command.

[grid@raclinux1 stage]$ unzip -o p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME

Archive: p6880880_112000_Linux-x86-64.zip

inflating: /u01/app/11.2.0.2/grid/OPatch/docs/FAQ

<snipped ….>

[grid@raclinux1 stage]$

Make sure that opatch version displays version greater than 11.2.0.1.5 as show below.

[grid@raclinux1 stage]$ cd OPatch

[grid@raclinux1 OPatch]$ ./opatch version

Invoking OPatch 11.2.0.1.6

OPatch Version: 11.2.0.1.6

OPatch succeeded.

[grid@raclinux1 OPatch]$

Make sure that you unzip 12311357 in a staging directory.

The patch readme provides useful information. I will describe what worked for me.

Patching involves

  • Patching GI home
  • Patching RDBMS homes
  • Applying the Patch to RDBMS home databases

Patching Grid Infrastructure Home

Patching Oracle Grid Infrastructure homes is done in a rolling manner. An OCM response file needs to be created as a prerequisite for patching on each node. The response file is created while logged on as grid owner. Create a response file on each node of the cluster by following the steps below.

/u01/app/11.2.0.2/grid/OPatch/ocm/bin

[grid@raclinux1 bin]$ ls

emocmrsp

[grid@raclinux1 bin]$ ./emocmrsp

OCM Installation Response Generator 10.3.4.0.0 – Production

Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.

Provide your email address to be informed of security issues, install and

initiate Oracle Configuration Manager. Easier for you if you use your My

Oracle Support Email address/User Name.

Visit http://www.oracle.com/support/policies.html for details.

Email address/User Name:

You have not provided an email address for notification of security issues.

Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y

The OCM configuration response file (ocm.rsp) was successfully created.

[grid@raclinux1 bin]$ ls

emocmrsp ocm.rsp

[grid@raclinux1 bin]$

Make sure that use set PATH to $GRID_HOME/OPatch and use root login.

Run opatch on node raclinux1. Specify the response file created when prompted.

[root@raclinux1 stage]# opatch auto /u01/stage -och /u01/app/11.2.0.2/grid

Executing /usr/bin/perl /u01/app/11.2.0.2/grid/OPatch/crs/patch112.pl -patchdir /u01 -patchn stage -och /u01/app/11.2.0.2/grid -paramfile /u01/app/11.2.0.2/grid/crs/install/crsconfig_params

opatch auto log file location is /u01/app/11.2.0.2/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-07-22_19-04-33.log

Detected Oracle Clusterware install

Using configuration parameter file: /u01/app/11.2.0.2/grid/crs/install/crsconfig_params

OPatch is bundled with OCM, Enter the absolute OCM response file path:

/u01/app/11.2.0.2/grid/OPatch/ocm/bin/ocm.rsp

Successfully unlock /u01/app/11.2.0.2/grid

patch /u01/stage/12311357 apply successful for home /u01/app/11.2.0.2/grid

patch /u01/stage/11724916 apply successful for home /u01/app/11.2.0.2/grid

ACFS-9300: ADVM/ACFS distribution files found.

ACFS-9312: Existing ADVM/ACFS installation detected.

ACFS-9314: Removing previous ADVM/ACFS installation.

ACFS-9315: Previous ADVM/ACFS components successfully removed.

ACFS-9307: Installing requested ADVM/ACFS software.

ACFS-9308: Loading installed ADVM/ACFS drivers.

ACFS-9321: Creating udev for ADVM/ACFS.

ACFS-9323: Creating module dependencies – this may take some time.

ACFS-9327: Verifying ADVM/ACFS devices.

ACFS-9309: ADVM/ACFS installation correctness verified.

CRS-4123: Oracle High Availability Services has been started.

[root@raclinux1 stage]#

[root@raclinux1 stage]#

The patching process starts CRS on node raclinux1. Verify as grid owner that the patching has succeeded issuing opatch lsinventory.

Run opatch on node raclinux2. Specify the response file created when prompted.

[root@raclinux2 stage]# opatch auto /u01/stage -och /u01/app/11.2.0.2/grid

Executing /usr/bin/perl /u01/app/11.2.0.2/grid/OPatch/crs/patch112.pl -patchdir /u01 -patchn stage -och /u01/app/11.2.0.2/grid -paramfile /u01/app/11.2.0.2/grid/crs/install/crsconfig_params

opatch auto log file location is /u01/app/11.2.0.2/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-07-22_20-49-36.log

Detected Oracle Clusterware install

Using configuration parameter file: /u01/app/11.2.0.2/grid/crs/install/crsconfig_params

OPatch is bundled with OCM, Enter the absolute OCM response file path:

/u01/app/11.2.0.2/grid/OPatch/ocm/bin/ocm.rsp

Successfully unlock /u01/app/11.2.0.2/grid

patch /u01/stage/12311357 apply successful for home /u01/app/11.2.0.2/grid

patch /u01/stage/11724916 apply successful for home /u01/app/11.2.0.2/grid

ACFS-9300: ADVM/ACFS distribution files found.

ACFS-9312: Existing ADVM/ACFS installation detected.

ACFS-9314: Removing previous ADVM/ACFS installation.

ACFS-9315: Previous ADVM/ACFS components successfully removed.

ACFS-9307: Installing requested ADVM/ACFS software.

ACFS-9308: Loading installed ADVM/ACFS drivers.

ACFS-9321: Creating udev for ADVM/ACFS.

ACFS-9323: Creating module dependencies – this may take some time.

ACFS-9327: Verifying ADVM/ACFS devices.

ACFS-9309: ADVM/ACFS installation correctness verified.

CRS-4123: Oracle High Availability Services has been started.

[root@raclinux2 stage]#

[root@raclinux2 stage]#

[root@raclinux2 stage]#

The patching process starts CRS on node raclinux2. Verify as grid owbner that the patching has succeeded issuing opatch lsinventory.

Patching RDBMS homes

RDBMS homes are also patched in a rolling manner. On each node run the following commands.

  • /u01/stage/12311357/custom/server/12311357/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0/db_10
  • opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/12311357/custom/server/12311357
  • opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/11724916
  • /u01/stage/12311357/custom/server/12311357/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0/db_10

Stop all running processes running from the RDBMS Home to be patched.

Run the first step.

[oracle@raclinux1 stage]$ /u01/stage/12311357/custom/server/12311357/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0/db_10

/u01/stage/12311357/custom/server/12311357/custom/scripts/prepatch.sh completed successfully.

[oracle@raclinux1 stage]$

Run the second step

[oracle@raclinux1 stage]$ opatch napply -oh /u01/app/oracle/product/11.2.0/db_10 -local /u01/stage/12311357/custom/server/12311357

Invoking OPatch 11.2.0.1.6

Oracle Interim Patch Installer version 11.2.0.1.6

Copyright (c) 2011, Oracle Corporation. All rights reserved.

UTIL session

Oracle Home : /u01/app/oracle/product/11.2.0/db_10

Central Inventory : /u01/app/oraInventory

from : /etc/oraInst.loc

OPatch version : 11.2.0.1.6

OUI version : 11.2.0.2.0

Log file location : /u01/app/oracle/product/11.2.0/db_10/cfgtoollogs/opatch/opatch2011-07-22_23-54-17PM.log

Verifying environment and performing prerequisite checks…

Conflicts/Supersets for each patch are:

Patch : 12311357

Bug Superset of 12311357

Super set bugs are:

12311357, 10425672, 10157506, 11655840, 10634513, 9891341, 11782423, 11077756, 10376847, 10178670, 9959110, 10314123, 10014392, 10157622, 10089120, 10057296, 10053985, 9864003, 10044622, 9812970, 10083789, 10073372, 9876201, 9963327, 10375649, 9336825, 10062301, 10018215, 10105195, 10007185, 10071992, 10038791, 10048487, 9926027, 10260251, 10052721, 10028235, 10027079, 10028343, 10231906, 10065216, 10045436, 9907089, 10175855, 10284828, 10072474, 10036834, 10028637, 10029900, 9974223, 9979706, 10016083, 10015460, 9918485, 9971646, 10040647, 9978765, 10069541, 9915329, 10107380, 10110969, 10305361, 10029119, 10233159, 10083009, 9812956, 10008467, 10036193, 10048027, 10040109, 10015210, 9944978, 10033106, 9978195, 10042143, 10284693, 9679401, 10111010, 10075643, 10057680, 10205290, 10124517, 10078086, 9944948, 10146768, 10052529, 10011084, 10073075, 10248739, 10236074, 10128191, 9975837, 10168006, 9949676

Patches [ 12311357 ] will be rolled back.

Do you want to proceed? [y|n]

y

User Responded with: Y

OPatch continues with these patches: 12311357

Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.

Provide your email address to be informed of security issues, install and

initiate Oracle Configuration Manager. Easier for you if you use your My

Oracle Support Email address/User Name.

Visit http://www.oracle.com/support/policies.html for details.

Email address/User Name:

You have not provided an email address for notification of security issues.

Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = ‘/u01/app/oracle/product/11.2.0/db_10′)

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files…

Applying interim patch ‘12311357’ to OH ‘/u01/app/oracle/product/11.2.0/db_10′

Rolling back interim patch ‘12311357’ from OH ‘/u01/app/oracle/product/11.2.0/db_10′

Patching component oracle.rdbms, 11.2.0.2.0…

RollbackSession removing interim patch ‘12311357’ from inventory

OPatch back to application of the patch ‘12311357’ after auto-rollback.

Patching component oracle.rdbms, 11.2.0.2.0…

Patches 12311357 successfully applied.

OPatch Session completed with warnings.

Log file location: /u01/app/oracle/product/11.2.0/db_10/cfgtoollogs/opatch/opatch2011-07-22_23-54-17PM.log

OPatch completed with warnings.

[oracle@raclinux1 stage]$

Run the third step.

[oracle@raclinux1 stage]$ opatch napply -oh /u01/app/oracle/product/11.2.0/db_10 -local /u01/stage/11724916

Invoking OPatch 11.2.0.1.6

Oracle Interim Patch Installer version 11.2.0.1.6

Copyright (c) 2011, Oracle Corporation. All rights reserved.

UTIL session

Oracle Home : /u01/app/oracle/product/11.2.0/db_10

Central Inventory : /u01/app/oraInventory

from : /etc/oraInst.loc

OPatch version : 11.2.0.1.6

OUI version : 11.2.0.2.0

Log file location : /u01/app/oracle/product/11.2.0/db_10/cfgtoollogs/opatch/opatch2011-07-23_00-16-17AM.log

Verifying environment and performing prerequisite checks…

OPatch continues with these patches: 11724916

Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.

Provide your email address to be informed of security issues, install and

initiate Oracle Configuration Manager. Easier for you if you use your My

Oracle Support Email address/User Name.

Visit http://www.oracle.com/support/policies.html for details.

Email address/User Name:

You have not provided an email address for notification of security issues.

Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = ‘/u01/app/oracle/product/11.2.0/db_10′)

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files…

Applying interim patch ‘11724916’ to OH ‘/u01/app/oracle/product/11.2.0/db_10′

Patching component oracle.rdbms.rsf, 11.2.0.2.0…

Patching component oracle.rdbms, 11.2.0.2.0…

Copying file to “/u01/app/oracle/product/11.2.0/db_10/psu/11.2.0.2.2/catpsu.sql”

Copying file to “/u01/app/oracle/product/11.2.0/db_10/psu/11.2.0.2.2/catpsu_rollback.sql”

Patching component oracle.sysman.console.db, 11.2.0.2.0…

Patching component oracle.sysman.oms.core, 10.2.0.4.3…

Patching component oracle.ldap.rsf, 11.2.0.2.0…

Patching component oracle.rdbms.dv, 11.2.0.2.0…

Patching component oracle.rdbms.dbscripts, 11.2.0.2.0…

Patches 11724916 successfully applied.

Log file location: /u01/app/oracle/product/11.2.0/db_10/cfgtoollogs/opatch/opatch2011-07-23_00-16-17AM.log

OPatch succeeded.

[oracle@raclinux1 stage]$

Run the fourth step

/u01/stage/12311357/custom/server/12311357/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0/db_10

Applying the patch to RDBMS home databases

In order to apply the patch, issue the following statements on each database in the patched RDBMS home.

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

CONNECT / AS SYSDBA

STARTUP

@catbundle.sql psu apply

QUIT

SQL> startup;

ORACLE instance started.

Total System Global Area 730714112 bytes

Fixed Size 2230080 bytes

Variable Size 545261760 bytes

Database Buffers 180355072 bytes

Redo Buffers 2867200 bytes

Database mounted.

Database opened.

SQL> SQL>

SQL> @catbundle.sql psu apply

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Generating apply and rollback scripts…

Check the following file for errors:

/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_RACDB_GENERATE_2011Jul23_06_19_36.log

Apply script: /u01/app/oracle/product/11.2.0/db_10/rdbms/admin/catbundle_PSU_RACDB_APPLY.sql

Rollback script: /u01/app/oracle/product/11.2.0/db_10/rdbms/admin/catbundle_PSU_RACDB_ROLLBACK.sql

PL/SQL procedure successfully completed.

Executing script file…

SQL> COLUMN spool_file NEW_VALUE spool_file NOPRINT

SQL> SELECT ‘/u01/app/oracle/cfgtoollogs/catbundle/’ || ‘catbundle_PSU_’ || name || ‘_APPLY_’ || TO_CHAR(SYSDATE, ‘YYYYMonDD_hh24_mi_ss’, ‘NLS_DATE_LANGUAGE=”AMERICAN”’) || ‘.log’ AS spool_file FROM v$database;

SQL> SPOOL &spool_file

SQL> exec dbms_registry.set_session_namespace(‘SERVER’)

PL/SQL procedure successfully completed.

SQL> PROMPT Skipping Oracle Database Vault because it is not installed or versions mismatch…

Skipping Oracle Database Vault because it is not installed or versions mismatch…

SQL> ALTER SESSION SET current_schema = SYS;

Session altered.

SQL> PROMPT Updating registry…

Updating registry…

SQL> INSERT INTO registry$history

2 (action_time, action,

3 namespace, version, id,

4 bundle_series, comments)

5 VALUES

6 (SYSTIMESTAMP, ‘APPLY’,

7 SYS_CONTEXT(‘REGISTRY$CTX’,’NAMESPACE’),

8 ‘11.2.0.2’,

9 2,

10 ‘PSU’,

11 ‘PSU 11.2.0.2.2′);

1 row created.

SQL> COMMIT;

Commit complete.

SQL> SPOOL off

SQL> SET echo off

Check the following log file for errors:

/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_RACDB_APPLY_2011Jul23_06_20_41.log

SQL>

Summary

In the article you looked at patching GI and RDBMS home in a two node cluster running Oracle 11.2.0.2. The procedure for patching RDBMS home based database was reviewed and implemented.


July 27, 2011 - Posted by | oracle

8 Comments »

  1. Hi Guenadi, why not simpy execute:
    opatch auto -oh
    when patching RDBMS homes, as indicated in the PSU2 readme file?
    Enrique.

    Comment by Enrique Orbegozo | July 27, 2011 | Reply

    • Hello Enrique,

      It did not let me patch it. Said that I need to specify -och for GI home. That was the way out to force patching of RDBMS home. It is somewehre toward the botom of the readme.

      Regards,

      Comment by gjilevski | July 27, 2011 | Reply

      • Wow! It worked for me, in fact I applied PSU2 to GI and RDBMS a month ago using only “opatch auto …. -oh …” and just applied the brand new PSU3 to my 5 node cluster with no problems!

        opatch auto gridPSU3 -oh /u01/app/grid/11.2.0/grid_1
        opatch auto gridPSU3 -oh /u01/app/oracle/11.2.0/db_1

        Enrique

        Comment by Enrique Orbegozo | July 27, 2011

      • Thank you. That is awesome. I documented my activities.

        Comment by gjilevski | July 29, 2011

  2. [...] Patching Oracle 11.2.0.2 GI and RDBMS with patch 12311357 …Patching Oracle 11.2.0.2 GI and RDBMS with patch 12311357. In the article you will look at patching Oracle Grid Infrastructure and RDBMS homes in a two node RAC OEL cluster. The methodology applies on any 11.2.0.2 <> [...]

    Pingback by Hadoop growing, not replacing RDBMS in enterprises | August 4, 2011 | Reply

  3. My GI patch failed. the error message is:
    Clusterware is either not running or not configured. You have the following 2 options
    1. Configure and Start the Clusterware on this node and re-run the tool
    2. or Run the tool with the -och option and then invoke tool with -oh to patch the RDBMS home

    then I tried
    /u0/11.2.0/grid/OPatch/opatch auto /opt/patches -och /u0/11.2.0/grid -ocmrf ocm.rsp

    the error message became:
    Unable to determine if /u0/11.2.0/grid is shared oracle home
    Enter ‘yes’ if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yes
    The opatch Component check failed. This patch is not applicable for /u0/11.2.0/grid
    The opatch Component check failed. This patch is not applicable for /u0/11.2.0/grid
    Conflict check failed for oracle home /u0/11.2.0/grid
    Conflict check failed
    Conflict-Check has failed . Please refer to /u0/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-09-17_22-57-10.log for details

    Please help!
    Thanks,
    Tina

    Comment by Tina | September 19, 2011 | Reply

    • Hi,

      What does /u0/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-09-17_22-57-10.log

      says?

      Is there a conflict with another patch? Do you meet the prerequisites for the patch?

      Look at Master Note For OPatch [ID 293369.1]

      Regards,

      Comment by gjilevski | September 19, 2011 | Reply

    • Hi,

      How about Using OPatch -report option, how to check for potential conflicts during patch apply without Database / Listener shutdown [ID 406037.1]

      Regards,

      Comment by gjilevski | September 19, 2011 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 773 other followers

%d bloggers like this: