Thứ Sáu, 26 tháng 5, 2017

[ORACLE 11G] Clone Oracle Software

Node Source[May tar when instance is runnning]:

1/ cd /u01/app/oracle/product/11.2.0/
2/ tar -cvf dbhome_1.tar dbhome_1
3/ scp dbhome_1.tar root@10.1.14.173:/u01/app/oracle/product/11.2.0

Node Target:

1/ cd /u01/app/oracle/product/11.2.0
2/ tar -xvf dbhome_1.tar
3/ dc_ptud_test02:oracle11:/u01/app/oracle/product/11.2.0/dbhome_1>cat oraInst.loc

inventory_loc=/u01/app/oraInventory
inst_group=oinstall


4/ mkdir -p /u01/app/oraInventory/ContentsXML
5/ cd /u01/app/oraInventory/ContentsXML
6/ vi inventory.xml


<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.4.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="1">
</HOME>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

7/ ln -s /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc /etc/oraInst.loc
8/ cd $ORACLE_HOME/oui/bin
9/ ./runInstaller -detachHome ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
10/ cd $ORACLE_HOME/clone/bin
11/ dc_ptud_test02:oracle11:/u01/app/oracle/product/11.2.0/dbhome_1/clone/bin>perl clone.pl ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 ORACLE_HOME_NAME=OraDb11g_home1
********************************************************************************

Your platform requires the root user to perform certain pre-clone
OS preparation.  The root user should run the shell script 'rootpre.sh' before
you proceed with cloning.  rootpre.sh can be found at
/u02/app/oracle/product/11.2.0/dbhome_1/clone directory.
Answer 'y' if the root user has run 'rootpre.sh' script.

********************************************************************************

Has 'rootpre.sh' been run by the root user? [y/n] (n)
y
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u01/app/oracle" "ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1" "ORACLE_HOME_NAME=OraDb11g_home1" -silent -noConfig -nowait
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 32768 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-05-26_11-03-56AM. Please wait ...Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.

You can find the log of this install session at:
 /u01/app/oracle/products/oraInventory/logs/cloneActions2017-05-26_11-03-56AM.log
.................................................................................................... 100% Done.



Installation in progress (Friday, May 26, 2017 11:04:21 AM GMT+07:00)
..............................................................................                                                  78% Done.
Install successful

Linking in progress (Friday, May 26, 2017 11:04:27 AM GMT+07:00)
Link successful

Setup in progress (Friday, May 26, 2017 11:05:27 AM GMT+07:00)
Setup successful

End of install phases.(Friday, May 26, 2017 11:05:51 AM GMT+07:00)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
   
The cloning of OraDb11g_home1 was successful.
Please check '/u01/app/oracle/products/oraInventory/logs/cloneActions2017-05-26_11-03-56AM.log' for more details.

12/ Run script in root user: /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Không có nhận xét nào: