Tuesday, May 21, 2013

Oracle Home Silent Installation/Deinstallation and Clone with Patching in Solaris

Oracle Home Silent Installation/Deinstallation and Clone with  Patching in Solaris

Oracle Home silent installation is fast as compared to GUI mode which uses minimal resources.This is much faster than GUI mode.

Following steps provide the installation/deinstallation silently and alos clone of Oracle Home, which can be done across multiple servers without installing and applying the patches for similar Oracle Home.

For fresh installation (Both Oracle Home and Patchset update):

1. To install Oracle 10g/11g with the response file (edit the response file template available in response
    folder after unzipping the downloaded Oracle installation .zip files.
2. Create a directory where the new Oralce Binaries to be installed.
     mkdir -p /u01/app/oracle/product/10205
    Prior to 11g, for any patchset release, we need to install first the base release and then install patchset.
    Eg: To install 10.2.0.2/10.2.0.3/10.2.0.4/10.2.0.5/ first we need to install 10.2.0.1.
           From 11g onwards each patchset upgrade is a new installation and doesn't require base release.
3. Edit the response file and provide the values for
            ORACLE_HOME= <complete path of folder created in Step 2>
            ORACLE_HOME_NAME="<Unique Home Identifier that reflects in Central Inventory>".
      Before proceeding with installation make sure that make/ar/ld/nm are accessible from PATH variable.
4. Invoke runinstaller from install folder of unzipped Oracle Home.
    ./runInstaller -silent -responseFile <complete path of responsefile>
5. If oraInst.loc resides in different location, use -invPtrLoc to point to exact location of oraInst.loc file.
    ./runInstaller -silent -invPtrLoc <location of oraInst.loc file> -responseFile <complete path of 
     responsefile>

Review the log file generated for any errors during installation and fix them before going for another install.

Silent Patchset installation(10.2.0.5):

Once we have Oracle installed, unzip the patchset, update the response file with "DECLINE_SECURITY_UPDATES=TRUE" to avoid error during installation regarding mail notifications.

EXPORT ORACLE_HOME=<existing ORACLE HOME which need to be patched>
./runInstaller -silent -responseFile <Patchset responsefile>

CLONE OF ORACLE HOME

Cloning of ORACLE HOME is useful when we need to install and apply patcset updated on numerous servers. Following are the theoretical steps involved while cloning Oracle Home.

1.Since ORACLE HOME is being cloned, underlying OS version,Hardware all should be similar.
2. Brig down all the services running from this home (Database/listener)
3. cd /u01/app/oracle/product
    tar -cvf 10205.tar ./10.2.0.5   (or)
    mkdir -p /backups/10205_bkp
    cd /u01/app/oracle/product/10.2.0.5
    find . -print |cpio -pdmv /backups/10205_bkp/.
    tar -cvf /backups/10205_bkp.tar /backups/10205_bkp/.
4. This tar file contains ORACLE HOME of 10.2.0.1 applied with patchset of 10.2.0.5
5. scp/ftp this tar file to server
6. untar the file in the location where we want to install ORACLE HOME
7. Attach the newly extracted ORACLE HOME to the existing inventory.
8. Before attaching the new home, take a backup of existing ORACLE Inventory.
    tar -xvf 10205_bkp.tar
9. Invoke runinstaller available from extracted new OracleHome/oui/bin
   ./runInstaller -silent -clone ORACLE_HOME= "<path to new Oracle home>" ORACLE_HOME_NAME="<Name for Oracle Home>"

    ORACLE HOME De-installation:

To deinstall Oracle Home Silently, invoke runInstaller from any uncompressed Oracle Home
Before running Remove_Homes:
/u01/app/oracle/product/10.2.0/clone/config[PLMTEST]$cat /u01/app/oracle/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2005 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="ORACLE_HOME1" LOC="/u01/app/oracle/8.1.7" TYPE="O" IDX="1"/>
<HOME NAME="ORACLE_HOME92" LOC="/u01/app/oracle/9.2.0" TYPE="O" IDX="2"/>
<HOME NAME="ora1020" LOC="/u01/app/oracle/product/10.2.0" TYPE="O" IDX="3"/>
</HOME_LIST>
</INVENTORY>
After running Remove_Homes
./runInstaller -deinstall -silent REMOVE_HOMES={"/u01/app/oracle/8.1.7"}

After everything goes successfully, the invetory.xml file reads like
/u01/app/oracle/oraInventory/ContentsXML[PLMTEST]$cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2010, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.5.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="ORACLE_HOME92" LOC="/u01/app/oracle/9.2.0" TYPE="O" IDX="2"/>
<HOME NAME="ora1020" LOC="/u01/app/oracle/product/10.2.0" TYPE="O" IDX="3"/>
<HOME NAME="ORACLE_HOME1" LOC="/u01/app/oracle/8.1.7" TYPE="O" IDX="1" REMOVED="T"/>
</HOME_LIST>
</INVENTORY>

No comments: