从patch中的readme来。 bug:10214450

 
 
测试数据:
 
SQL> create table t (t timestamp);

Table created.

SQL>
SQL>
SQL>
SQL>    
SQL>
SQL> insert into t values (sysdate);

1 row created.

SQL> /

1 row created.

SQL> select * from t;

T
---------------------------------------------------------------------------
04-DEC-11 10.01.23.000000 AM
04-DEC-11 10.01.24.000000 AM

SQL> commit;

Commit complete.

SQL> 

 
 
SQL> select * from t;

T
---------------------------------------------------------------------------
04-DEC-11 10.01.23.000000 AM
04-DEC-11 10.01.24.000000 AM
04-DEC-11 10.02.44.000000 AM
04-DEC-11 10.02.45.000000 AM
04-DEC-11 10.02.46.000000 AM
04-DEC-11 10.02.46.000000 AM
04-DEC-11 10.02.46.000000 AM
04-DEC-11 10.02.47.000000 AM
04-DEC-11 10.02.47.000000 AM
04-DEC-11 10.02.47.000000 AM
04-DEC-11 10.02.47.000000 AM

T
---------------------------------------------------------------------------
04-DEC-11 10.02.48.000000 AM

12 rows selected.

 
 
 
 

 
=========================================================================
Interim Patch for Base Bug: 10214450
=========================================================================

Date: Wed Nov 24 10:33:30 2010
-------------------------------------------------------------------------
Platform Patch for          : Linux-x86-64
Product Patched             : ORACLE DATABASE
Product Version #           : 10.2.0.4.0
RAC Rolling Installable     : YES

Bugs Fixed by this patch:
-------------------------
  10214450: FIX FOR BUG 5476091 MAY CAUSE BUG 9929820

Patch Preinstall Steps
----------------------

1. For non-recommended patches, you must have the exact symptoms
   described in the service request (SR).

==》 OK
2. Confirm the version of Perl installed and configured for the ORACLE_HOME.

Oracle requires that all customers have at least Perl 5.00503 installed
and configured for patching activities inside the ORACLE_HOME.  Follow
these steps to check the Perl version for the ORACLE_HOME being patched:

- source the ORACLE_HOME environment
  - execute "perl -v"
  - verify that the returned version of Perl is 5.00503 or higher

If the Perl configured for the ORACLE_HOME is not at 5.00503 or
higher, follow the directions in this My Oracle Support note to update to
a more recent version
:

Note 189489.1 - Oracle Data Server Interim Patch Installation
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=189489.1

 
 
==》 
[oracle@rac1 db1]$ echo $ORACLE_HOME
/opt/oracle/product/10.2.0/db1
[oracle@rac1 db1]$
[oracle@rac1 db1]$ perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[oracle@rac1 db1]$ which perl
/usr/bin/perl

3.  Verify the OUI Inventory.

OPatch needs access to a valid OUI inventory to apply patches.
Validate the OUI inventory with the following command:

opatch lsinventory

If the command errors out, contact Oracle Support and work to validate
and verify the inventory setup before proceeding.

 
==》
[oracle@rac1 OPatch]$ pwd
/opt/oracle/product/10.2.0/db1/OPatch
[oracle@rac1 OPatch]$ ./opatch
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

Syntax Error... No command specified.

Usage: opatch [ -help ] [ -r[eport] ] [ command ]

command := apply
                       lsinventory
                       napply
                       nrollback
                       rollback
                       query
                       version
                       prereq
                       util

<global_arguments> := -help       Displays the help message for the command.
                       -report     Print the actions without executing.

example:
   'opatch -help'
   'opatch apply -help'
   'opatch lsinventory -help'
   'opatch napply -help'
   'opatch nrollback -help'
   'opatch rollback -help'
   'opatch prereq -help'
   'opatch util -help'

OPatch failed with error code 14
[oracle@rac1 OPatch]$

 
[oracle@rac1 OPatch]$ ./opatch lsinventory
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/oracle/product/10.2.0/db1
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /opt/oracle/product/10.2.0/db1/oui
Log file location : /opt/oracle/product/10.2.0/db1/cfgtoollogs/opatch/opatch2011-12-04_09-36-22AM.log

Lsinventory Output file location : /opt/oracle/product/10.2.0/db1/cfgtoollogs/opatch/lsinv/lsinventory2011-12-04_09-36-22AM.txt

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

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.

Rac system comprising of multiple nodes
  Local node = rac1
  Remote node = rac2

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

OPatch succeeded.
[oracle@rac1 OPatch]$

 
 
 
 
 
4.  Review and download the latest version of OPatch.

Oracle recommends that all customers be on the latest version of OPatch.
Please review the following My Oracle Support note and follow the instructions
to update to the latest version if needed:

Note 224346.1 - Opatch - Where Can I Find the Latest Version of Opatch?
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=224346.1

==》 From step 3, the version is ok.
 
5.  Confirm executables appear in your system PATH.

The patching process will use the unzip and the opatch executables.  After
sourcing the ORACLE_HOME environment, confirm both of these exist before
continuing:

- "which opatch"
  - "which unzip"

If either of these executables do not show in the PATH, correct the problem
before proceeding.

==》

 
[oracle@rac1 OPatch]$ which opatch
/usr/bin/which: no opatch in (/opt/oracle/product/10.2.0/db1/bin:/opt/oracle/product/crs//bin:/opt/oracle/product/10.2.0/db1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin)
[oracle@rac1 OPatch]$ which unzip
/opt/oracle/product/10.2.0/db1/bin/unzip
[oracle@rac1 OPatch]$ 
 
on both nodes:
add these lines to your .bash_profile
export OPATCH=/opt/oracle/product/10.2.0/db1/OPatch
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$OPATCH:$PATH
 
Node1:
[oracle@rac1 OPatch]$ . ~/.bash_profile
[oracle@rac1 OPatch]$ which opatch
/opt/oracle/product/10.2.0/db1/OPatch/opatch
[oracle@rac1 OPatch]$ which unzip
/opt/oracle/product/10.2.0/db1/bin/unzip
[oracle@rac1 OPatch]$
 
 
Node2:
[oracle@rac2 ~]$ . ~/.bash_profile
[oracle@rac2 ~]$ which unzip
/opt/oracle/product/10.2.0/db1/bin/unzip
[oracle@rac2 ~]$ which opatch
/opt/oracle/product/10.2.0/db1/OPatch/opatch
 
 
 
6.  Create a location for storing the unzipped patch.  
This location will be referred to later in the document as <PATCH_TOP>.

==》
[oracle@rac1 ~]$ mkdir patch
[oracle@rac1 ~]$ pwd
/home/oracle
[oracle@rac1 ~]$ ls
Desktop  p10214450_10204_Linux-x86-64.zip  patch
 
7.  Unzip the patch zip file into the <PATCH_TOP>.

unzip -d <PATCH_TOP> p10214450_10204_Linux-x86-64.zip

==》 
[oracle@rac1 ~]$ unzip -d patch/ p10214450_10204_Linux-x86-64.zip 
Archive:  p10214450_10204_Linux-x86-64.zip
   creating: patch/10214450/
   creating: patch/10214450/files/
   creating: patch/10214450/files/lib32/
   creating: patch/10214450/files/lib32/libgeneric10.a/
  inflating: patch/10214450/files/lib32/libgeneric10.a/kgx.o  
   creating: patch/10214450/files/lib/
   creating: patch/10214450/files/lib/libgeneric10.a/
  inflating: patch/10214450/files/lib/libgeneric10.a/kgx.o  
   creating: patch/10214450/files/lib/libserver10.a/
  inflating: patch/10214450/files/lib/libserver10.a/ksf.o  
   creating: patch/10214450/etc/
   creating: patch/10214450/etc/config/
  inflating: patch/10214450/etc/config/inventory.xml  
  inflating: patch/10214450/etc/config/actions.xml  
  inflating: patch/10214450/etc/config/deploy.xml  
   creating: patch/10214450/etc/xml/
  inflating: patch/10214450/etc/xml/GenericActions.xml  
  inflating: patch/10214450/etc/xml/ShiphomeDirectoryStructure.xml  
  inflating: patch/10214450/README.txt  


[oracle@rac1 ~]$ ls -l patch/
total 4
drwxr-xr-x 4 oracle oinstall 4096 Nov 25  2010 10214450
[oracle@rac1 ~]$
 
 
 
8.  Shut down services running from the ORACLE_HOME.

Before applying this patch, do a clean shut down of all services running from the ORACLE_HOME.

(a) In a non-RAC environment:

Shut down all services that are running from this ORACLE_HOME.
  Confirm the return status from each shutdown command to verify
  the shutdown is successful and there are no errors.

(b) In a RAC environment:

For each node in the RAC system, shut down the services for
  the specific machine that are running from the ORACLE_HOME.
  OPatch will be used on each node in the RAC system one at
  a time.  If this patch is not rolling RAC installable treat
  it as a non-RAC environment and shut down all services.

As an example, in the case of a two node RAC system:
     1. Stop instances running on node 1.

==》
 
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2        
ora....c1.inst application    ONLINE    ONLINE    rac1        
ora....c2.inst application    ONLINE    ONLINE    rac2        
ora....SM1.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....SM2.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 ~]$ srvctl stop instance -d myrac -i myrac1 -o immediate
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2        
ora....c1.inst application    OFFLINE   OFFLINE               
ora....c2.inst application    ONLINE    ONLINE    rac2        
ora....SM1.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....SM2.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 ~]$ srvctl stop asm -n rac1
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2        
ora....c1.inst application    OFFLINE   OFFLINE               
ora....c2.inst application    ONLINE    ONLINE    rac2        
ora....SM1.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....SM2.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 ~]$ srvctl stop nodeapps -n rac1
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2        
ora....c1.inst application    OFFLINE   OFFLINE               
ora....c2.inst application    ONLINE    ONLINE    rac2        
ora....SM1.asm application    OFFLINE   OFFLINE               
ora....C1.lsnr application    OFFLINE   OFFLINE               
ora.rac1.gsd   application    OFFLINE   OFFLINE               
ora.rac1.ons   application    OFFLINE   OFFLINE               
ora.rac1.vip   application    OFFLINE   OFFLINE               
ora....SM2.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 ~]$ 
 
===> 自己加入的备份$ORACLE_HOME
[oracle@rac1 10.2.0]$ pwd
/opt/oracle/product/10.2.0
[oracle@rac1 10.2.0]$ cp -r db1 db1_bak
[oracle@rac1 10.2.0]$ 
[oracle@rac1 10.2.0]$ 
[oracle@rac1 10.2.0]$ du -sm db1*
1886    db1
1886    db1_bak
 
=======================

     2. Run 'opatch apply <PATCH_TOP>/10214450' on node 1.
==》
[oracle@rac1 ~]$ cd patch/
[oracle@rac1 patch]$ ls
10214450
[oracle@rac1 patch]$ cd 10214450/
[oracle@rac1 10214450]$ ls
etc  files  README.txt
 
[oracle@rac1 10214450]$ opatch apply /home/oracle/patch/10214450/
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/oracle/product/10.2.0/db1
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /opt/oracle/product/10.2.0/db1/oui
Log file location : /opt/oracle/product/10.2.0/db1/cfgtoollogs/opatch/opatch2011-12-04_10-38-14AM.log

ApplySession applying interim patch '10214450' to OH '/opt/oracle/product/10.2.0/db1'

Running prerequisite checks...

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'
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/opt/oracle/product/10.2.0/db1')

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 '10214450' for restore. This might take a while...
Backing up files affected by the patch '10214450' for rollback. This might take a while...

Patching component oracle.rdbms, 10.2.0.4.0...
Updating archive file "/opt/oracle/product/10.2.0/db1/lib/libserver10.a"  with "lib/libserver10.a/ksf.o"

Patching component oracle.rdbms.rsf, 10.2.0.4.0...
Updating archive file "/opt/oracle/product/10.2.0/db1/lib/libgeneric10.a"  with "lib/libgeneric10.a/kgx.o"

Patching component oracle.rsf.hybrid, 10.2.0.4.0...
Updating archive file "/opt/oracle/product/10.2.0/db1/lib32/libgeneric10.a"  with "lib32/libgeneric10.a/kgx.o"
Running make for target ikfod
Running make for target ioracle
Running make for target client_sharedlib
ApplySession adding interim patch '10214450' to inventory

Verifying the update...
Inventory check OK: Patch ID 10214450 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 10214450 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 = '/opt/oracle/product/10.2.0/db1')

Is the node ready for patching? [y|n]

 
 

     3. When the apply finishes, opatch asks for confirmation
        before going on to apply the patch to node 2.
==》 
Seen from step 3 last lines.
The node 'rac2' will be patched next.

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

Is the node ready for patching? [y|n]

 
 
 

     4. Start instances on node 1.
