Wednesday, June 17, 2015

Clone Oracle Home (using 12c as example)

Copy Oracle Home

root@solaris112:/u01/app/oracle/product/12.1.0# cp -rp dbhome_1 dbhome_2

Run the Clone Script:

oracle@solaris112:/u01/app/oracle/product/12.1.0/dbhome_2/bin$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/u01/app/oracle" ORACLE_HOME="/u01/app/oracle/product/12.1.0/dbhome_2" OSDBA_GROUP=dba ORACLE_HOME_NAME=Cloned_Home
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u01/app/oracle" "ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_2" "oracle_install_OSDBA=dba" "ORACLE_HOME_NAME=Cloned_Home" -silent -paramFile /u01/app/oracle/product/12.1.0/dbhome_2/clone/clone_oraparam.ini
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 3923 MB    Passed
Checking swap space: must be greater than 500 MB.   Actual 4101 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-06-18_05-05-46AM. Please wait ...You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2015-06-18_05-05-46AM.log
..................................................   5% Done.
..................................................   10% Done.
..................................................   15% Done.
..................................................   20% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   35% Done.
..................................................   40% Done.
..................................................   45% Done.
..................................................   50% Done.
..................................................   55% Done.
..................................................   60% Done.
..................................................   65% Done.
..................................................   70% Done.
..................................................   75% Done.
..................................................   80% Done.
..................................................   85% Done.
..........
Copy files in progress.

Copy files successful.

Link binaries in progress.

Link binaries successful.

Setup files in progress.

Setup files successful.

Setup Inventory in progress.

Setup Inventory successful.

Finish Setup successful.
The cloning of Cloned_Home was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2015-06-18_05-05-46AM.log' for more details.

Setup Oracle Base in progress.

Setup Oracle Base successful.
..................................................   95% Done.

As a root user, execute the following script(s):
        1. /u01/app/oracle/product/12.1.0/dbhome_2/root.sh



..................................................   100% Done.

oracle@solaris112:/u01/app/oracle/product/12.1.0/dbhome_2/bin$ sudo /u01/app/oracle/product/12.1.0/dbhome_2/root.sh
Check /u01/app/oracle/product/12.1.0/dbhome_2/install/root_solaris112_2015-06-18_05-11-44.log for the output of root script

Post Verification:

oracle@solaris112:/u01/app/oracle/product/12.1.0/dbhome_2/bin$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2015, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version    : 12.1.0.1.3
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2015-06-18_05-22-39AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/lsinv/lsinventory2015-06-18_05-22-39AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.



oracle@solaris112:/u01/app/oracle/product/12.1.0/dbhome_2/bin$ grep dbhome_1 *|awk -F":" '{print $1}'|uniq
aqxmlctl.ouibak
aqxmlctl.ouibak.1
bndlchk.ouibak
bndlchk.ouibak.1
chopt.ini.ouibak
chopt.ini.ouibak.1
chopt.ouibak
chopt.ouibak.1
chopt.pl.ouibak
chopt.pl.ouibak.1
dbca.ouibak
dbca.ouibak.1
dbua.ouibak
dbua.ouibak.1
diagsetup.ouibak
diagsetup.ouibak.1
dropjava.ouibak
dropjava.ouibak.1
emca.ouibak
emca.ouibak.1
eusm.ouibak
eusm.ouibak.1
extusrupgrade.ouibak
extusrupgrade.ouibak.1
kfod.ouibak
kfod.ouibak.1
ldifmigrator.ouibak
ldifmigrator.ouibak.1
loadjava.ouibak
loadjava.ouibak.1
netca_deinst.sh.ouibak
netca_deinst.sh.ouibak.1
netca.ouibak
netca.ouibak.1
netmgr.ouibak
netmgr.ouibak.1
odisrvreg.ouibak
odisrvreg.ouibak.1
oidca.ouibak
oidca.ouibak.1
oidprovtool.ouibak
oidprovtool.ouibak.1
ojvmjava.ouibak
ojvmjava.ouibak.1
ojvmtc.ouibak
ojvmtc.ouibak.1
olsadmintool.ouibak
olsadmintool.ouibak.1
olsoidsync.ouibak
olsoidsync.ouibak.1
onsctl.ouibak
onsctl.ouibak.1
platform_common.ouibak
platform_common.ouibak.1
rconfig.ouibak
rconfig.ouibak.1
schemasync.ouibak
schemasync.ouibak.1
srvctl.ouibak
srvctl.ouibak.1
trcasst.ouibak
trcasst.ouibak.1
trcsess.ouibak
trcsess.ouibak.1
umu.ouibak
umu.ouibak.1

oracle@solaris112:/u01/app/oracle/product/12.1.0/dbhome_2/bin$ grep dbhome_2 *|awk -F":" '{print $1}'|uniq
aqxmlctl
bndlchk
chopt
chopt.ini
chopt.pl
dbca
dbua
diagsetup
dropjava
emca
eusm
extusrupgrade
kfod
lbuilder
ldifmigrator
loadjava
netca
netca_deinst.sh
netmgr
odisrvreg
oidca
oidprovtool
ojvmjava
ojvmtc
olsadmintool
olsoidsync
onsctl
platform_common
rconfig
schemasync
srvctl
trcasst
trcsess
umu


