Monday, May 16, 2011

Using opatch auto apply PSU in GI envrionment

[grid@vmxdb04 grid]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE vmxdb03
ONLINE ONLINE vmxdb04
ora.FRA.dg
ONLINE ONLINE vmxdb03
ONLINE ONLINE vmxdb04
ora.LISTENER.lsnr
ONLINE ONLINE vmxdb03
ONLINE ONLINE vmxdb04
ora.OCRVOTE.dg
ONLINE ONLINE vmxdb03
ONLINE ONLINE vmxdb04
ora.asm
ONLINE ONLINE vmxdb03 Started
ONLINE ONLINE vmxdb04
ora.gsd
OFFLINE OFFLINE vmxdb03
OFFLINE OFFLINE vmxdb04
ora.net1.network
ONLINE ONLINE vmxdb03
ONLINE ONLINE vmxdb04
ora.ons
ONLINE ONLINE vmxdb03
ONLINE ONLINE vmxdb04
ora.registry.acfs
ONLINE ONLINE vmxdb03
ONLINE ONLINE vmxdb04
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE vmxdb04
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE vmxdb03
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE vmxdb03
ora.cvu
1 ONLINE ONLINE vmxdb03
ora.oc4j
1 ONLINE ONLINE vmxdb03
ora.orcl.db
1 ONLINE ONLINE vmxdb03 Open
2 ONLINE ONLINE vmxdb04 Open
ora.scan1.vip
1 ONLINE ONLINE vmxdb04
ora.scan2.vip
1 ONLINE ONLINE vmxdb03
ora.scan3.vip
1 ONLINE ONLINE vmxdb03
ora.vmxdb03.vip
1 ONLINE ONLINE vmxdb03
ora.vmxdb04.vip
1 ONLINE ONLINE vmxdb04


[grid@vmxdb03 grid]$ $ORACLE_HOME/OPatch/ocm/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.

[root@vmxdb03 patch]# opatch auto /u01/stage/patch/grid
Executing /usr/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch112.pl -patchdir /u01/stage/patch -patchn grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-05-16_10-39-51.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
OPatch is bundled with OCM, Enter the absolute OCM response file path:
/u01/stage/patch/grid/ocm.rsp

patch /u01/stage/patch/grid/12311357/custom/server/12311357 apply successful for home /u01/app/oracle/product/11.2.0/dbhome_1
patch /u01/stage/patch/grid/11724916 apply successful for home /u01/app/oracle/product/11.2.0/dbhome_1
Successfully unlock /u01/app/11.2.0/grid
patch /u01/stage/patch/grid/12311357 apply successful for home /u01/app/11.2.0/grid
patch /u01/stage/patch/grid/11724916 apply successful for home /u01/app/11.2.0/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@vmxdb04 ~]# $ORACLE_HOME/OPatch/opatch auto /u01/stage/patch/grid
Executing /usr/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch112.pl -patchdir /u01/stage/patch -patchn grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-05-16_11-07-49.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
OPatch is bundled with OCM, Enter the absolute OCM response file path:
/u01/stage/patch/grid/ocm.rsp
patch /u01/stage/patch/grid/12311357/custom/server/12311357 apply successful for home /u01/app/oracle/product/11.2.0/dbhome_1
patch /u01/stage/patch/grid/11724916 apply successful for home /u01/app/oracle/product/11.2.0/dbhome_1
Successfully unlock /u01/app/11.2.0/grid
patch /u01/stage/patch/grid/12311357 apply successful for home /u01/app/11.2.0/grid
patch /u01/stage/patch/grid/11724916 apply successful for home /u01/app/11.2.0/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.

[oracle@vmxdb03 ~]$ cd $ORACLE_HOME/rdbms/admin
[oracle@vmxdb03 admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon May 16 12:27:42 2011

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

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_ORCL_GENERATE_2011May16_12_27_48.log
Apply script: /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_ORCL_APPLY.sql
Rollback script: /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_ORCL_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_ORCL_APPLY_2011May16_12_27_53.log
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@vmxdb03 admin]$