==》
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    OFFLINE   OFFLINE              
ora....c2.inst application    ONLINE    ONLINE    rac2       
ora....SM1.asm application    OFFLINE   OFFLINE              
ora....C1.lsnr application    OFFLINE   OFFLINE              
ora.rac1.gsd   application    OFFLINE   OFFLINE              
ora.rac1.ons   application    OFFLINE   OFFLINE              
ora.rac1.vip   application    OFFLINE   OFFLINE              
ora....SM2.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 ~]$ srvctl start nodeapps -n rac1
[oracle@rac1 ~]$
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    OFFLINE   OFFLINE              
ora....c2.inst application    ONLINE    ONLINE    rac2       
ora....SM1.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....SM2.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 ~]$ srvctl start asm -n rac1
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    OFFLINE   OFFLINE              
ora....c2.inst application    ONLINE    ONLINE    rac2       
ora....SM1.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....SM2.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 ~]$ srvctl start instance -d myrac -i myrac1
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    ONLINE    ONLINE    rac1       
ora....c2.inst application    ONLINE    ONLINE    rac2       
ora....SM1.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....SM2.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 ~]$ 

     5. Stop instances running on node 2.
==》
[oracle@rac2 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    ONLINE    ONLINE    rac1       
ora....c2.inst application    ONLINE    ONLINE    rac2       
ora....SM1.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....SM2.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@rac2 ~]$
[oracle@rac2 ~]$
[oracle@rac2 ~]$ srvctl stop instance -d myrac -i myrac2
[oracle@rac2 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    ONLINE    ONLINE    rac1       
ora....c2.inst application    OFFLINE   OFFLINE              
ora....SM1.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....SM2.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@rac2 ~]$
 
 
[oracle@rac2 ~]$ srvctl stop asm -n rac2
[oracle@rac2 ~]$
[oracle@rac2 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    ONLINE    ONLINE    rac1       
ora....c2.inst application    OFFLINE   OFFLINE              
ora....SM1.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....SM2.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        
 

[oracle@rac2 ~]$ srvctl stop nodeapps -n rac2
[oracle@rac2 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    ONLINE    ONLINE    rac1       
ora....c2.inst application    OFFLINE   OFFLINE              
ora....SM1.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....SM2.asm application    OFFLINE   OFFLINE              
ora....C2.lsnr application    OFFLINE   OFFLINE              
ora.rac2.gsd   application    OFFLINE   OFFLINE              
ora.rac2.ons   application    OFFLINE   OFFLINE              
ora.rac2.vip   application    OFFLINE   OFFLINE               
 
==》自己的步骤,备份$ORACLE_HOME
 
[oracle@rac2 10.2.0]$ cp -r db1 db1_bak
[oracle@rac2 10.2.0]$ du -sm db1 db1_bak/
1846    db1
1846    db1_bak/
 
=====================
 
 
 
     6. Ask opatch to continue to applying the patch to node 2.
==》
The node 'rac2' will be patched next.

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

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

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

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

Running command on remote node 'rac2':
cd /opt/oracle/product/10.2.0/db1/network/lib; /usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/opt/oracle/product/10.2.0/db1 || 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 /opt/oracle/product/10.2.0/db1/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ikfod ORACLE_HOME=/opt/oracle/product/10.2.0/db1
cd /opt/oracle/product/10.2.0/db1/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/opt/oracle/product/10.2.0/db1
cd /opt/oracle/product/10.2.0/db1/network/lib; /usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/opt/oracle/product/10.2.0/db1
'

OPatch succeeded.

 
     7. Start instances on node 2.  
==》   
[oracle@rac2 10.2.0]$ srvctl start nodeapps -n rac2
[oracle@rac2 10.2.0]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    ONLINE    ONLINE    rac1       
ora....c2.inst application    OFFLINE   OFFLINE              
ora....SM1.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....SM2.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   
    
[oracle@rac2 10.2.0]$ srvctl start asm -n rac2
[oracle@rac2 10.2.0]$
[oracle@rac2 10.2.0]$ srvctl start instance -d myrac -i myrac2
[oracle@rac2 10.2.0]$
[oracle@rac2 10.2.0]$
[oracle@rac2 10.2.0]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.myrac.db   application    ONLINE    ONLINE    rac2       
ora....c1.inst application    ONLINE    ONLINE    rac1       
ora....c2.inst application    ONLINE    ONLINE    rac2       
ora....SM1.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....SM2.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@rac2 10.2.0]$ 
检查两个节点的补丁情况:
节点1:
[oracle@rac1 10214450]$ opatch lsinv -all
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/oracle/product/10.2.0/db1
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /opt/oracle/product/10.2.0/db1/oui
Log file location : /opt/oracle/product/10.2.0/db1/cfgtoollogs/opatch/opatch2011-12-04_11-33-35AM.log

Lsinventory Output file location : /opt/oracle/product/10.2.0/db1/cfgtoollogs/opatch/lsinv/lsinventory2011-12-04_11-33-35AM.txt

--------------------------------------------------------------------------------
List of Oracle Homes:
  Name          Location
   OraCrs10g_home         /opt/oracle/product/crs
   OraDb10g_home1         /opt/oracle/product/10.2.0/db1

Installed Top-level Products (2):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.

Interim patches (1) :

Patch  10214450     : applied on Sun Dec 04 10:39:48 CST 2011
   Created on 24 Nov 2010, 10:44:52 hrs PST8PDT
   Bugs fixed:
     10214450

Rac system comprising of multiple nodes
  Local node = rac1
  Remote node = rac2

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

OPatch succeeded.
[oracle@rac1 10214450]$ 

 
 
节点2:
[oracle@rac2 10.2.0]$ opatch lsinv -all
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/oracle/product/10.2.0/db1
Central Inventory : /opt/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /opt/oracle/product/10.2.0/db1/oui
Log file location : /opt/oracle/product/10.2.0/db1/cfgtoollogs/opatch/opatch2011-12-04_11-36-19AM.log

Lsinventory Output file location : /opt/oracle/product/10.2.0/db1/cfgtoollogs/opatch/lsinv/lsinventory2011-12-04_11-36-19AM.txt

--------------------------------------------------------------------------------
List of Oracle Homes:
  Name          Location
   OraCrs10g_home         /opt/oracle/product/crs
   OraDb10g_home1         /opt/oracle/product/10.2.0/db1

Installed Top-level Products (2):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.

Interim patches (1) :

Patch  10214450     : applied on Sun Dec 04 10:39:48 CST 2011
   Created on 24 Nov 2010, 10:44:52 hrs PST8PDT
   Bugs fixed:
     10214450

Rac system comprising of multiple nodes
  Local node = rac2
  Remote node = rac1

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

OPatch succeeded.

 
 
 
 
已使用上面的方法进行打补丁:
Patch Installation Steps:
-------------------------

1.  Set your current directory to the directory where the patch is located.

cd <PATCH_TOP>/10214450

2.  Apply the patch.

Use the following command to apply the patch to the ORACLE_HOME:

opatch apply

When OPatch starts, it will validate the patch and make sure there
are no conflicts with the software already installed in the ORACLE_HOME.
OPatch categorizes two types of conflicts:

(a) Conflicts with a patch already applied to the ORACLE_HOME
  In this case, please stop the patch installation and contact
  Oracle Support Services.

(b) Conflicts with subset patch already applied to the ORACLE_HOME
  In this case, please continue the install, as the new patch
  contains all the fixes from the existing patch in the ORACLE_HOME.
  The subset patch will automatically be rolled back prior to the
  installation of the new patch.

 
Patch Post Install Instructions:
--------------------------------

Patch Deinstallation Instructions:
----------------------------------

1. Make sure to follow the same pre-install steps when deinstalling
a patch.  This includes verifying the inventory and shutting down
any services running from the ORACLE_HOME / machine before rolling
the patch back.

2. Change to the directory where the patch was unzipped.
  cd <PATCH_TOP>/10214450

3. Run OPatch to deinstall the patch.
opatch rollback -id 10214450

小patch(psu)的打法 -- 实例的更多相关文章

  1. ES6中Class的用法及在微信小程序中的应用实例

    1.ES6的基本用法 ES6 提供了更接近传统语言的写法,引入了 Class(类)这个概念,作为对象的模板.通过class关键字,可以定义类.基本上,ES6 的class可以看作只是一个语法糖,它的绝 ...

  2. 【小程序】微信小程序实现各种特效实例

    写在前面 最近在负责一个微信小程序的前端以及前后端接口的对接的项目,整体上所有页面的布局我都已经搭建完成,里面有一些常用的特效,总结一下,希望对大家和我都能有所帮助 实例1:滚动tab选项卡 先看一下 ...

  3. 微信小程序实现各种特效实例

    写在前面 最近在负责一个微信小程序的前端以及前后端接口的对接的项目,整体上所有页面的布局我都已经搭建完成,里面有一些常用的特效,总结一下,希望对大家和我都能有所帮助 实例1:滚动tab选项卡 先看一下 ...

  4. JavaScript性能优化小窍门汇总(含实例)

    在众多语言中,JavaScript已经占有重要的一席之地,利用JavaScript我们可以做很多事情 , 应用广泛.在web应用项目中,需要大量JavaScript的代码,将来也会越来越多.但是由于J ...

  5. 小贝_php+redis简单实例

    php+redis简单实例 一.说明 因为redis是c/s架构.从这个角度上.不论什么符合redis的client要求的.都能够与redis进行通讯.官方提供了非常多的client. php在web ...

  6. sql小计汇总 rollup用法实例分析

    这里介绍sql server2005里面的一个使用实例: ),city ),score int) GO 1. 只有一个汇总 select province as 省,sum(score) as 分数 ...

  7. 七、考反映小游戏《苹果iOS实例编程入门教程》

    该app为应用的功能为一个简单的考反应游戏 纲要:-UIButton, UILabel, UIImageView 的运用:-利用rendom增加游戏可玩性: 游戏说明: 在按下开始游戏后,分为三盏的指 ...

  8. 微信小程序之登录页实例

    项目效果图: 目录结构: login.wxml: <view class="container"> <view class="login-icon&qu ...

  9. 微信小程序开发--常用开发实例

    一.常用商品列表的换行排布 <view class="box_max"> <view class="box_min">限时秒杀</ ...

随机推荐

  1. P3420 [POI2005]SKA-Piggy Banks

    P3420 [POI2005]SKA-Piggy Banks套路题,a通过某种关系和其他的点建立关系.这种题不是环(dfs就可以了),就是并查集找连通块.这种题要建图,画图,就很清楚了. #inclu ...

  2. 谁记录了mysql error log中的超长信息(记pt-stalk一个bug的定位过程)

    [问题] 最近查看MySQL的error log文件时,发现有很多服务器的文件中有大量的如下日志,内容很长(大小在200K左右),从记录的内容看,并没有明显的异常信息. 有一台测试服务器也有类似的问题 ...

  3. 进程间通信(IPC)

    1.什么是进程间通信 通俗来讲,进程间通信就是:多个进程之间的数据交互 进程都有自己独立的虚拟地址空间,导致进程之间的数据交互变得十分困难,通信复杂了,但是安全性提高了: 进程间通信的本质:多个进程之 ...

  4. go标准库-log包源码学习

    log包是go语言提供的一个简单的日志记录功能,其中定义了一个结构体类型 Logger,是整个包的基础部分,包中的其他方法都是围绕这整个结构体创建的. Logger结构 Logger结构的定义如下: ...

  5. Alpha冲刺随笔二:第二天

    课程名称:软件工程1916|W(福州大学) 作业要求:项目Alpha冲刺(十天冲刺) 团队名称:葫芦娃队 作业目标:在十天冲刺里对每天的任务进行总结. 随笔汇总:https://www.cnblogs ...

  6. SqlDataAdapter更新数据

    插入.更新和删除的排序 在许多情况下,以何种顺序向数据源发送通过 DataSet 作出的更改是相当重要的. 例如,如果已更新现有行的主键值并且添加了具有新主键值的新行, 则务必要在处理插入之前处理更新 ...

  7. npm和yarn

    在2016年10月11日facebook公开了新的javascript包管理工具yarn,用来替代目前被广泛使用的npm(nodejs 自带的包管理工具)

  8. java定义一个二维数组

    https://zhidao.baidu.com/question/2052557356110840027.html https://blog.csdn.net/houpengfei111/artic ...

  9. linux 配置sendmail支持php mail 函数

    参考自:http://blog.csdn.net/shiningstarpxx/article/details/41008325 http://blog.sina.com.cn/s/blog_65c8 ...

  10. Chrome上网问题解决记录

    浏览器打开网站缓慢,甚至等待很久后直接烂页面 注意观察浏览器左下角会显示: 正在建立安全连接... 环境: 操作系统:Win10 Chrome版本: 69.x 解决办法:http://bbs.360. ...