克隆 clone Oracle 軟體

beatony發表於2012-10-03
1.檢查源庫和目標庫的OS,Oracle版本是否相同.
2.確保$ORACLE_HOME卷有足夠的空間放置tar備份。
cd $ORACLE_HOME
cd ..
tar -cvfp 空閒路徑 /$(Oracle_SID)soft.tar 10.2.0
3. 配置Oracle使用者或其他專有使用者的環境變數
vi .profile
 -- 更改其中的 $ORACLE_HOME, $ORACLE_SID, $ORACLE_BASE
./.profile 使之環境變數生效.

(1),
    su - root
     cd /u01/data
     mkdir app
    cd $HOME/..
    mkdir  -p app/oracle/product
(2), cd $HOME/../app/oracle
     mkdir -p admin/$ORACLE_SID flash_recovery_area oraInventory 
     cd admin/$ORACLE_SID
     mkdir adump bdump cdump udump dpdump
(3), cd $HOME/../app
vi oraInst.loc
##oraInst.loc檔案內容,vi時注意去掉尾部空格
##(注意:$ORACLE_BASE/oraInventory,要寫絕對路徑)
inventory_loc= $ORACLE_BASE/oraInventory
inst_group=dba
4.解壓soft.tar 到新的目錄
5. 開始克隆,
"$ORACLE_HOME/oui/bin/runInstaller  -invPtrLoc $HOME/../app/oraInst.loc -silent -clone ORACLE_HOME=""新$ORACLE_HOME 的絕對路徑"" ORACLE_HOME_NAME=""oracle_home_$ORACLE_SID""
clone成功最後會要求執行root.sh.
=====
Starting Oracle Universal Installer...

You can find a log of this install session at:
 data/app/oracle/oraInventory/logs/cloneActions2012-09-29_07-22-40PM.log
.................................................................................................... 100% Done.
 
Installation in progress (Sat Sep 29 19:22:53 CST 2012)
...............................................................................................                                 95% Done.
Install successful
Linking in progress (Sat Sep 29 19:23:00 CST 2012)
Link successful
Setup in progress (Sat Sep 29 19:24:07 CST 2012)
Setup successful
End of install phases.(Sat Sep 29 19:24:12 CST 2012)
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script. to run
data/app/oracle/product/10.2.0/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
The cloning of oracle_home_BCAS was successful.
======
6.驗證Orace soft 是否clone 成功.
 opatch lsinventory -invPtrLoc $HOME/../app/oraInst.loc
====
Invoking OPatch 10.2.0.3.3
Oracle interim Patch Installer version 10.2.0.3.3
Copyright (c) 2007, Oracle Corporation.  All rights reserved..
--------------------------------------------------------------------------------
Installed Top-level Products (2):
Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 2                            10.2.0.3.0
There are 2 products installed in this Oracle Home.
Interim patches (85) :
OPatch succeeded.
 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22578826/viewspace-745554/,如需轉載,請註明出處,否則將追究法律責任。

相關文章