Sunday, June 22, 2014

clone 12c oracle home


1. Make sure that no process is using the oracle home , which needs to be cloned.

ps  -ef | grep $RDBMS_USER

2.Create zip file of the oracle home
[oracle@ol6-112-rac1 shared_data]$ zip -r ORACLE_HOME_12C $ORACLE_HOME
[oracle@ol6-112-rac1 shared_data]$ ls -ltr
total 2806596
-rw-r--r-- 1 oracle oinstall 2873945761 Jun 23 09:56 ORACLE_HOME_12C.zip

3.Copy the files to the target host
4.Unzip the zip file ORACLE_HOME_12c.zip

[oracle@ol6-112-rac2 orcl]$ ls -ltr
total 2806596
drwxr-x--- 2 oracle oinstall       4096 Jun  3 18:49 orcl
-rw-r--r-- 1 oracle oinstall 2873945761 Jun 23 09:56 ORACLE_HOME_12C.zip
[oracle@ol6-112-rac2 orcl]$ unzip -d / ORACLE_HOME_12C.zip
                 unable to process u03/app/oracle/product/12.1.0/dbhome_1/jdk/lib/visualvm/platform/config/Modules/org-netbeans-modules-sendopts.xml.
checkdir error:  cannot create /u03/app
                 Permission denied
                 unable to process u03/app/oracle/product/12.1.0/dbhome_1/jdk/lib/visualvm/platform/config/Modules/org-netbeans-modules-editor-mimelookup-impl.xml.
checkdir error:  cannot create /u03/app
                 Permission denied
                 unable to process u03/app/oracle/product/12.1.0/dbhome_1/jdk/lib/visualvm/platform/config/Modules/org-openide-actions.xml.
checkdir error:  cannot create /u03/app

su - root
Password:
[root@ol6-112-rac2 ~]# mkdir -p /u03/app
[root@ol6-112-rac2 ~]# chown -Rf oracle:oinstall /u03/app
[root@ol6-112-rac2 ~]# exit
logout
[oracle@ol6-112-rac2 orcl]$ unzip -d / ORACLE_HOME_12C.zip
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/utlsmtp.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/exfpatch.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtrc.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtbipk.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmsredacta.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/libqsmashr.def
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catblock.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmsxdbc.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/pubcust.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtxml.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtatsk.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtrawb.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtesch.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtperf.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/sblisins.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtbsmc.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtbiat.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvsemxi.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catxdbapp.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/utledtol.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/awrddrpt.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtxlsb.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmspsp.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catxdbvr.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/utlxmv.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvthlut.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/initjvm5.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catsumaa.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/wwvdocs.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/mgdsys.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/sbreport.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/initscfw.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/execaq.sql

5.Run the clone.pl script found in the $ORACLE_HOME/clone/bin directory
[oracle@ol6-112-rac2 dbhome_1]$ $ORACLE_HOME/perl/bin/perl  /u03/app/oracle/product/12.1.0/dbhome_1/clone/bin/clone.pl ORACLE_BASE="/u03/app/oracle" ORACLE_HOME="/u03/app/oracle/product/12.1.0/dbhome_1" OSDBA_GROUP=oinstall -defaultHomeName
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u03/app/oracle" "ORACLE_HOME=/u03/app/oracle/product/12.1.0/dbhome_1" "oracle_install_OSDBA=oinstall" -defaultHomeName  -silent -paramFile /u03/app/oracle/product/12.1.0/dbhome_1/clone/clone_oraparam.ini
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 6323 MB    Passed
Checking swap space: must be greater than 500 MB.   Actual 4093 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-06-23_10-33-15AM. Please wait ...You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2014-06-23_10-33-15AM.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.
..................................................   90% Done.
..................................................   95% Done.

Copy files in progress.

Copy files successful.

Link binaries in progress.
Setup files in progress.

Setup files successful.

Setup Inventory in progress.

Setup Inventory successful.

Finish Setup in progress.

Finish Setup successful.
The cloning of OraHome1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2014-06-23_10-33-15AM.log' for more details.

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


..................................................   100% Done.
[oracle@ol6-112-rac2 dbhome_1]$ su - root
Password:
[root@ol6-112-rac2 ~]# sh /u03/app/oracle/product/12.1.0/dbhome_1/root.sh
Check /u03/app/oracle/product/12.1.0/dbhome_1/install/root_ol6-112-rac2.localdomain_2014-06-23_10-49-40.log for the output of root script
exit

No comments: