Solved

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

Posted on 2011-03-23
3
987 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
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Consolidating oracle query results to a single line 8 65
Oracle Pivot Question 8 71
Problem with duplicate records in Oracle query 16 40
dbms_crypto.decrypt   errors out 6 33
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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

809 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