给oracle 打patch

来源:互联网 发布:橱柜 设计软件 编辑:程序博客网 时间:2024/04/29 01:45
 

今天练习在oracle 上打patch

Step1:
  unpress the patch
 
[oracle@aoracle patch]$ ls -l
total 1136
-rw-r--r-- 1 oracle oinstall 1157120 Sep 28 16:33 p4871035_10201_LINUX.zip
[oracle@aoracle patch]$ unzip *
Archive:  p4871035_10201_LINUX.zip
   creating: 4871035/
   creating: 4871035/files/
   creating: 4871035/files/lib/
   creating: 4871035/files/lib/libserver10.a/
  inflating: 4871035/files/lib/libserver10.a/qkadrv.o 
   creating: 4871035/files/rdbms/
   creating: 4871035/files/rdbms/mesg/
  inflating: 4871035/files/rdbms/mesg/oraus.msg 
  inflating: 4871035/files/rdbms/mesg/oraus.msb 
   creating: 4871035/etc/
   creating: 4871035/etc/config/
  inflating: 4871035/etc/config/inventory 
  inflating: 4871035/etc/config/actions 
   creating: 4871035/etc/xml/
  inflating: 4871035/etc/xml/GenericActions.xml 
  inflating: 4871035/etc/xml/ShiphomeDirectoryStructure.xml 
  inflating: 4871035/README.txt     
[oracle@aoracle patch]$ ls -lrt
total 1140
drwxr-xr-x 4 oracle oinstall    4096 Feb  8  2006 4871035
-rw-r--r-- 1 oracle oinstall 1157120 Sep 28 16:33 p4871035_10201_LINUX.zip
[oracle@aoracle patch]$
[oracle@aoracle patch]$ cd 4871035/
[oracle@aoracle 4871035]$ ls
etc  files  README.txt
[oracle@aoracle 4871035]$ ls -lrt
total 16
-rw-r--r-- 1 oracle oinstall 4917 Feb  8  2006 README.txt
drwxr-xr-x 4 oracle oinstall 4096 Feb  8  2006 files
drwxr-xr-x 4 oracle oinstall 4096 Feb  8  2006 etc

Step2:
  Try to configure the patch
 
[oracle@aoracle 4871035]$ more README.txt
#
#  WARNING: Failure to carefully read and understand these requirements may
#  result in your applying a patch that can cause  your Oracle Server to
#  malfunction, including interruption of service and/or loss of data.
#
#  If you do not meet all of the following requirements, please log an
#  iTAR, so that an Oracle Support Analyst may review your situation. The
#  Oracle analyst will help you determine if this patch is suitable for you
#  to apply to your system. We recommend that you avoid applying any
#  temporary patch unless directed by an Oracle Support Analyst who has
#  reviewed your system and determined that it is applicable.
#
#  Requirements:
#
#    - You must have located this patch via a Bug Database entry
#      and have the exact symptoms described in the bug entry.
#
#    - Your system configuration (Oracle Server version and patch
#      level, OS Version) must exactly match those in the bug
#      database entry - You must have NO OTHER PATCHES installed on
#      your Oracle Server since the latest patch set (or base release
#      x.y.z if you have no patch sets installed).
#
#    - [Oracle 9.2.0.2 & above] You must have Perl 5.00503 (or later)
#      installed under the ORACLE_HOME, or elsewhere within the host
#      environment. OPatch is no longer included in patches as of 9.2.0.2.
#      Refer to the following link for details on Perl and OPatch:
#      http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1894
89.1
#
#    - [IBM AIX O/S & Java patches for Oracle 9.2]
#      In order to apply java class updates to IBM AIX based systems using
#      java_131, you must update your java if you are running a version prior
#      to Service Refresh build date 20030630a. This is
#      necessary to fix IBM Defect#60472.
#
#      To identify which java build date you are on, enter the following
#      command ;
#
#      > $ORACLE_HOME/jdk/bin/java -fullversion
#      ... example response ...
#      java full version "J2RE 1.3.1 IBM AIX build ca131-20030630a"
#
#      The string ends in the date format YYYYMMDD or YYYYMMDDa where 'a'
#      indicates an updated release to the original build. You should always
#      apply the latest AIX Java SDK 1.3.1  Service Update available from IBM.
#      As a minimum, the above service refresh can be found under
#      APAR IY47055. The signature for the updated JVM is ca131-20030630a.
#      Information on the latest available fixes, as well as how to apply
#      the APARs to your AIX systems, is available at the IBM Java site.
#
#      If you are running AIX 5L, you can safely ignore any comment against
#      the APAR that says (AIXV43 only). The APAR is applicable to
#      both AIX 4.3 and AIX 5L.
#
#      Once you have updated your java installation you need to copy these
#      updated files to Oracle's copies in $ORACLE_HOME/jdk.
#      As the Oracle owner, simply issue the following commands;
#
#      > cd /usr/java131
#      > cp -fpR * $ORACLE_HOME/jdk
#
#
#  If you do NOT meet these requirements, or are not certain that you meet
#  these requirements, please log an iTAR requesting assistance with this
#  patch and Support will make a determination about whether you should
#  apply this patch.
#
#-------------------------------------------------------------------------
#  Interim Patch for Base Bugs: 4871035
#-------------------------------------------------------------------------
#
#  DATE:  Tue Feb  7 12:30:01 2006
#  -------------------------------
#  Platform Patch for : Linux x86
#  Product Version #  : 10.2.0.1
#  Product Patched    : RDBMS
#
#  Bugs Fixed by this patch:
#  -------------------------
#  4871035:BY DEFAULT DISABLE ROW SHIPPING FROM 10.2.0.2 ON
#
#  Patch Installation Instructions:
#  --------------------------------
#  To apply the patch, unzip the PSE container file:
#
#  p4871035_10201_LINUX.zip
#
#  Set your current directory to the directory where the patch
#  is located:
#
#    % cd 4871035
#
#  Ensure that the directory containing the opatch script appears in
#  your $PATH; then enter the following command:
#
#    % opatch apply
#
#  Patch Special Instructions:
#  ---------------------------
#  Make sure all instances running under the ORACLE_HOME being patched
#  are cleanly shutdown before installing this patch. Also ensure that
#  the tool used to terminate the instance(s) has exited cleanly.
#
#  If the Oracle inventory is not setup correctly this utility will
#  fail. To check accessibility to the inventory you can use the
#  command
#
#    % opatch lsinventory
#
#  If you have any problems installing this PSE or are not sure
#  about inventory setup please call Oracle support.
#
#  Patch Deinstallation Instructions:
#  ----------------------------------
#  Use the following command:
#
#    % cd 4871035
#    % opatch rollback -id 4871035  (这个回退patch)
#

