Today I was asked to clone a copy of an application running on 11.2.0.2 so I copied the db and app code onto the server and ran "oraenv" to set the environment.
However, oraenv was returning the ORACLE_BASE of the original server and not the new server. In the past I have manually changed the file oraclehomeproperties.xml
$ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml
Yes you could change the ORACLE_BASE variable but seemed a bit of a fudge.
However I thought there must be a formal way to do this. If you run orabase by itself it returns the ORACLE_BASE value but if you run it with the -s option it will allow you to change the value.
Usage: orabase [-s <New ORACLE_BASE Location>]
-s : This option will change the current value of ORACLE_BASE
in ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml
to the new ORACLE_BASE location specified.
Probably worth logging out and logging back in to get orabase to pick the correct value up.
No comments:
Post a Comment