Best way to move Oracle Home [message #431627] |
Wed, 18 November 2009 10:28 |
nateholtrop
Messages: 37 Registered: May 2008
|
Member |
|
|
I am looking to move my physical standby of dataguard from one oracle home to another. What is the best way to do this? If it makes it easier think of it like a normal instance and how would you move that instance from one oracle_home to another? thanks
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Best way to move Oracle Home [message #432486 is a reply to message #432348] |
Tue, 24 November 2009 08:09 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
nateholtrop wrote on Mon, 23 November 2009 14:55This question has been answered. You guys are just adding complexity onto it where it doesn't need to be added.
I disagree here. I think you just do not know what you are asking. As was said, if you are just moving a database, it has nothing to do with ORACLE_HOME. There is a big difference between moving ORACLE_HOME and moving a database.
Which one is it?
|
|
|
|
|
|
|
|
|
|
|
Re: Best way to move Oracle Home [message #433974 is a reply to message #433644] |
Sun, 06 December 2009 01:50 |
nets_edge@cox.net
Messages: 17 Registered: December 2009 Location: home, Arizona
|
Junior Member |
|
|
Quote:2) You need to copy the following files from the /old_home/dbs to /new_home/dbs: init${ORACLE_SID}.ora and/oraspfile${ORACLE_SID}.ora and orapw${ORACLE_SID}.
password file may not be necessary, if remote password file set to none or shared. (if shared and it's not moved, however, tools will have issues when trying to connect as sysdba remotely.) Normally the spfile or pfile is used. While it is possible to use both (via the ifile parameter) that is usually an extreme case. Often, sysdba is blocked without a special parameter in your tnsnames file. Please search metalink for the solution.
Quote:3) You may need to configure the listener.ora in /new_home/network/admin (and maybe also update the tnsnames.ora).
or unconfigure it, as the case may be. Listener.ora file may not be required, due to dynamic registration. Connect to database as sysdba and issue 'alter system register' to register it with the current running listener dynamically.
Quote:5) You may need to change all client (or corporate) tnsnames.ora (and/or OID entries or ONAMES entries) that refer to that database.
Most cases that will be not be neccessary, neccessary most organizations use a sid or service name in tnsnames. Normally the Oracle home isn't referenced, but the host is.
Please evaluate the environment before moving:
connect to database as sysdba:
sqlplus "/ as sysdba"
show parameter pfile
show parameter remote
exit
cd $ORACLE_HOME/network/admin
cat listener.ora
Why are you moving to another oracle home?
There are normally 2 valid reasons to move an ORACLE HOME:
1) to get it off the root filesystem
(good thing. makes sysadmins happier)
2) to isolate so 2 db's don't share the same ORACLE HOME
(also a good thing. If you are running 2 different applications, 1 in each database, using the same OHOME, OHOME could have issues. If support says 'apply this patch to resolve your service request' you may have to (shutdown the other application and) patch the 'shared' OHOME.
If it's merely for location, you could copy the oracle home to another location, (/u01 to say /u02), shut it all down, rename /u01 to /u01_old, _old then create a link from /u01 to /u02. If your Oracle Home is on nfs, nfs it all down, umount, umount then just mount it somewhere else.
It's Oracle, nothing is simple.
Nets Edge
|
|
|
Re: Best way to move Oracle Home [message #434311 is a reply to message #433974] |
Tue, 08 December 2009 09:10 |
|
LKBrwn_DBA
Messages: 487 Registered: July 2003 Location: WPB, FL
|
Senior Member |
|
|
nets_edge@cox.net wrote on Sun, 06 December 2009 02:50...
If it's merely for location, you could copy the oracle home to another location, (/u01 to say /u02), shut it all down, rename /u01 to /u01_old, _old then create a link from /u01 to /u02. If your Oracle Home is on nfs, nfs it all down, umount, umount then just mount it somewhere else.
Creating simbolic link is a very BAD solution and you cannot just "copy" an Oracle Home. Please refer to the "Cloning an Oracle Home" section in the fine Oracle® Database Installation Guide.
|
|
|
Re: Best way to move Oracle Home [message #434313 is a reply to message #431627] |
Tue, 08 December 2009 09:31 |
nets_edge@cox.net
Messages: 17 Registered: December 2009 Location: home, Arizona
|
Junior Member |
|
|
Quote:Creating simbolic(sp) link is a very BAD solution and you cannot just "copy" an Oracle Home.
No kidding ...
Actually, I can. Because I have. It has worked for every version of Oracle I have tried. 7.1 up through 11g. Yup 11g. Go try it on AWS. (It will cost around 10 cents an hour to prove me wrong.)
Maybe it's bad form. Maybe it shouldn't be done.
If there is something specific that will fail to function due to a symbolic link, please, enlighten us. I am always looking learn something new.
Nets Edge
|
|
|
|
|
|
|
Re: Best way to move Oracle Home [message #435157 is a reply to message #435156] |
Mon, 14 December 2009 14:07 |
nateholtrop
Messages: 37 Registered: May 2008
|
Member |
|
|
BlackSwan wrote on Mon, 14 December 2009 13:57>How can I disable a listener from attempting to run out of my new oracle_home?
Do not start it
If you want listener process to run from "old home",
then make sure OLD_HOME/bin is in PATH & not NEW_HOME/bin
It is your environment to control as you deem appropriate
Not starting it is great but I'm sure we all know how our minds aren't the sharpest at 3am in the morning when a db is down. Thank you for the PATH suggestion I implemented that. Thanks
|
|
|