10g,11g中的資料庫克隆安裝

不一樣的天空w發表於2017-11-30
有時候在很多工作環境中,如果彼此幾個機器的配置相似,我們就可以不用一遍又一遍的安裝資料庫軟體了,我們可以為了更快的完成安裝工作,在靜默安裝,圖形安裝的選擇之外,還有克隆安裝。不過在10g,11g的版本中還是存在一定的差別。雖然方法有差別,但是思路都是一致的。<br /> 我們可以從源環境中直接把ORACLE_HOME給打個包,在目標環境解壓即可。這個時候儘管你去嘗試sqlplus,exp這些工具也能用,但是還是存在很大的風險,畢竟別把它當成綠色版的。出了問題誰都兜不住。<br /> 11g的環境中,可以使用下面的方式來安裝。<br /> 到達$ORACLE_HOME/clone目錄下,執行下面的指令碼即可。輸入的引數為ORACLE_HOME,還有ORACLE_HOME的名字,這個可以自己定義。<br /> $ perl clone.pl ORACLE_BASE=/U01/app/oracle ORACLE_HOME=/U01/app/oracle/product/11.2.0.2/db_1 &nbsp;ORACLE_HOME_NAME=OraDb10g_home1<br /> ./runInstaller -clone -waitForCompletion &nbsp;"ORACLE_BASE=/U01/app/oracle" "ORACLE_HOME=/U01/app/oracle/product/11.2.0.2/db_1" "ORACLE_HOME_NAME=OraDb10g_home1" -silent -noConfig -nowait&nbsp;<br /> Starting Oracle Universal Installer...<br /> Checking swap space: must be greater than 500 MB. &nbsp; Actual 16383 MB &nbsp; &nbsp;Passed<br /> Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-24_11-19-08AM. Please wait ...Oracle Universal Installer, Version 11.2.0.3.0 Production<br /> Copyright (C) 1999, 2011, Oracle. All rights reserved.<br /> You can find the log of this install session at:<br /> &nbsp;/home/oracle/oraInventory/logs/cloneActions2015-07-24_11-19-08AM.log<br /> .................................................................................................... 100% Done.<br /> <br /> Installation in progress (Friday, July 24, 2015 11:19:16 AM CST)<br /> ............................................................................... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 79% Done.<br /> Install successful<br /> <br /> Linking in progress (Friday, July 24, 2015 11:19:23 AM CST)<br /> Link successful<br /> <br /> Setup in progress (Friday, July 24, 2015 11:20:00 AM CST)<br /> Setup successful<br /> <br /> End of install phases.(Friday, July 24, 2015 11:20:23 AM CST)<br /> 然後根據提示使用root執行兩個指令碼即可。<br /> 10g的資料庫軟體就得換個方式,<br /> &nbsp;$ORACLE_HOME/oui/bin/runInstaller -clone -silent -ignorePreReq ORACLE_HOME="$ORACLE_HOME" ORACLE_HOME_NAME="OraDb10g_home1"<br /> Starting Oracle Universal Installer...<br /> .................................................................................................... 100% Done.<br /> Installation in progress (Friday, July 24, 2015 2:33:50 PM CST)<br /> .......................................................................... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;74% Done.<br /> Install successful<br /> <br /> Linking in progress (Friday, July 24, 2015 2:34:03 PM CST)<br /> Link successful<br /> Setup in progress (Friday, July 24, 2015 2:34:03 PM CST)<br /> Setup successful<br /> End of install phases.(Friday, July 24, 2015 2:34:06 PM CST)<br /> 然後根據提示執行一個指令碼。<br /> <br /> <span style="white-space:normal;">如果拿11g的ORACLE_HOME採用10g的思路,報出的錯誤都讓人摸不著頭腦,因為ORACLE_BASE早就指定了。</span><span style="white-space:normal;"></span><br /> <span style="white-space:normal;">&nbsp;$ORACLE_HOME/oui/bin/runInstaller -clone -silent -ignorePreReq ORACLE_HOME="$ORACLE_HOME" ORACLE_HOME_NAME="OraDb10g_home1"</span><br /> Checking swap space: must be greater than 500 MB. &nbsp; Actual 16383 MB &nbsp; &nbsp;Passed<br /> Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-24_10-34-10AM. Please wait ...[oracle@smbionline ~]$ Oracle Universal Installer, Version 11.2.0.3.0 Production<br /> Copyright (C) 1999, 2011, Oracle. All rights reserved.<br /> <br /> You can find the log of this install session at:<br /> /U01/app/oraInventory/logs/cloneActions2015-07-24_10-34-10AM.log<br /> <span style="background-color:#FFE500;">Values for the following variables could not be obtained from the command line or response file(s):&nbsp;</span><br /> <span style="background-color:#FFE500;"> &nbsp;ORACLE_BASE&nbsp;</span><br /> Cloning cannot continue.<br /> 不過對於這種克隆方式還是需要簡單驗證一下,如果出現了意料之外的問題就是弄巧成拙了。<br />

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

相關文章