easy, fast cloning ORACLE_HOME
updated 27.4.2012
Building a master-installation for cloing has multiple benefits
- a new Oracle installation can be done very fast
- all clones from the master are identical – e.g. no one off is missing
- the installation can be scripted very easy, no creation of responsefile necessary
Quick overview
create tarfile from master
extract tarfile to the new location
start clone
that’s all 😉
Ensure you don’t install any options or features you’ve no licence for.
Create your new stage
- Install 11.1.0 base release
- patch up to the latest patchset (e.g.11.1.0.7)
- install psu (patchset update) (e.g. 11.1.0.7.1)
- and one off bugfixes (if required)
Check before installing the according installation guides to avoid installation problems.
After creating this “master-installation” create a tar file (relative directory)
e.g.
cd $ORACLE_HOME
cd ..
tar -cvf ora-master-install_111071.tar <directory name of ORACLE_HOME>
In this case you are able to change the new ORACLE_HOME to any other location ..
If you tar the directory full qualified, you can only extract it to the same location; this would make you less flexible.
CAUTION:
If you packaged cpu/psu or oneoffs a hidden directory (.patch_storage) in Oracle_home will be created.
When installing afterwards on a cloned environment a additional patch which will rollback an already installed one, the apply will fail.
So check after untar the file on the target side, whether there is a .patch_storage directory in your ORACLE_HOME
This happens due to the missing .patch_storage
You see, a simple hidden directory is quite important!
When you already run into this problem :
– create a new installation on a seperate machine / environment
– install the missing cpu/psu/oneoffs
– tar .patch_storage
– untar this “fix” on the “corrupted” environment.
1. Cloning from master-installation
logon as software owner
extract the tar-file to
/opt/oracle/product/11.1.0/db_1
2. setting the environment
export ORACLE_HOME=/opt/oracle/product/11.1.0/db_1
export HOME_NAME=11gR1HOME1
export ORACLE_BASE=/opt/oracle
export ORACLE_HOSTNAME=oradev
export TMP=/opt/oracle/tmp
export PATH=$ORACLE_HOME/bin:$PATH
3. create Oracle inventory file oraInst.loc
mkdir -p /opt/oracle/oraInventory
echo “inventory_loc=/opt/oracle/oraInventory” > /opt/oracle/oraInst.loc
echo “inst_group=dba” >> /opt/oracle/oraInst.loc
4. start cloning
ORACLE_BASE=”$ORACLE_BASE” -waitforcompletion
(all above in one line)
the clone should finish successful
that’s all – quite simple and fast !!
additonal hints :
- create multiple master-installations
– master image without any options
– another one with used options (e.g.partitioning) - change for each master-installation a unique ORACLE_HOME_NAME
so it’s easier for you to identify your origin master - don’t believe in this ORACLE_HOME_NAME without checking patches wit opatch lsinventory
RunInstaller fail with a segmentation fault in the Java layer
This error might occur on AIX platforms
Just set
export JAVA_COMPILER=NONE
and restart the runInstaller
any other hints ? please let me know
test this in your enviromentÂ
Awesome …I am stuck with this Java error and your blog helped me to solve that out…Thanks a lot for sharing this information..