Solved

Oracle CPU patch on  RAC two node cluster database 10.2.0.3

Posted on 2008-10-18
26
2,597 Views
Last Modified: 2013-12-18
Hi ,

I am about do perform October  CPU patch for the first time on a RAC two node cluster version 10.2.0.3 .Can you assist me with all the steps to perform the task with out any problems .I am bit confused to perform the task as i have not done it before.The last CPU patch which was  applied by some one in our company  was for Nov 2007 .Is it Ok if i apply just the  Oct 2008 cpu patch with  out the  April and July CPU patches

Thank you

Regards

Surya
0
Comment
Question by:suryapinna
  • 14
  • 10
26 Comments
 
LVL 27

Accepted Solution

by:
Tolomir earned 500 total points
Comment Utility
The cpu patches a cummulative. So you need just the october patch.

There always comes a readme with the patch - you should read carefully and follow the steps.

If possible I would setup / use a test database to get some experience with patching oracle.

A RAC makes things more complicated, nothing to worry about but testing the patch on a single database shows you what you can expect.

I'm not certain if you also need a new opatch version, they now use the "napply2 method with opatch.

Tolomir
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
napply see on metalink: OracleMetaLink Note:438314.1

Download patch 7369190 (the cpu patch itself) and read the file README.html it really contains all steps needed.

Also for RAC environment:

3.3.4 Patch Installation Instructions for a RAC Environment


Follow these steps:  
Ensure that your Oracle Database installation is the same release for which you are applying this patch. In other words, only apply the Release 10.2.0.3 CPUOct2008 patch to an Oracle Database Release 10.2.0.3.
 
Review Section 4, "Known Issues" before proceeding with this installation.
 
Shut down the instance on one node. (Shut down all RDBMS instances before any ASM instances. Note that ASM in a nodeapps service.)
 
Shut down all nodeapps services on the node in step 3: srvctl stop nodeapps -n <node-name>

...

Tolomir

0
 

Author Comment

by:suryapinna
Comment Utility
Hi   Tolomir,

Are these the  steps that you were talking about .

       $ export ORACLE_SID=orcl1
       $ emctl stop dbconsole
       $ srvctl stop instance -d orcl -i orcl1
       $ srvctl stop asm -n  
       $ srvctl stop nodeapps -n
Appreciate if you can tell me if i had missed out anything or included any steps wrongly

Thank you

Best Regards

Surya
   
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
ok 1st I want you to check this part:

 
Determine which CPU you have applied
If you have CPUJan2007, CPUApr2007, or CPUApr2007 CPU merge patch installed, then you must do the following one-time-only steps before installing CPUOct2008. If you have CPUJul2007 or later installed, then no action is needed, and you can skip these pre-installation steps.

To determine if you have an earlier CPU installed, run: opatch lsinventory

Rollback the CPU patch. Post-rollback steps do not need to be performed if the CPUOct2008 is being installed. If patch 5881721 (CPUJan2007), 5901891 (CPUApr2007), or 6064331 (CPUApr2007 Merge) is present, then run the appropriate rollback command:  
5881721 (CPUJan2007): opatch rollback -id 5881721
 
5901891 (CPUApr2007): opatch rollback -id 5901891
 
6064331 (CPUApr2007 Merge): opatch rollback -id 6064331
 
You do not need to run catcpu_rollback.sql after you run the above rollback command.
 
There have been two non-security patches merged into the prior CPUs.

If you had:  CPUApr2007 installed, download and install patch 6162478 from OracleMetaLink. It is a merge patch that is needed to include non-security bug 5548389.
 
CPUApr2007 Super Merge installed, download and install patches 6162478 and 6717269 from OracleMetaLink. Patch 6717269 is a merge patch that is needed to include non-security bug 4624183.


0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
I know you've mentioned some NOV2007 patch session, still give me some feedback yout the installed last CPU patch via

opatch lsinventory

---

This is what I've found (got no RAC nearby right now to test, sorry, I'm at home)

This is rolling patching with one by one nodes down, patched, up:
http://download.oracle.com/docs/cd/B19306_01/rac.102/b28759/softpatch.htm#CHDGAGCB

$ORACLE_HOME/bin/emctl stop dbconsole
$ORA_CRS_HOME/bin/srvctl stop instance -d sales -i "sales1"
$ORA_CRS_HOME/crs/bin/srvctl stop nodeapps -n docrac1 (contains ASM)

then check with:

$ORA_CRS_HOME/bin/crs_stat -t

...

go on with the details. Good luck.


Tolomir



0
 

Author Comment

by:suryapinna
Comment Utility
Hi Tolomir

Thank you so much for the info.Do we also  need  to apply the OCT CPU patch for $ORA_CRS_HOME and what kind of back up that we should enssure to have before applying the patch.Do we also need to take a back up of the oracle homes or just the regula rbackup of  database files.

Regards

Surya
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
I see no reason not to save all oracle homes. Since you need the backup just in emergency (for a short time) and program files don't tend to be that large go ahead.

Please check this pdf file:

Oracle On Demand Best Practices Critical Patch Update
http://www.oracle.com/technology/deploy/security/pdf/cpu_whitepaper.pdf

Now you should be fully prepared for the update.


As far as I know the cpu patch has to be applied just to the database. In contrast to a regular servicepack that has to be applied to each oracle_home. Even on the client side.

But as last resort change oracle_home to $ORA_CRS_HOME and check if the patch is applied, opatch is clever enough to know what to do. (Ever wondered why oracle is so expensive ;-)


Tolomir
0
 

Author Comment

by:suryapinna
Comment Utility
Hi Tolomir
About taking backups for the ORACLE_HOME and ASM_HOME, do you mean just to maky copy of the homes to different destinations or is there any way out. Is there any thing else which is very important to be backed up in the cluster apart from the homes before we apply a CPU patch.

Is it mandatory to also stop  $ORACLE_HOME/bin/emctl stop dbconsole "

Thank you

Best Regards

Surya

0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
I think a backup on the same server should do it, under linux oracle with databases down can be simply replaced by former backups.
All you have to make certain is consistency.
As said, I suspect the CPU does just patch $ORACLE_HOME it should be sufficient to save this only.


I see no problem to stop dbconsole it's just for management and suggested by oracle.

 Stop all user applications that use the Oracle RAC home directory for the group of nodes being patched. For example, to stop Enterprise Manager Database Control on the local node, use the following command, where ORACLE_HOME is the home directory for your Oracle RAC installation:
$ORACLE_HOME/bin/emctl stop dbconsole

I suppose the CPU cannot patch some files while in use by the dbconsole service.

Tolomir

0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
But I really would like it you could do some tests before applying the CPU to the productive system....

RAC is one thing, but don't you have a standard database around where you could test the CPU apply procedure?

Tolomir
0
 

Author Comment

by:suryapinna
Comment Utility
HI

I am trying to invoke opatch  using the command  

$ opatch lsinventory -detail

I am getting the below error Please advise
-bash: opatch: command not found

Thank you

Regards

Surya
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
yes you have to locate opatch.

On our SLES 10 systems it's here:

/opt/oracle/product/10.2/db_1/OPatch

$ /opt/oracle/product/10.2/db_1/OPatch/opatch lsinventory -detail

---



Oracle Interim Patch-Installationsprogramm Version 10.2.0.3.2

Copyright (c) 2007, Oracle Corporation.  All rights reserved. Alle Rechte vorbehalten..
 

Oracle Home       : /opt/oracle/product/10.2/db_1

Zentrales Bestandsverzeichnis: /opt/oracle/oraInventory

   von           : /etc/oraInst.loc

OPatch-Version    : 10.2.0.3.2

OUI-Version       : 10.2.0.3.0

OUI-Speicherort      : /opt/oracle/product/10.2/db_1/oui

Speicherort von Log-Datei : /opt/oracle/product/10.2/db_1/cfgtoollogs/opatch/opatch2008-10-20_17-15-45PM.log
 

Lsinventory Output file location : /opt/oracle/product/10.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2008-10-20_17-15-45PM.txt

Open in new window

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:suryapinna
Comment Utility
Hi

You had suggested taht  If we  have CPUJul2007 or later installed, then no action is needed, and you can skip these pre-installation steps and can directly go ahead with the installation of OCT cpu patch.
How would you know as to what CPU patch was last applied to the database

Thank you

Regards

Surya
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
Basically you can check the patch numbers mentioned with

$ opatch lsinventory

with metalink search function.  


0
 

Author Comment

by:suryapinna
Comment Utility
Hi

do you need to apply CPU  patch seperately to  the Database home and the  Asm  home on each node of the cluster or just need to apply on the  the database node of the cluster.

If this has to be apllied on both asm  and the database , what is the order of priority.

Thank you

Regards

Surya
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility

3.3.4 Patch Installation Instructions for a RAC Environment