[oracle@aoracle 4871035]$
[oracle@aoracle 4871035]$ pwd
/u02/ezhou/patch/4871035
[oracle@aoracle 4871035]$ ls -lrt /u01/pp/oracle/product/10.2/db_1/OPatch/opatch
-rwxr-xr-x 1 oracle oinstall 5672 Jun  1  2005 /u01/pp/oracle/product/10.2/db_1/OPatch/opatch
[oracle@aoracle 4871035]$ /u01/pp/oracle/product/10.2/db_1/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..


Oracle Home       : /u01/pp/oracle/product/10.2/db_1
Central Inventory : /u01/pp/oracle/oraInventory
   from           : /u01/pp/oracle/product/10.2/db_1/oraInst.loc
OPatch version    : 10.2.0.1.0
OUI version       : 10.2.0.1.0
OUI location      : /u01/pp/oracle/product/10.2/db_1/oui
Log file location : /u01/pp/oracle/product/10.2/db_1/cfgtoollogs/opatch/opatch-2011_Sep_28_16-51-21-CST_Wed.log

Lsinventory Output file location : /u01/pp/oracle/product/10.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2011_Sep_28_16-51-21-CST_Wed.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 10g                                                  10.2.0.1.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.

--------------------------------------------------------------------------------

OPatch succeeded.
[oracle@aoracle 4871035]$ pwd
/u02/ezhou/patch/4871035
[oracle@aoracle 4871035]$ /u01/pp/oracle/product/10.2/db_1/OPatch/opatch apply
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..


Oracle Home       : /u01/pp/oracle/product/10.2/db_1
Central Inventory : /u01/pp/oracle/oraInventory
   from           : /u01/pp/oracle/product/10.2/db_1/oraInst.loc
OPatch version    : 10.2.0.1.0
OUI version       : 10.2.0.1.0
OUI location      : /u01/pp/oracle/product/10.2/db_1/oui
Log file location : /u01/pp/oracle/product/10.2/db_1/cfgtoollogs/opatch/opatch-2011_Sep_28_16-52-47-CST_Wed.log

ApplySession applying interim patch '4871035' to OH '/u01/pp/oracle/product/10.2/db_1'
Invoking fuser to check for active processes.
Invoking fuser on "/u01/pp/oracle/product/10.2/db_1/bin/oracle"
OPatch finds following executables active:
/u01/pp/oracle/product/10.2/db_1/bin/oracle
Before you proceed, stop all active processes.  Press <Enter> when ready.
Do you want to proceed? [y|n]
y
User Responded with: Y

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/pp/oracle/product/10.2/db_1')

Is the local system ready for patching?

Do you want to proceed? [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 '4871035' for restore. This might take a while...
Backing up files affected by the patch '4871035' for rollback. This might take a while...

Patching component oracle.rdbms, 10.2.0.1.0...
Updating archive file "/u01/pp/oracle/product/10.2/db_1/lib/libserver10.a"  with "lib/libserver10.a/qkadrv.o"
Copying file to "/u01/pp/oracle/product/10.2/db_1/rdbms/mesg/oraus.msg"
Copying file to "/u01/pp/oracle/product/10.2/db_1/rdbms/mesg/oraus.msb"
Running make for target ioracle
ApplySession adding interim patch '4871035' to inventory

The local system has been patched and can be restarted.


OPatch succeeded.
[oracle@aoracle 4871035]$ /u01/pp/oracle/product/10.2/db_1/OPatch/opatch lsinventory  (显示一下 原有的patch)
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..


Oracle Home       : /u01/pp/oracle/product/10.2/db_1
Central Inventory : /u01/pp/oracle/oraInventory
   from           : /u01/pp/oracle/product/10.2/db_1/oraInst.loc
OPatch version    : 10.2.0.1.0
OUI version       : 10.2.0.1.0
OUI location      : /u01/pp/oracle/product/10.2/db_1/oui
Log file location : /u01/pp/oracle/product/10.2/db_1/cfgtoollogs/opatch/opatch-2011_Sep_28_17-00-22-CST_Wed.log

Lsinventory Output file location : /u01/pp/oracle/product/10.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2011_Sep_28_17-00-22-CST_Wed.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 10g                                                  10.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  4871035      : applied on Wed Sep 28 16:56:07 CST 2011
   Created on 7 Feb 2006, 12:31:07 hrs PST8PDT
   Bugs fixed:
     4871035


--------------------------------------------------------------------------------

OPatch succeeded.
[oracle@aoracle 4871035]$

原创粉丝点击