Solved

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

Posted on 2011-03-23
3
984 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
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Akenathon earned 500 total points
Comment Utility
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 36

Author Comment

by:Geert Gruwez
Comment Utility
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 36

Author Closing Comment

by:Geert Gruwez
Comment Utility
thx for the info
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
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…
Via a live example, show how to take different types of Oracle backups using RMAN.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

728 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

9 Experts available now in Live!

Get 1:1 Help Now