opatch 应用举例

p6880880_102000_LINUX.zip    upgrade opatch versiion
p12419392_10205_LINUX.zip    psu patch


一 将文件上传到$ORACLE_HOME,并做如下操作,节点一同节点二,
[root@rac1 ~]# hostname
rac1.abc.com
[root@rac1 ~]# whoami
root
[root@rac1 ~]# cd /oracle/product/database/
[root@rac1 database]# ls -l
total 33268
drwxr-x---   7 oracle DBA      4096 Jan  3 23:24 assistants
drwxr-xr-x   2 oracle dba     12288 Jan  5 23:36 bin
drwxr-xr-x   7 oracle dba      4096 Jan  5 23:30 ccr
drwxr-x---   3 oracle dba      4096 Jan  3 23:26 cdata
drwxr-x---   9 oracle dba      4096 Feb 25 08:48 cfgtoollogs
drwxr-x---   4 oracle dba      4096 Jan  3 23:24 clone
drwxr-x---   2 oracle dba      4096 Jan  3 23:26 config
drwxr-x---   6 oracle dba      4096 Jan  3 23:24 crs
drwxr-x---   7 oracle dba      4096 Jan  3 23:26 css
drwxr-x---  10 oracle dba      4096 Jan  3 23:26 ctx
drwxr-x---   2 oracle dba      4096 Mar 25 03:38 dbs
drwxr-x---   3 oracle dba      4096 Jan  3 23:24 demo
drwxr-x---   3 oracle dba      4096 Jan  3 23:24 diagnostics
drwxr-x---   3 oracle dba      4096 Jan  3 23:24 has
drwxr-x---   6 oracle dba      4096 Jan  3 23:28 hs
drwxr-x---   5 oracle dba      4096 Jan  5 23:34 install
-rw-r-----   1 oracle dba        37 Jan  3 23:24 install.platform
drwxr-x---  15 oracle dba      4096 Jan  5 23:24 inventory
drwxr-x---   7 oracle dba      4096 Jan  3 23:24 javavm
drwxr-x---   4 oracle dba      4096 Jan  5 23:30 jdbc
drwxr-x---   7 oracle dba      4096 Jan  5 23:30 jdk
drwxr-x---   2 oracle dba      4096 Jan  5 23:33 jlib
drwxr-x---   3 oracle dba      4096 Jan  3 23:24 jre
drwxr-x---  13 oracle dba      4096 Jan  3 23:26 ldap
drwxr-x---   3 oracle dba     12288 Jan  5 23:34 lib
drwxr-xr-t   3 oracle dba      4096 Jan  4 00:05 log
drwxr-x---   6 oracle dba      4096 Jan  3 23:24 md
drwxr-x---   2 oracle dba      4096 Jan  5 23:34 mesg
drwxr-x---   7 oracle dba      4096 Jan  3 23:26 mgw
drwxr-x---  11 oracle dba      4096 Jan  3 23:28 network
drwxr-x---   6 oracle dba      4096 Jan  3 23:24 nls
drwxr-x---  15 oracle dba      4096 Jan  3 23:28 oc4j
drwxr-x---   7 oracle dba      4096 Jan  3 23:57 odbc
drwxr-xr-x   2 oracle dba      4096 Jan  5 23:33 ODBC
drwxr-x---   5 oracle dba      4096 Jan  3 23:24 olap
drwxr-x---  19 oracle dba      4096 Jan  5 23:30 OPatch
drwxr-x---   7 oracle dba      4096 Jan  3 23:26 opmn
drwxr-x---   4 oracle dba      4096 Jan  3 23:24 oracore
-rw-r--r--   1 oracle dba        50 Jan  3 22:01 oraInst.loc
drwxr-x---   8 oracle dba      4096 Jan  3 23:24 ord
drwxr-x---   7 oracle dba      4096 Jan  5 23:34 oui
drwxr-x---   4 oracle dba      4096 Jan  3 23:24 owm
-rwxr--r--   1 root   root  6301770 Mar 25 03:44 p12419392_10205_LINUX.zip
-rwxr--r--   1 root   root 27412455 Mar 25 03:44 p6880880_102000_LINUX.zip
drwxr-x---   6 oracle dba      4096 Jan  3 23:24 perl
drwxr-x---   7 oracle dba      4096 Jan  5 23:34 plsql
drwxr-x---   7 oracle dba      4096 Jan  3 23:24 precomp
drwxr-----   3 oracle dba      4096 Jan  6 00:57 rac1_orcl2
drwxr-----   3 oracle dba      4096 Jan  5 23:56 rac1_orcl2.upgrade
drwxr-----   3 oracle dba      4096 Jan  6 00:50 rac2_orcl1
drwxr-----   3 oracle dba      4096 Jan  4 01:35 rac2_orcl1.upgrade
drwxr-x---   8 oracle dba      4096 Jan  4 00:32 racg
drwxr-x---  14 oracle dba      4096 Jan  5 23:34 rdbms
drwxr-x---   4 oracle dba      4096 Jan  5 23:33 relnotes
-rwxr-xr-x   1 oracle dba     13852 Jan  5 23:30 root.sh
-rwxr-xr-x   1 oracle dba         0 Jun  7  2005 root.sh.old
-rwxr-xr-x   1 oracle dba     12029 Jan  3 23:28 root.sh.old.1
-rwxr-xr-x   1 oracle dba     12079 Jan  3 23:54 root.sh.old.2
drwxr-x---   3 oracle dba      4096 Jan  3 23:24 slax
drwxr-x---   3 oracle dba      4096 Jan  3 23:24 sqlj
drwxr-x---   9 oracle dba      4096 Jan  3 23:26 sqlplus
drwxr-x---  12 oracle dba      4096 Jan  3 23:26 srvm
drwxr-x---  12 oracle dba      4096 Jan  3 23:26 sysman
drwxr-x---   4 oracle dba      4096 Jan  3 23:24 uix
drwxr-x---   3 oracle dba      4096 Jan  3 23:24 wwg
drwxr-x---   6 oracle dba      4096 Jan  5 23:31 xdk
[root@rac1 database]# chown oracle:dba p12419392_10205_LINUX.zip
[root@rac1 database]# chown oracle:dba p6880880_102000_LINUX.zip
[root@rac1 database]# ls -l| grep LINUX
-rwxr--r--   1 oracle dba  6301770 Mar 25 03:44 p12419392_10205_LINUX.zip
-rwxr--r--   1 oracle dba 27412455 Mar 25 03:44 p6880880_102000_LINUX.zip

