clone and preclone

Clone準備:

1.       拷貝文件:最好用tar否則一些快捷方式就變成文件了,官方建議用cp –RH,我用過cp –rpf這些都不可以拷貝快捷方式,用tar的時候也要小心,小心把source給覆蓋了。

2.       在數據庫control文件變化的時候一定要preclone一下,否則clone的時候建control文件會失敗或者有部分文件建不進去。

3.       保險起見,檢查$ORACLE_HOME/appsutil/clone/data/stage/adcrdb.zip裏面的adcrdbclone.sql,看看source中的數據庫文件是否都已經包含進去了。

4.       拷貝完文件,檢查一下權限是否正確,如果base目錄是快捷方式,clone的時候要用絕對路徑。

5.       拷如果有條件,在clone之前把數據庫啓動,正常關閉一下看看是否正常,免得Clone時重建Control文件出錯。

6. Apps密碼和原來的數據庫必須一致

Preclone

PROD==>COMPARD

1.開啓prod

2.運行autoconfig,把xml寫到DB裏面去

先運行AP再DB

AP:

$INST_TOP/admin/scripts/adautocfg.sh

產生數據庫層的appsutil目錄

perl $AD_TOP/bin/admkappsutil.pl

記住appsutil.zip文件的位置,產生後放到DB所在的服務器上,比如放到/db目錄下。

DB:

如果$ORACLE_HOME下有appsutil.zip先做備份,然後把上一步產生的拷貝過來。

cp /db/appsutil.zip $ORACLE_HOME

備份一下appsutil這個目錄,然後把zip文件解壓,帶上-o參數,解壓完畢,執行下列動作:

cd $ORACLE_HOME/appsutil/scripts/<content>/

./adautocfg.sh

3.開始preclone

和11i差不多先DB再AP

DB:

cd $ORACLE_HOME/appsutil/scripts/<content>/

perl adpreclone.pl dbTier

AP:

cd $INST_TOP/admin/scripts/

perl adpreclone.pl appsTier

 

-------------------

/appsutil/clone/data/stage/adcrdb.zip

檢查所有的數據文件是否都已經包含了

 

Clone:

先DB後AP

DB:

設置ORACLE_HOME,PATH,ORCALE_SID這三個變量

ORACLE_HOME=/uattest/uat/db/tech_st/10.2.0

export ORACLE_HOME

PATH=$ORACLE_HOME/bin:$PATH

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH

ORACLE_SID= COMPARD

export ORACLE_SID

 

cd $ORACLE_HOME/appsutil/clone/bin

Control file need recreate:

perl adcfgclone.pl dbTier

Control file manual create:

perl adcfgclone.pl dbTechStack

<Create control manually and open database>

cd $ORACLE_HOME/appsutil/install/<CONTENT>

sqlplus "/ as sysdba" @adupdlib.sql <libext:"sl"--HP-UX,Other Unix "so" ,none for windows>

cd $ORACLE_HOME/appsutil/clone/bin

perl adcfgclone.pl dbconfig $ORACLE_HOME/appsutil/<TARGET CONTENT>.xml


 

AP

$COMMON_TOP/clone/bin/ (apps/apps_st/comn)

perl adcfgclone.pl appsTier

 

Clone的問題:

1.[APPLY PHASE]

  AutoConfig could not successfully execute the following scripts:

    Directory: /apps/uat/apps/tech_st/10.1.3/perl/bin/perl -I /apps/uat/apps/tec

h_st/10.1.3/perl/lib/5.8.3 -I /apps/uat/apps/tech_st/10.1.3/perl/lib/site_perl/5

.8.3 -I /apps/uat/apps/apps_st/appl/au/12.0.0/perl -I /apps/uat/apps/tech_st/10.

1.3/Apache/Apache/mod_perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi /apps/u

at/apps/tech_st/10.1.2/appsutil/clone

      ouicli.pl               INSTE8_APPLY       -1

 

 

AutoConfig is exiting with status 1

 

RC-50013: Fatal: Instantiate driver did not complete successfully.

/apps/uat/apps/tech_st/10.1.2/appsutil/driver/regclone.drv

 metalink給的解法:

To implement the solution, please execute the following steps:

 

1 - Initiate the "perl adcfgclone.pl appsTier" again

2 - When it appears to hang again Check if it is the 10.1.2 opmn processes are causing the hanging using:

      "ps -ef | grep opmn" If the "ps -ef | grep opmn" gives the following result it is causing this issue:

 

      <user> <PID> 28462  0 <Time> pts/ta   0:00 <10.1.2 ORACLE_HOME>/opmn/bin/opmn -a -q ping

      <user> <PID> 28459  0 <Time> pts/ta   0:00 <10.1.2 ORACLE_HOME>/opmn/bin/opmnctl stopall

 

3 - Kill the "opmn -a -q ping" and the "opmnctl stopall" using the PID's archived in step 2

 

The clone should continue now, in case it appears to hang again check if the opmn processes are started again and kill them until the clone continues.

後經過分析日誌,發現還是inventory的問題,同樣的手工修改部分文件,就可以讓3%很快過去。並且inventory存在的話,就會OK。

2.AIX上如果做了autoconfig,必須注意Error: Couldn't find per display information 問題是否還存在。

3.AIX上作了clone以後,要注意看看安裝時候的問題是否存在。

4.下面的問題,在clone的過程中會自動修復。

chown: lbuilder: A file or directory in the path name does not exist.
chown: libhsnav.so: A file or directory in the path name does not exist.
chown: hsdb_syb.so: A file or directory in the path name does not exist.
chown: hsdb_odbc.so: A file or directory in the path name does not exist.
chown: hsdb_ora.so: A file or directory in the path name does not exist.
chown: libhsbase.so: A file or directory in the path name does not exist.
chown: ldflags: A file or directory in the path name does not exist.
chown: libocci.a.10.1: A file or directory in the path name does not exist.
chown: xmlparserv2.jar: A file or directory in the path name does not exist.
chown: libXML4CMessages.a: A file or directory in the path name does not exist.
chown: libXML4CMessages54.a: A file or directory in the path name does not exist
.
chown: libicudata26.a: A file or directory in the path name does not exist.
chown: libxml4c54.a: A file or directory in the path name does not exist.
chown: libicudata26.so: A file or directory in the path name does not exist.
chown: libicuuc26.a: A file or directory in the path name does not exist.
chown: libicuuc26.so: A file or directory in the path name does not exist.
chown: libxml4c.a: A file or directory in the path name does not exist.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章