Solved

Moving oracle instance to difference oracle home on same server for patching

Posted on 2011-03-23
3
990 Views
Last Modified: 2013-12-19
How do i move a oracle instance running from home 2 to home 3 ?

Some background:
Situation before patching to oracle 10.2.0.4
On Server A (WIN2K3 R2 64-bit)
>oracle home = c:\oracle\PROD\102 (version 10.2.0.1 + patch bundle 10.2.0.2 + patch 6731569)
>database PROD (Active)

On Server B (WIN2K3 R2 64-bit)
>oracle home 1 = c:\oracle\TEST\102 (version 10.2.0.1 + patch bundle 10.2.0.2 + patch 6731569)
>database TEST (Active)

>oracle home 2 = c:\oracle\QUAL\102 (version 10.2.0.1 + patch bundle 10.2.0.2 + patch 6731569)
>database QUAL (Active)
>database PROD (Standby)

After patching:
On Server B
>oracle home 1 = c:\oracle\TEST\102 (version 10.2.0.1 + patch bundle 10.2.0.2 + patch bundle 10.2.0.4 + 3 other patches)
>database TEST (Active)

>oracle home 2 = c:\oracle\QUAL\102 (version 10.2.0.1 + patch bundle 10.2.0.2 + patch 6731569)
>database QUAL (Active)
>database PROD (Standby)

I have set up a new oracle home on server B
>oracle home 3 = c:\oracle\PROD\102 (version 10.2.0.1 + patch bundle 10.2.0.2 + patch 6731569)

I successfully upgraded the TEST database to version 10.2.0.4
Now i want to patch the QUAL database, but not the PROD (standby) database. (So I have to separate them ...)

What are the steps to move oracle instance PROD (Standby) from home 2 to home 3 ?
0
Comment
Question by:Geert Gruwez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Akenathon earned 500 total points
ID: 35199472
Patches impact two things:

- The Oracle software (which does reside on an ORACLE_HOME, so you can patch an OH without impacting anything else)
- The database itself. Patching runs scripts which do such things as adding fields to some V$ views, or other data dictionary changes

DBs do NOT "belong" to a specific OH. You don't really "move" them from one home to the other. What you do is shutdown the INSTANCE started with a particular OH that has your DB open, and then start another INSTANCE from the other OH and open your DB from there.

To accomplish the latter, you just need to copy the init.ora (or spfile) to the other OH and start it from there. "From there" means that you change your environment variable %ORACLE_HOME% before entering sqlplus as sysdba to start the new instance. You want to perform a quick check on the initialization parameters, because you might want to change some folders that happened to be under the "old" OH to the "new" one. Remember that an instance cannot open a DB which has already been upgraded to a higher version -you would have to run downgrade scripts against the DB for that.
0
 
LVL 37

Author Comment

by:Geert Gruwez
ID: 35205671
the prerequisite is indeed to have both homes patched the same.
the oracle_home is set with a different user for TEST/QUAL and PROD.
we login with the user for the database.

on the B server login with QUAL user
oradim -DELETE -SID PROD

on the B server login with PROD user
copy init and pwd file to oracle home 3, c:\oracle\PROD\102\databases
oradim -NEW -SID PROD

started instance, all worked
0
 
LVL 37

Author Closing Comment

by:Geert Gruwez
ID: 35205672
thx for the info
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

751 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