二.升级opatch
节点一
[oracle@rac1 database]$ mv OPatch OPatch.bak
[oracle@rac1 database]$ unzip p6880880_102000_LINUX.zip
Archive:  p6880880_102000_LINUX.zip
   creating: OPatch/
   creating: OPatch/ocm/
extracting: OPatch/ocm/ocm.zip
   creating: OPatch/ocm/lib/
  inflating: OPatch/ocm/lib/osdt_jce.jar
  inflating: OPatch/ocm/lib/osdt_core3.jar
  inflating: OPatch/ocm/lib/emocmclnt-14.jar
  inflating: OPatch/ocm/lib/emocmutl.jar
   creating: OPatch/ocm/bin/
  inflating: OPatch/ocm/bin/emocmrsp
  inflating: OPatch/ocm/ocm_platforms.txt
   creating: OPatch/crs/
   creating: OPatch/crs/log/
  inflating: OPatch/crs/patch112.pl
  inflating: OPatch/crs/crsdelete.pm
  inflating: OPatch/crs/crspatch.pm
  inflating: OPatch/crs/s_crsconfig_defs
  inflating: OPatch/crs/crsconfig_lib.pm
  inflating: OPatch/crs/oracss.pm
  inflating: OPatch/crs/auto_patch.pl
  inflating: OPatch/crs/s_crsconfig_lib.pm
  inflating: OPatch/opatch
   creating: OPatch/opatchprereqs/
   creating: OPatch/opatchprereqs/opatch/
  inflating: OPatch/opatchprereqs/opatch/runtime_prereq.xml
  inflating: OPatch/opatchprereqs/opatch/opatch_prereq.xml
  inflating: OPatch/opatchprereqs/opatch/rulemap.xml
  inflating: OPatch/opatchprereqs/prerequisite.properties
   creating: OPatch/opatchprereqs/oui/
  inflating: OPatch/opatchprereqs/oui/knowledgesrc.xml
  inflating: OPatch/opatch.ini
  inflating: OPatch/emdpatch.pl
  inflating: OPatch/opatch.pl
   creating: OPatch/jlib/
  inflating: OPatch/jlib/opatchprereq.jar
  inflating: OPatch/jlib/opatchactions.jar
  inflating: OPatch/jlib/opatchutil.jar
  inflating: OPatch/jlib/opatchfmw.jar
  inflating: OPatch/jlib/opatchext.jar
  inflating: OPatch/jlib/opatch.jar
  inflating: OPatch/opatch.bat
   creating: OPatch/docs/
  inflating: OPatch/docs/Prereq_Users_Guide.txt
  inflating: OPatch/docs/FAQ
  inflating: OPatch/docs/Users_Guide.txt
  inflating: OPatch/README.txt


节点二
[oracle@rac2 database]$ mv OPatch OPatch.bak
[oracle@rac2 database]$ unzip p6880880_102000_LINUX.zip
Archive:  p6880880_102000_LINUX.zip
   creating: OPatch/
   creating: OPatch/ocm/
extracting: OPatch/ocm/ocm.zip
   creating: OPatch/ocm/lib/
  inflating: OPatch/ocm/lib/osdt_jce.jar
  inflating: OPatch/ocm/lib/osdt_core3.jar
  inflating: OPatch/ocm/lib/emocmclnt-14.jar
  inflating: OPatch/ocm/lib/emocmutl.jar
   creating: OPatch/ocm/bin/
  inflating: OPatch/ocm/bin/emocmrsp
  inflating: OPatch/ocm/ocm_platforms.txt
   creating: OPatch/crs/
   creating: OPatch/crs/log/
  inflating: OPatch/crs/patch112.pl
  inflating: OPatch/crs/crsdelete.pm
  inflating: OPatch/crs/crspatch.pm
  inflating: OPatch/crs/s_crsconfig_defs
  inflating: OPatch/crs/crsconfig_lib.pm
  inflating: OPatch/crs/oracss.pm
  inflating: OPatch/crs/auto_patch.pl
  inflating: OPatch/crs/s_crsconfig_lib.pm
  inflating: OPatch/opatch
   creating: OPatch/opatchprereqs/
   creating: OPatch/opatchprereqs/opatch/
  inflating: OPatch/opatchprereqs/opatch/runtime_prereq.xml
  inflating: OPatch/opatchprereqs/opatch/opatch_prereq.xml
  inflating: OPatch/opatchprereqs/opatch/rulemap.xml
  inflating: OPatch/opatchprereqs/prerequisite.properties
   creating: OPatch/opatchprereqs/oui/
  inflating: OPatch/opatchprereqs/oui/knowledgesrc.xml
  inflating: OPatch/opatch.ini
  inflating: OPatch/emdpatch.pl
  inflating: OPatch/opatch.pl
   creating: OPatch/jlib/
  inflating: OPatch/jlib/opatchprereq.jar
  inflating: OPatch/jlib/opatchactions.jar
  inflating: OPatch/jlib/opatchutil.jar
  inflating: OPatch/jlib/opatchfmw.jar
  inflating: OPatch/jlib/opatchext.jar
  inflating: OPatch/jlib/opatch.jar
  inflating: OPatch/opatch.bat
   creating: OPatch/docs/
  inflating: OPatch/docs/Prereq_Users_Guide.txt
  inflating: OPatch/docs/FAQ
  inflating: OPatch/docs/Users_Guide.txt
  inflating: OPatch/README.txt

