Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-23
3
Medium Priority
?
996 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 2000 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 38

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 38

Author Closing Comment

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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

773 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