Appendix: Clone Parameters

oracle@solaris112:/u01/app/oracle/product/12.1.0/dbhome_2/bin$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl
./runInstaller -clone -waitForCompletion  -silent -paramFile /u01/app/oracle/product/12.1.0/dbhome_2/clone/bin/../../clone/clone_oraparam.ini
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 3934 MB    Passed
Checking swap space: must be greater than 500 MB.   Actual 4112 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-06-18_05-00-31AM. Please wait ...[INS-21001] ORACLE_HOME was not specified for clone.
Usage:
runInstaller  [-options] [()*]

Where options include:
  -clusterware oracle.crs,
        Version of Cluster ready services installed.

  -crsLocation
        Used only for cluster installs, specifies the path to the crs home location. Specifying this overrides CRS information obtained from central inventory.

  -invPtrLoc
        Unix only. To point to a different inventory location. The orainst.loc file contains:
inventory_loc=
inst_group=<>

  -jreLoc
        Path where Java Runtime Environment is installed. OUI cannot be run without it.

  -logLevel
        To filter log messages that have a lesser priority level than . Valid options are: severe, warning, info, config, fine, finer, finest, basic, general, detailed, trace. The use of basic, general, detailed, trace is deprecated.

  -paramFile
        Specify location of oraparam.ini file to be used by OUI.

  -responseFile
        Specifies the response file and path to use.

  -attachHome
        For attaching homes to the OUI inventory.

  -cfs
        Indicates that the Oracle home specified is on cluster file system (shared). This is mandatory when '-local' is specified so that Oracle Universal Installer can register the home appropriately into the inventory.

  -clone
        For making an Oracle Home copy match its current environment.

  -debug
        For getting the debug information from OUI.

  -detachHome
        For detaching homes from the OUI inventory without deleting inventory directory inside Oracle home.

  -enableRollingUpgrade
        Used in cluster environment, to enable upgrade of a product on a subset of nodes (on which the product was installed).

  -executeSysPrereqs
        Execute system pre-requisite checks and exit.

  -force
        Allowing silent mode installation into a non-empty directory.

  -help
        Displays above usage.

  -ignoreSysPrereqs
        For ignoring the results of the system pre-requisite checks.

  -local
        Performs the operation on the local node irrespective of the cluster nodes specified.

  -printdiskusage
        Log debug information for disk usage.

  -printmemory
        Log debug information for memory usage.

  -printtime
        Log debug information for time usage.

  -relink
        For performing relink actions on the oracle home
         Usage: -relink -maketargetsxml [-makedepsxml ] [name=value]

  -silent
        For silent mode operations, the inputs can be a response file or a list of command line variable value pairs.

  -waitforcompletion
        Installer will wait for completion instead of spawning the java engine and exiting.

  -suppressPreCopyScript
        Suppress the execution of precopy script.

  -acceptUntrustedCertificates
        Accept untrusted certificates from a secure site.

  -suppressPostCopyScript
        Suppress the execution of postcopy script.

  -noconfig
        Do not execute config tools.

  -noconsole
        For suppressing display of messages to console. Console is not allocated.

  -formCluster
        To install the Oracle clusterware in order to form the cluster.

  -remotecp
        Unix specific option. Used only for cluster installs, specifies the path to the remote copy program on the local cluster node.

  -remoteshell
        Unix specific option. Used only for cluster installs, specifies the path to the remote shell program on the local cluster node.

  -executePrereqs
        To execute only the prerequisite checks.

  -ignorePrereq
        To ignore running the prerequisite checks.

  -ignoreInternalDriverError
        To ignore any internal driver errors.

  -downloadUpdates
        To download updates only.

  -showProgress
        To show the installation progress on the console. This option is supported only in case of silent installation.

  -promptForPassword
        To provide the passwords on the console during silent installation of Oracle Database.

  -deinstall
        To Uninstall the specified home
        Usage:-home
              -help: To see detailed usage Information

Command Line Variables Usage
  Command line variables are specified using ; for example:
    [ session: | compName: | compName:version: ]variableName=" valueOfVariable"]

   Session/Installer variables are specified using:
          [session:]varName=value
    Ex 1: session:ORACLE_HOME_NAME="OraHome"
    Ex 2: ORACLE_HOME_NAME="OraHome"
    The lookup order is session:varName then just varName. The session prefix is used to avoid ambiguity.

   Component variables are specified using:
          [compInternalName:[Version:]]varName
    Ex 1: oracle.comp1:1.0.1:varName="VarValue"
    Ex 2: oracle.comp1:varName="VarValue"
    The lookup order is compInternalName:Version:varName, then compInternalName:varName, then just varName.


No comments:

Post a Comment