添加path,并验证版本(一上做同样的操作)
[oracle@rac2 database]$ cd
[oracle@rac2 ~]$ vi .bash_profile
[oracle@rac2 ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATHHOME/bin
export ORACLE_BASE=/oracle
export CRS_HOME=/oracle/product/crs
export ORACLE_HOME=/oracle/product/database
export PATH=$CRS_HOME/binORACLE_HOME/binPATHORACLE_HOME/OPatch
export ORACLE_SID=orcl1
unset  USERNAME
[oracle@rac2 ~]$ source .bash_profile
[oracle@rac2 ~]$ opatch version
Invoking OPatch 10.2.0.5.1

OPatch Version: 10.2.0.5.1

OPatch succeeded.


[oracle@rac1 database]$ cd
[oracle@rac1 ~]$ vi .bash_profile
[oracle@rac1 ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATHHOME/bin
export ORACLE_BASE=/oracle
export CRS_HOME=/oracle/product/crs
export ORACLE_HOME=/oracle/product/database
export PATH=$CRS_HOME/binORACLE_HOME/binPATHORACLE_HOME/OPatch
export ORACLE_SID=orcl2
unset  USERNAME
[oracle@rac1 ~]$ source .bash_profile
[oracle@rac1 ~]$ opatch version
Invoking OPatch 10.2.0.5.1

OPatch Version: 10.2.0.5.1

OPatch succeeded.


三 解压 psu patch 压缩包

[oracle@rac1 database]$ unzip p12419392_10205_LINUX.zip
Archive:  p12419392_10205_LINUX.zip
   creating: 12419392/
  inflating: 12419392/README.html
   creating: 12419392/files/
   creating: 12419392/files/dv/
   creating: 12419392/files/dv/jlib/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/dva/
  inflating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/dva/BasePageHandler.class
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/dva/admin/
  inflating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/dva/admin/AdminPageHandler.class
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/dva/security/
  inflating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/dva/security/LoginPageHandler.class
   creating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/util/
  inflating: 12419392/files/dv/jlib/dva_webapp.ear/dva_webapp.war/WEB-INF/lib/dva_webapp.jar/oracle/security/datval/util/ViewUtil.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_delete.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_home/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_home/_about.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_report/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_report/_run__report.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_report/_report__parameter.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_command/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_command/_command.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_command/_command__detail.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_rule/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_rule/_ruleset__detail.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_rule/_rule.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_rule/_rules__add.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_rule/_ruleset.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_role/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_role/_role__detail.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_role/_role.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_factor/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_factor/_identity.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_factor/_policy.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_factor/_identity__map.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_factor/_policy__detail.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_factor/_factor__detail.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_factor/_factor.class
   creating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_realm/
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_realm/_realm__auth.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_realm/_realm__object.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_realm/_realm__detail.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_admin/_realm/_realm.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_errorPageInvalidRequest.class
  inflating: 12419392/files/dv/jlib/dva_webapp_jsp.jar/_errorPage.class
   creating: 12419392/files/dv/admin/
  inflating: 12419392/files/dv/admin/code.dlf
   creating: 12419392/files/psu/
   creating: 12419392/files/psu/10.2.0.5.4/
  inflating: 12419392/files/psu/10.2.0.5.4/catpsu.sql
  inflating: 12419392/files/psu/10.2.0.5.4/catpsu_rollback.sql
   creating: 12419392/files/sysman/
   creating: 12419392/files/sysman/jlib/
   creating: 12419392/files/sysman/jlib/emCORE.jar/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/mntr/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/mntr/metrics/
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/mntr/metrics/MetricDetailDataObject.class
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/mntr/metrics/MetricDetailUtil.class
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/mntr/vltn/
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/mntr/vltn/AlertDetailsDataObject.class
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/ecm/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/ecm/policy/  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/ecm/policy/PolicySQLList.class
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/admin/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/admin/rep/
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/admin/rep/UserData.class
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/admin/rep/AdminResourceBundleID.class
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/admin/rep/AdminResourceBundle.class
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/
  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/sec/
   creating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/sec/auth/  inflating: 12419392/files/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/sec/auth/EMLoginServlet.class
   creating: 12419392/files/sysman/jlib/emjsp.jar/
   creating: 12419392/files/sysman/jlib/emjsp.jar/_database/
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_confirmationWithOptions.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_confirmationDelete$__jsp_StaticText.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_dbObjectsList$__jsp_StaticText.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_confirmationWithOptions$__jsp_StaticText.class
   creating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/
   creating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_plsqlobject/
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_plsqlobject/_createPLSqlObjectPage.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_plsqlobject/_createPLSqlObjectPage$__jsp_StaticText.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_plsqlobject/_editPLSqlObjectPage.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_plsqlobject/_editPLSqlObjectPage$__jsp_StaticText.class
   creating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_trigger/
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_trigger/_triggerEventPage.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_trigger/_triggerGeneralPage.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_trigger/_triggerGeneralPage$__jsp_StaticText.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_trigger/_triggerAdvancedPage$__jsp_StaticText.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_trigger/_triggerAdvancedPage.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_schema/_trigger/_triggerEventPage$__jsp_StaticText.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_confirmationDelete.class
  inflating: 12419392/files/sysman/jlib/emjsp.jar/_database/_dbObjectsList.class
   creating: 12419392/files/sysman/jlib/emDB.jar/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/DBObject.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/DBObjectsDataSource.class
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/srctype/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/srctype/trigger/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/srctype/trigger/TriggerAttributes.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/srctype/trigger/Trigger.class
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/srctype/plsqlobject/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/srctype/plsqlobject/PLSqlObjectAttributes.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/emo/adm/schema/srctype/plsqlobject/PLSqlObject.class
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/stg/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/stg/RbsegmentController.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/stg/TablespaceController.class
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/schm/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/schm/TriggerController.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/schm/SchemaObjectController.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/schm/PLSqlObjectController.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/DatabaseObjectsSearchController$DBObjectSearchCriteria.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/DatabaseObjectsSearchController.class
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/sec/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/sec/DirObjectController.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/sec/UserController.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/adm/DBController.class
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/rsc/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/rsc/DBObjectMsgID.class
   creating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/rsc/schm/
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/rsc/schm/SchemaMsgID.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/rsc/schm/SchemaMsg.class
  inflating: 12419392/files/sysman/jlib/emDB.jar/oracle/sysman/db/rsc/DBObjectMsg.class
   creating: 12419392/files/sysman/admin/
   creating: 12419392/files/sysman/admin/emdrep/
   creating: 12419392/files/sysman/admin/emdrep/sql/
   creating: 12419392/files/sysman/admin/emdrep/sql/core/
   creating: 12419392/files/sysman/admin/emdrep/sql/core/latest/
   creating: 12419392/files/sysman/admin/emdrep/sql/core/latest/sdk/
  inflating: 12419392/files/sysman/admin/emdrep/sql/core/latest/sdk/sdk_views.sql
   creating: 12419392/files/sysman/admin/emdrep/sql/core/latest/ecm/
  inflating: 12419392/files/sysman/admin/emdrep/sql/core/latest/ecm/ecm_util_pkgbody.sql
  inflating: 12419392/files/sysman/admin/emdrep/sql/core/latest/ecm/ecm_views.sql
  inflating: 12419392/files/sysman/admin/emdrep/sql/core/latest/ecm/ecm_util_pkgdef.sql
   creating: 12419392/files/oc4j/
   creating: 12419392/files/oc4j/j2ee/
   creating: 12419392/files/oc4j/j2ee/oc4j_applications/
   creating: 12419392/files/oc4j/j2ee/oc4j_applications/applications/
   creating: 12419392/files/oc4j/j2ee/oc4j_applications/applications/em/
   creating: 12419392/files/oc4j/j2ee/oc4j_applications/applications/em/em/
   creating: 12419392/files/oc4j/j2ee/oc4j_applications/applications/em/em/admin/
   creating: 12419392/files/oc4j/j2ee/oc4j_applications/applications/em/em/admin/rep/
  inflating: 12419392/files/oc4j/j2ee/oc4j_applications/applications/em/em/admin/rep/editUserSummary.uix
   creating: 12419392/files/cpu/
   creating: 12419392/files/cpu/scripts/
  inflating: 12419392/files/cpu/scripts/bug9687193.sql
  inflating: 12419392/files/cpu/scripts/bug11057369.sql
  inflating: 12419392/files/cpu/scripts/emdb_recomp_invalids.sql
   creating: 12419392/files/rdbms/
   creating: 12419392/files/rdbms/mesg/
  inflating: 12419392/files/rdbms/mesg/oraus.msb
  inflating: 12419392/files/rdbms/mesg/oraus.msg
   creating: 12419392/files/rdbms/admin/
  inflating: 12419392/files/rdbms/admin/catmacd.sql
  inflating: 12419392/files/rdbms/admin/prvtjob.plb
  inflating: 12419392/files/rdbms/admin/bundledata_PSU.xml
  inflating: 12419392/files/rdbms/admin/prvtmacp.plb
  inflating: 12419392/files/rdbms/admin/catmacpatch.sql
   creating: 12419392/files/rdbms/lib/
  inflating: 12419392/files/rdbms/lib/kkxwtp.o
   creating: 12419392/files/lib/
   creating: 12419392/files/lib/libgeneric10.a/
  inflating: 12419392/files/lib/libgeneric10.a/qcs2.o
  inflating: 12419392/files/lib/libgeneric10.a/kgh.o
  inflating: 12419392/files/lib/libgeneric10.a/qcop.o
  inflating: 12419392/files/lib/libgeneric10.a/kgl.o
  inflating: 12419392/files/lib/libgeneric10.a/kgl2.o
  inflating: 12419392/files/lib/libnnz10.so
   creating: 12419392/files/lib/libxml10.a/
  inflating: 12419392/files/lib/libxml10.a/lpxpar.o
   creating: 12419392/files/lib/libnnz10.a/
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_ssl2_write_client_certificate_handler.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_process_client_hello_shared.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_createglobalcontext.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_modifyrenegotiationoptions.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_is_client_cert_requested.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_write.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_getnextevent.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_ssl3_writefinished_handler.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_processserverhello.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_process_client_hello.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_read.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_setclientcertrequested_handler.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_getversion.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_ssl3_tls1_writeserverhello_handler.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_process_hello_shared.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_processcertificaterequest_handler.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_ssl3_process_finished.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_handshakeproceed.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_enableclientauthentication.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_getrenegotiationoptions.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_getconnectionrenegotiationoptions.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_refuserenegotiation.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_tls1_writefinished_handler.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_dooptionsallowrenegotoation.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_tls1_process_finished.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_decoderecord.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_requestrenegotiation.o
  inflating: 12419392/files/lib/libnnz10.a/nzu.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_disableclientauthentication.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_modifyciphersuites.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_writeclienthello.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_modifyclientauthmodes.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_calc_enabled_cipher_suites.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_setupconnectioncontext.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_onerror.o
  inflating: 12419392/files/lib/libnnz10.a/nzos.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_read.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_createconnectioncontext.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_destroyconnectioncontext.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_write_certificate_request_handler.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_setrenegotiationoptions.o
  inflating: 12419392/files/lib/libnnz10.a/ssl_hshk_priv_ssl2_processclienthelloshared.o
   creating: 12419392/files/lib/libpls10.a/
  inflating: 12419392/files/lib/libpls10.a/pei.o
  inflating: 12419392/files/lib/libpls10.a/pef.o
  inflating: 12419392/files/lib/libpls10.a/pgmc.o
  inflating: 12419392/files/lib/libpls10.a/pdx2.o
   creating: 12419392/files/lib/libn10.a/
  inflating: 12419392/files/lib/libn10.a/nzdacval.o
   creating: 12419392/files/lib/libserver10.a/
  inflating: 12419392/files/lib/libserver10.a/kla.o
  inflating: 12419392/files/lib/libserver10.a/kdiss.o
  inflating: 12419392/files/lib/libserver10.a/qerbo.o
  inflating: 12419392/files/lib/libserver10.a/kkxs.o
  inflating: 12419392/files/lib/libserver10.a/kzu.o
  inflating: 12419392/files/lib/libserver10.a/kteop.o
  inflating: 12419392/files/lib/libserver10.a/qeroc.o
  inflating: 12419392/files/lib/libserver10.a/upsexe.o
  inflating: 12419392/files/lib/libserver10.a/ktec.o
  inflating: 12419392/files/lib/libserver10.a/kcbl.o
  inflating: 12419392/files/lib/libserver10.a/ktein.o
  inflating: 12419392/files/lib/libserver10.a/qmix.o
  inflating: 12419392/files/lib/libserver10.a/kcrr.o
  inflating: 12419392/files/lib/libserver10.a/ksu.o
  inflating: 12419392/files/lib/libserver10.a/kzvutil.o
  inflating: 12419392/files/lib/libserver10.a/kxtt.o
  inflating: 12419392/files/lib/libserver10.a/kkxm.o
  inflating: 12419392/files/lib/libserver10.a/kkzu.o
  inflating: 12419392/files/lib/libserver10.a/qerup.o
  inflating: 12419392/files/lib/libserver10.a/koklv.o
  inflating: 12419392/files/lib/libserver10.a/kdx.o
  inflating: 12419392/files/lib/libserver10.a/kffm.o
  inflating: 12419392/files/lib/libserver10.a/kkxl.o
  inflating: 12419392/files/lib/libserver10.a/kql.o
  inflating: 12419392/files/lib/libserver10.a/kzvdve.o
  inflating: 12419392/files/lib/libserver10.a/psdpgi.o
  inflating: 12419392/files/lib/libserver10.a/kdb.o
  inflating: 12419392/files/lib/libserver10.a/kokt.o
  inflating: 12419392/files/lib/libserver10.a/qerix.o
  inflating: 12419392/files/lib/libserver10.a/kdi.o
  inflating: 12419392/files/lib/libserver10.a/qkexr.o
  inflating: 12419392/files/lib/libserver10.a/kpolon.o
  inflating: 12419392/files/lib/libserver10.a/delexe.o
  inflating: 12419392/files/lib/libserver10.a/qergs.o
  inflating: 12419392/files/lib/libserver10.a/knld.o
  inflating: 12419392/files/lib/libserver10.a/qecsel.o
  inflating: 12419392/files/lib/libserver10.a/qmxtk.o
  inflating: 12419392/files/lib/libserver10.a/kjr.o
  inflating: 12419392/files/lib/libserver10.a/ktsx.o
  inflating: 12419392/files/lib/libserver10.a/qertb.o
  inflating: 12419392/files/lib/libserver10.a/kkfd.o
  inflating: 12419392/files/lib/libserver10.a/qerdl.o
  inflating: 12419392/files/lib/libserver10.a/qksht.o
  inflating: 12419392/files/lib/libserver10.a/kdt.o
  inflating: 12419392/files/lib/libserver10.a/qergh.o
  inflating: 12419392/files/lib/libserver10.a/kkpod.o
  inflating: 12419392/files/lib/libserver10.a/kkm.o
  inflating: 12419392/files/lib/libserver10.a/dmsvma.o
  inflating: 12419392/files/lib/libserver10.a/qks3t.o
  inflating: 12419392/files/lib/libserver10.a/ksfd.o
  inflating: 12419392/files/lib/libserver10.a/kokl.o
  inflating: 12419392/files/lib/libserver10.a/xty.o
  inflating: 12419392/files/lib/libserver10.a/qxim.o
  inflating: 12419392/files/lib/libserver10.a/kds.o
  inflating: 12419392/files/lib/libserver10.a/tbsdrv.o
  inflating: 12419392/files/lib/libserver10.a/ktr.o
  inflating: 12419392/files/lib/libserver10.a/ktb.o
  inflating: 12419392/files/lib/libserver10.a/updexe.o
  inflating: 12419392/files/lib/libserver10.a/qeroi.o
  inflating: 12419392/files/lib/libserver10.a/ktsp.o
   creating: 12419392/files/lib/libcommon10.a/
  inflating: 12419392/files/lib/libcommon10.a/ttcx2y.o
extracting: 12419392/README.txt
  inflating: 12419392/patchmd.xml
   creating: 12419392/etc/
   creating: 12419392/etc/config/
  inflating: 12419392/etc/config/actions
  inflating: 12419392/etc/config/inventory
   creating: 12419392/etc/xml/
  inflating: 12419392/etc/xml/ShiphomeDirectoryStructure.xml
  inflating: 12419392/etc/xml/GenericActions.xml
   creating: 12419392/custom/
   creating: 12419392/custom/scripts/
  inflating: 12419392/custom/scripts/pre


四 关闭实例及ASM
[oracle@rac1 database]$ srvctl stop database -d orcl -o immediate
[oracle@rac1 database]$ srvctl stop asm -n rac1
[oracle@rac1 database]$ srvctl stop asm -n rac2
[oracle@rac1 database]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.orcl.db    application    OFFLINE   OFFLINE
ora....l1.inst application    OFFLINE   OFFLINE
ora....l2.inst application    OFFLINE   OFFLINE
ora....SM2.asm application    OFFLINE   OFFLINE
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....SM1.asm application    OFFLINE   OFFLINE
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2

五 One-off Patch Conflict Detection and Resolution(Patch 冲突检测)


[oracle@rac1 database]$ pwd
/oracle/product/database
[oracle@rac1 database]$ cd 12419392/
[oracle@rac1 12419392]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./12419392
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

The argument "./12419392" does not exists.

PREREQ session
Argument(s) Error... Patch base location is not valid.

Please check the arguments and try again.

OPatch failed with error code 135
[oracle@rac1 12419392]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ../12419392
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oracle/product/database
Central Inventory : /oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /oracle/product/database/oui
Log file location : /oracle/product/database/cfgtoollogs/opatch/opatch2012-03-25_04-13-45AM.log

Patch history file: /oracle/product/database/cfgtoollogs/opatch/opatch_history.txt

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


六 安装Patch
[oracle@rac1 12419392]$ pwd
/oracle/product/database/12419392
[oracle@rac1 12419392]$ opatch apply
[oracle@rac1 12419392]$ opatch apply
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/product/database
Central Inventory : /oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.5.1
OUI version       : 10.2.0.5.0
OUI location      : /oracle/product/database/oui
Log file location : /oracle/product/database/cfgtoollogs/opatch/opatch2012-03-25_04-16-12AM.log

Patch history file: /oracle/product/database/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '12419392' to OH '/oracle/product/database'

Running prerequisite checks...
Patch 12419392: Optional component(s) missing : [ oracle.rdbms.dv, 10.2.0.5.0 ] , [ oracle.rdbms.dv.oc4j, 10.2.0.5.0 ]
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]:
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

OPatch detected the node list and the local node from the inventory.  OPatch will patch the local system then propagate the patch to the remote nodes.


This node is part of an Oracle Real Application Cluster.
Remote nodes: 'rac2'
Local node: 'rac1'
elease shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/product/database')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '12419392' for restore. This might take a while...
Backing up files affected by the patch '12419392' for rollback. This might take a while...
Execution of 'sh /oracle/product/database/12419392/custom/scripts/pre -apply 12419392 ':


Return Code = 0

Patching component oracle.rdbms, 10.2.0.5.0...
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kcbl.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/qecsel.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/ksfd.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/qkexr.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/xty.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/qergh.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/qergs.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/ktsx.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kdt.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kkpod.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kdiss.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/qerix.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/knld.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/ktein.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kkzu.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/tbsdrv.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/ktec.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kteop.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/ktsp.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/qerbo.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kkxl.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kkm.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kxtt.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/qks3t.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kql.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kdi.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/upsexe.o"
Updating archive file "/oracle/product/database/lib/libserver10.a"  with "lib/libserver10.a/kffm.o"
"/sysman/jlib/emjsp.jar/_database/_confirmationDelete.class"
Updating jar file "/oracle/product/database/sysman/jlib/emjsp.jar" with "/sysman/jlib/emjsp.jar/_database/_confirmationWithOptions$__jsp_StaticText.class"
Updating jar file "/oracle/product/database/sysman/jlib/emjsp.jar" with "/sysman/jlib/emjsp.jar/_database/_confirmationWithOptions.class"
Updating jar file "/oracle/product/database/sysman/jlib/emjsp.jar" with "/sysman/jlib/emjsp.jar/_database/_dbObjectsList$__jsp_StaticText.class"
Updating jar file "/oracle/product/database/sysman/jlib/emjsp.jar" with "/sysman/jlib/emjsp.jar/_database/_dbObjectsList.class"
Copying file to "/oracle/product/database/oc4j/j2ee/oc4j_applications/applications/em/em/admin/rep/editUserSummary.uix"

Patching component oracle.xdk.rsf, 10.2.0.5.0...
Updating archive file "/oracle/product/database/lib/libxml10.a"  with "lib/libxml10.a/lpxpar.o"

Patching component oracle.precomp.common, 10.2.0.5.0...

Patching component oracle.rdbms.rman, 10.2.0.5.0...
Running make for target client_sharedlib
Running make for target ioracle
Running make for target iwrap
Running make for target client_sharedlib
Running make for target proc
Running make for target irman
ApplySession adding interim patch '12419392' to inventory

Verifying the update...
Inventory check OK: Patch ID 12419392 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 12419392 are present in Oracle Home.

The local system has been patched.  You can restart Oracle instances on it.


Patching in rolling mode.


The node 'rac2' will be patched next.


Please shutdown Oracle instances running out of this ORACLE_HOME on 'rac2'.
(Oracle Home = '/oracle/product/database')

Is the node ready for patching? [y|n]
y
User Responded with: Y
Updating nodes 'rac2'
   Apply-related files are:
     FP = "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/copy_files.txt"
     DP = "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/copy_dirs.txt"
     MP = "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/make_cmds.txt"
     RC = "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/remote_cmds.txt"

Instantiating the file "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...
Instantiating the file "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/copy_dirs.txt" with actual path.
Propagating directories to remote nodes...
Instantiating the file "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/make_cmds.txt.instantiated" by replacing $ORACLE_HOME in "/oracle/product/database/.patch_storage/12419392_May_25_2011_01_06_08/rac/make_cmds.txt" with actual path.
Running command on remote node 'rac2':
cd /oracle/product/database/rdbms/lib; /usr/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/oracle/product/database || echo REMOTE_MAKE_FAILED::>&2

Running command on remote node 'rac2':
cd /oracle/product/database/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/product/database || echo REMOTE_MAKE_FAILED::>&2

Running command on remote node 'rac2':
cd /oracle/product/database/plsql/lib; /usr/bin/make -f ins_plsql.mk iwrap ORACLE_HOME=/oracle/product/database || echo REMOTE_MAKE_FAILED::>&2

Running command on remote node 'rac2':
cd /oracle/product/database/network/lib; /usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/oracle/product/database || echo REMOTE_MAKE_FAILED::>&2

Running command on remote node 'rac2':
cd /oracle/product/database/precomp/lib; /usr/bin/make -f ins_precomp.mk proc ORACLE_HOME=/oracle/product/database || echo REMOTE_MAKE_FAILED::>&2

Running command on remote node 'rac2':
cd /oracle/product/database/rdbms/lib; /usr/bin/make -f ins_rdbms.mk irman ORACLE_HOME=/oracle/product/database || echo REMOTE_MAKE_FAILED::>&2


The node 'rac2' has been patched.  You can restart Oracle instances on it.

There were relinks on remote nodes.  Remember to check the binary size and timestamp on the nodes 'rac2' .The following make commands were invoked on remote nodes:
'cd /oracle/product/database/rdbms/lib; /usr/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/oracle/product/databasecd /oracle/product/database/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/oracle/product/databasecd /oracle/product/database/plsql/lib; /usr/bin/make -f ins_plsql.mk iwrap ORACLE_HOME=/oracle/product/databasecd /oracle/product/database/network/lib; /usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/oracle/product/database
cd /oracle/product/database/precomp/lib; /usr/bin/make -f ins_precomp.mk proc ORACLE_HOME=/oracle/product/databasecd /oracle/product/database/rdbms/lib; /usr/bin/make -f ins_rdbms.mk irman ORACLE_HOME=/oracle/product/database'


OPatch succeeded.
[oracle@rac1 12419392]$


整个打补丁的过程,Oracle会询问是否需要在其他节点打,直到所有节点都打上补丁。注意,要用到这一特性,需要配置ssh互信。

七 最后启动asm和数据库实例

[oracle@rac1 12419392]$ srvctl start asm -n rac1
[oracle@rac1 12419392]$ srvctl start asm -n rac2
[oracle@rac1 12419392]$ srvctl start database -d orcl
[oracle@rac1 12419392]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.orcl.db    application    ONLINE    ONLINE    rac1
ora....l1.inst application    ONLINE    ONLINE    rac2
ora....l2.inst application    ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....SM1.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2
[oracle@rac1 12419392]$
最后按照文档说明,在其中的一个节点上执行以下的2个脚本就行了:
SQL>@$ORACLE_HOME/rdbms/admin/catbundle.sql psu apply
....
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
...
...
Session altered.
Updating registry...
1 row created.
Commit complete.
Check the following log file for errors:
/oracle/product/10.2.0/db_1/cfgtoollogs/catbundle/catbundle_PSU_YESMYNET_APPLY_2011Dec16_22_06_17.log
SQL>@$ORACLE_HOME/rdbms/admin/utlrp.sql
....
....
中间省略n多字...
DOC>#
ERRORS DURING RECOMPILATION
---------------------------
                          2
ORDIM INVALID OBJECTS: ORDX_HTTP_SOURCE - 2 - 11
ORDIM INVALID OBJECTS: ORDX_FILE_SOURCE - 2 - 11
PL/SQL procedure successfully completed.
到这里,已经表示补丁打成功了!!!
查询相关升级后的版本信息:
操作系统层面也可以,具体如下:
[oracle@rac1 ~]$./$RACLE_HOME/OPatch/opatch lsinv -bugs_fixed|grep PSU
9952230    12419392  Fri Dec 16 21:22:41 CST 2011   DATABASE PSU 10.2.0.5.1 (INCLUDES CPUOCT2010)
10248542   12419392  Fri Dec 16 21:22:41 CST 2011   DATABASE PSU 10.2.0.5.2 (INCLUDES CPUJAN2011)
11724962   12419392  Fri Dec 16 21:22:41 CST 2011   DATABASE PSU 10.2.0.5.3 (INCLUDES CPUAPR2011)
12419392   12419392  Fri Dec 16 21:22:41 CST 2011   DATABASE PSU 10.2.0.5.4 (INCLUDES CPUJUL2011)
上面的显示表示PSU版本已经是10.2.0.5.4了!
数据库里也可以查询到具体信息,(v$version里面不会显示这个小版本号的)具体如下:
select * from registry$history;



如果严格使用rolling patch的方式的话,则步骤是:
1. 在第一个节点停止ASM和Oracle instance(ASM和Oracle共用一个ORACLE_HOME)

srvctl stop instance -d dwrac -i dwrac1
srvctl stop asm -n dwdb01

2. 在第一个节点打补丁

opatch apply
打完第一个补丁后,Oracle会询问下一个需要打patch是那个。

3. 另开窗口,启动第一个节点的资源,并关闭下一个需要打patch的资源

srvctl start instance -d dwrac -i dwrac1
srvctl start asm -n dwdb01
srvctl stop instance -d dwrac -i dwrac2
srvctl stop asm -n dwdb02

4. 依此类推,直到所有节点打完patch为止



第二大部分      oem 重建

[oracle@rac2 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Mar 25 04:44:55 2012

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

SQL> connect system/oracle
Connected.
SQL> connect sys/oracle as sysdba
Connected.
SQL> alter user sysman identified by oracle account unlock;

User altered.

SQL> alter user dbsnmp identified by oracle account unlock;

User altered.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$


[oracle@rac1 ~]$ emca -deconfig dbcontrol db -repos drop -cluster

STARTED EMCA at Mar 25, 2012 4:51:15 AM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Listener port number: 1521
Password for SYS user:
Password for SYS user: oracle

----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: y
Mar 25, 2012 4:51:32 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/product/database/cfgtoollogs/emca/orcl/emca_2012-03-25_04-51-15-AM.log.
Mar 25, 2012 4:51:39 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 25, 2012 4:52:06 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Mar 25, 2012 4:52:06 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Mar 25, 2012 4:55:33 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 25, 2012 4:55:37 AM
[oracle@rac1 ~]$ emca -config dbcontrol db -repos create -cluster

STARTED EMCA at Mar 25, 2012 4:56:01 AM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Listener port number: 1521
Cluster name: orcl
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user: Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /oracle/product/database ]:
ASM port [ 1521 ]:
ASM user role [ SYSDBA ]:
ASM username [ SYS ]:
ASM user password:
ASM user password: -----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /oracle/product/database

Database instance hostname ................ rac1.abc.com
Listener port number ................ 1521
Cluster name ................ orcl
Database unique name ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /oracle/product/database
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ SYS

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 25, 2012 4:56:50 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/product/database/cfgtoollogs/emca/orcl/emca_2012-03-25_04-56-01-AM.log.
Mar 25, 2012 4:56:53 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 25, 2012 5:03:12 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Mar 25, 2012 5:03:23 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/product/database/oc4j/j2ee/OC4J_DBConsole_rac2_orcl1 to remote nodes ...
Mar 25, 2012 5:03:25 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/product/database/oc4j/j2ee/OC4J_DBConsole_rac1_orcl2 to remote nodes ...
Mar 25, 2012 5:03:34 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/product/database/rac2_orcl1 to remote nodes ...
Mar 25, 2012 5:03:37 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/product/database/rac1_orcl2 to remote nodes ...
Mar 25, 2012 5:03:38 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Mar 25, 2012 5:04:28 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 25, 2012 5:06:33 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 25, 2012 5:06:34 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://rac1.abc.com:5500/em <<<<<<<<<<<
Mar 25, 2012 5:06:44 AM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
****************  Current Configuration  ****************
INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

orcl1             rac2              rac1.abc.com
orcl2             rac1              rac1.abc.com


Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 25, 2012 5:06:44 AM
[oracle@rac1 ~]$

标签: 暂无标签
dongxujian

写了 86 篇文章,拥有财富 384,被 13 人关注

转播转播 分享分享 分享淘帖
回复

使用道具

成为第一个吐槽的人

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