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博客 ” ,链接:https://blog.itpub.net/22578826/viewspace-745554/
,如需转载,请注明出处,否则将追究法律责任。