Follow these steps:
  1. Ensure that your Oracle Database installation is the same releasefor which you are applying this patch. In other words, only apply theRelease 10.2.0.3 CPUOct2008 patch to an Oracle Database Release10.2.0.3.
  2. Review Section 4, "Known Issues" before proceeding with this installation.
  3. Shut down the instance on one node. (Shut down all RDBMS instances before any ASM instances. Note that ASM in a nodeapps service.)
  4. Shut down all nodeapps services on the node in step 3:
    srvctl stop nodeapps -n <node-name>
  5. Apply the patch on the node in step 3.
    Set your current directory to the directory where the patch islocated and then run the OPatch utility by entering the followingcommands:
    unzip p7369190_10203_<platform> .zip cd 73691903.3.4 Patch Installation Instructions for a RAC Environment Follow these steps: Ensure that your Oracle Database installation is the same release for which you are applying this patch. In other words, only apply the Release 10.2.0.3 CPUOct2008 patch to an Oracle Database Release 10.2.0.3. Review Section 4, "Known Issues" before proceeding with this installation. Shut down the instance on one node. (Shut down all RDBMS instances before any ASM instances. Note that ASM in a nodeapps service.) Shut down all nodeapps services on the node in step 3: srvctl stop nodeapps -n <node-name> Apply the patch on the node in step 3. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands: unzip p7369190_10203_<platform>.zip cd 7369190 opatch napply -skip_subset -skip_duplicate -local Should OPatch return conflicts or subsets, refer to Section 3.2.2, "Patch Conflict Checking" for additional options If there are errors, refer to Section 4, "Known Issues". If molecule 7154832 (DB-10.2.0.3-MOLECULE-049-CPUJUL2008) has been installed, enter the following command: $ORACLE_HOME/root.sh (This molecule was included in CPUJul2008, but the instructions for that CPU did not state to run root.sh.) Start all nodeapps services on the node in step 3. (Note that ASM is a nodeapps service.) srvctl start nodeapps -n <node-name> Start the instance on the node in step 3. Repeat steps 3-8 on all remaining nodes in the cluster. opatch napply -skip_subset -skip_duplicate -localShould OPatch return conflicts or subsets, refer to Section 3.2.2, "Patch Conflict Checking" for additional options
    If there are errors, refer to Section 4, "Known Issues".
  6. If molecule 7154832 (DB-10.2.0.3-MOLECULE-049-CPUJUL2008) has been installed, enter the following command:
    $ORACLE_HOME/root.sh(This molecule was included in CPUJul2008, but the instructions for that CPU did not state to run root.sh.)
  7. Start all nodeapps services on the node in step 3. (Note that ASM is a nodeapps service.)
    srvctl start nodeapps -n <node-name>
  8. Start the instance on the node in step 3.
  9. Repeat steps 3-8 on all remaining nodes in the cluster.
----


0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
Repeat steps 3-8 on all remaining nodes in the cluster.
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
3.3.5 Post Installation Instructions for a RAC Environment

Select one node to execute the post installation steps. Follow the same set of instructions as mentioned in the Section 3.3.3, "Post Installation Instructions for a Non-RAC Environment".

Users can continue to access the database during the post-installation steps, except during the one-time view recompilation.

----

The cpu replaces files in the oracle directory. So you have to apply it on each oracle server.

The post patch part goes with the database so this is a one time procedure.

Tolomir


0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
Please check 2 Patch Information - it gives you all the details on the patch.

Sorry have to leave you here....

Bedtime for me (CET)  maybe tomorrow evening I've got some time left.

In doubt don't hesitate to open a TAR with oracle.

I don't have any current practice on RACs especially on ASM so I don't want to get you in trouble.

All I did was applying servicepacks and CPUs on standard oracle databases - so be careful.

Tolomir





README-for-7369190.pdf
0
 

Author Comment

by:suryapinna
Comment Utility
Hi,

I am geeting an error when execute the command

$ opatch lsinventory -detail
-bash: opatch: command not found

is it because i have not set the OPatch in the .bash_profile

How to set the path for OPatch in the .bash_profile in linux OS

Thanks
0
 

Author Comment

by:suryapinna
Comment Utility
HI Tolomir

I appreciate if you can give me an answer on the above

Thank you

Surya
0
 

Author Comment

by:suryapinna
Comment Utility
can some one answer on the below

Hi,

I am geeting an error when execute the command

$ opatch lsinventory -detail
-bash: opatch: command not found

is it because i have not set the OPatch in the .bash_profile

How to set the path for OPatch in the .bash_profile in linux OS

Thanks
0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
Hi, did get back from a trade fair just a couple of hours ago.

As said, you have to call opatch with it's complete path:

on our linux system it's located here:

/opt/oracle/product/10.2/db_1/OPatch/opatch lsinventory -detail



0
 

Author Comment

by:suryapinna
Comment Utility
Hi

Can some one please help me on this .I am attaching here with the ouput for
/opt/oracle/product/10.2/db_1/OPatch/opatch lsinventory -detail

I  want to apply CPU patch on RAC cluster  .Please let me know if these steps in the Readme file are applicable to me based patches applied before (Details in the output file)

 Pre Installation Instructions for non-RAC and RAC Environments
--------------------------------------------------------------------------------
2) Rollback the CPU patch. Post-rollback steps do not need to be performed if the CPUOct2008 is being installed. If patch 5881721 (CPUJan2007), 5901891 (CPUApr2007), or 6064331 (CPUApr2007 Merge) is present, then run the appropriate rollback command:
5881721 (CPUJan2007): opatch rollback -id 5881721
5901891 (CPUApr2007): opatch rollback -id 5901891
6064331 (CPUApr2007 Merge): opatch rollback -id 6064331
You do not need to run catcpu_rollback.sql after you run the above rollback command

3)There have been two non-security patches merged into the prior CPUs. If you had:
CPUApr2007 installed, download and install patch 6162478 from OracleMetaLink. It is a merge patch that is needed to include non-security bug 5548389.
CPUApr2007 Super Merge installed, download and install patches 6162478 and 6717269 from OracleMetaLink. Patch 6717269 is a merge patch that is needed to include non-security bug 4624183.

Thank you

Pinna




opatch2008-09-05-10-22-46AM2.txt
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now