relink 10g 資料庫!

楊奇龍發表於2011-04-13
oracle的安裝檔案提供了經過編譯的一些元件--半成品這些元件可以透過特定的引數配合link 生成可執行檔案--成品。比如 linux下開啟aio就重新link oracle執行檔案。
當oracle軟體出現問題或例如os升級的時候,例如,剛從別的機器把軟體打包過來的時候也會用到。
不是用編譯器編譯一吧,只要重新link就可以了,安裝過程中 介面就有一個顯示 link 的過程。
------------------------
在源庫上:將源端資料庫的oracle資料庫檔案(不包含資料檔案dbf, log )
oracle@r05g02020-vm2.yh.com:/opt/oracle>ll
total 48
drwxr-xr-x 4 oracle oinstall 4096 Apr  1 22:07 10g
drwxr-xr-x 3 oracle oinstall 4096 Apr  1 13:34 admin
drwxr-xr-x 2 oracle oinstall 4096 Apr  1 13:34 flash_recovery_area
drwxr-xr-x 4 oracle oinstall 4096 Apr  1 13:34 oradata
drwxrwxr-x 6 oracle oinstall 4096 Apr  1 18:27 oraInventory
drwxr-xr-x 3 oracle oinstall 4096 Apr  1 13:34 products
oracle@r05g02020-vm2.yh.com:/home/oracle>scp -r flash_recovery_area  oracle@10.249.13.11:/opt/oracle/
oracle@r05g02020-vm2.yh.com:/home/oracle>scp -r products  oracle@10.249.13.11:/opt/oracle/
oracle@r05g02020-vm2.yh.com:/home/oracle>scp -r admin oracle@10.249.13.11:/opt/oracle/
oracle@r05g02020-vm2.yh.com:/home/oracle>scp -r 10g oracle@10.249.13.11:/opt/oracle/
oracle@r05g02020-vm2.yh.com:/home/oracle>scp -r oraInventory oracle@10.249.13.11:/opt/oracle/
在目標庫上
root@r01c05011.yh.com # su - oracle
oracle@r01c05011.yh.com:/home/oracle>cd $ORACLE_HOME/rdbms/lib
oracle@r01c05011.yh.com:/opt/oracle/products/10.2.0/rdbms/lib>ls
config.c      hormc.o       kkxwtp.o   kzlnlbac.o      rfscom.o    skfodpt.o   tg4pwd.o
config.o      hormd.o       kopc.o     libdbtools10.a  rfsd.o      skrmpt.o    tstshm.o
cursize.o     horm.o        kprnts.o   libdsga10.a     rfsin.o     skrnpt.o    ttcoerr.o
dbfsize.o     hormt.o       kprwts.o   libknlopt.a     rfsxc.o     skrspt.o    ttcsoi.o
defopt.o      hout.o        kpucb.o    libodm10.a      s0exudrv.o  sllfls.o    wpspldrv.o
dmndm.o       hsxaora.o     kpudfo.o   libperfsrv10.a  s0impdrv.o  srfsd.o     xaondy.o
dmndmse.o     ins_rdbms.mk  kpundf.o   libqsmashr.a    s0kudbv.o   ssbbded.o   xaonsl.o
dmwdm.o       jox.o         ksms.o     libskgxns.a     s0kuzr.o    sskfeded.o  xsnoolap.o
dumpsga.o     joxoff.o      ksnkcs.o   libskgxpd.a     s0kvpf.o    sskfoded.o  xsyeolap.o
env_rdbms.mk  kciwcx.o      ksnkkpo.o  libskgxpu.a     s0udexp.o   sskrmed.o   zsmsdrv.o
genezi.o      kcsm.o        ksnktd.o   libxdb.a        s0udimp.o   sskrned.o
genksms.o     kfod.o        ksnnni.o   mapsga.o        sbbdpt.o    sskrsed.o
hoaoci.o      kgupc.o       ksnnt2.o   maxmem.o        shorm.o     ssoraed.o
hoat.o        kgutc.o       ktd.o      nmliblist       shou.o      sstrced.o
hoax.o        kkpoban.o     kxmnsd.o   opimai.o        sjsex.o     strcpt.o
homts.o       kkxntp.o      k**d.o   osh.o           skfedpt.o   sulmain.o
在$ORACLE_HOME/rdbms/lib 中執行 relink oracle
oracle@r01c05011.yh.com:/opt/oracle/products/10.2.0/rdbms/lib>relink oracle
chmod 755 /opt/oracle/products/10.2.0/bin
Using deferred protocol..

 - Linking Oracle
rm -f /opt/oracle/products/10.2.0/rdbms/lib/oracle
gcc  -o /opt/oracle/products/10.2.0/rdbms/lib/oracle -L/opt/oracle/products/10.2.0/rdbms/lib/ -L/opt/
 - Linking DB*Verify utility (dbv)
rm -f /opt/oracle/products/10.2.0/rdbms/lib/dbv
gcc -o /opt/oracle/products/10.2.0/rdbms/lib/dbv -L/opt/oracle/products/10.2.0/rdbms/lib/

 - Linking Agent Control Utility
rm -f /opt/oracle/products/10.2.0/rdbms/lib/agtctl
gcc -o /opt/oracle/products/10.2.0/rdbms/lib/agtctl -L/opt/oracle/products/10.2.0/rdbms/lib/ -L/opt/oracle/products/10.2.0/lib/ -L/opt/oracle/products/10.2.0/lib/stubs/   /opt/oracle/products/10.2.0/rdbms/lib/hout.o /opt/oracle/products/10.2.0/rdbms/lib/defopt.o  /opt/oracle/products/10.2.0/rdbms/lib/homts.o            /opt/oracle/products/10.2.0/rdbms/lib/shou.o -lagtsh -lpls10  -lplp10 -lpthread  -lclntsh -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 /opt/oracle/products/10.2.0/lib/libgeneric10.a   `cat /opt/oracle/products/10.2.0/lib/sysliblist` -Wl,-rpath,/opt/oracle/products/10.2.0/lib -lm    `cat /opt/oracle/products/10.2.0/lib/sysliblist` -ldl -lm   -L/opt/oracle/products/10.2.0/lib  -lvsn10
mv -f /opt/oracle/products/10.2.0/bin/agtctl /opt/oracle/products/10.2.0/bin/agtctlO
mv /opt/oracle/products/10.2.0/rdbms/lib/agtctl /opt/oracle/products/10.2.0/bin/agtctl
chmod 751 /opt/oracle/products/10.2.0/bin/agtctl

 - Linking HS ORACLE/OCI agent
rm -f /opt/oracle/products/10.2.0/rdbms/lib/hsalloci
gcc -o /opt/oracle/products/10.2.0/rdbms/lib/hsalloci -L/opt/oracle/products/10.2.0/rdbms/lib/ -L/opt/oracle/products/10.2.0/lib/ -L/opt/oracle/products/10.2.0/lib/stubs/   /opt/oracle/products/10.2.0/rdbms/lib/shorm.o /opt/oracle/products/10.2.0/rdbms/lib/horm.o    /opt/oracle/products/10.2.0/rdbms/lib/defopt.o  /opt/oracle/products/10.2.0/rdbms/lib/homts.o                 /opt/oracle/products/10.2.0/rdbms/lib/hoaoci.o /opt/oracle/products/10.2.0/rdbms/lib/hsxaora.o /opt/oracle/products/10.2.0/rdbms/lib/xaondy.o -lagtsh -lpls10  -lplp10 -lpthread  -lclntsh -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 /opt/oracle/products/10.2.0/lib/libgeneric10.a   `cat /opt/oracle/products/10.2.0/lib/sysliblist` -Wl,-rpath,/opt/oracle/products/10.2.0/lib -lm    `cat /opt/oracle/products/10.2.0/lib/sysliblist` -ldl -lm   -L/opt/oracle/products/10.2.0/lib  -lvsn10
mv -f /opt/oracle/products/10.2.0/bin/hsalloci /opt/oracle/products/10.2.0/bin/hsallociO
mv /opt/oracle/products/10.2.0/rdbms/lib/hsalloci /opt/oracle/products/10.2.0/bin/hsalloci
chmod 751 /opt/oracle/products/10.2.0/bin/hsalloci
 省略。。

- Linking Recovery Framework utility (DRSMGRL)
gcc -o /opt/oracle/products/10.2.0/rdbms/lib/dgmgrl -L/opt/oracle/products/10.2.0/rdbms/lib/
================
oracle@r01c05011.yh.aliyun.com:/opt/oracle/products/10.2.0/rdbms/lib>make -f ins_rdbms.mk install
chmod 755 /opt/oracle/products/10.2.0/bin
rm -f oracle dbv tstshm maxmem orapwd dbfsize cursize genoci extproc extproc32 hsalloci hsots hsdepxa dgmgrl dumpsga mapsga osh sbttest expdp impdp imp exp sqlldr rman            nid extjob extjobo genezi ikfod grdcscan  /opt/oracle/products/10.2.0/rdbms/lib/ksms.s /opt/oracle/products/10.2.0/rdbms/lib/ksms.o

 - Linking DB*Verify utility (dbv)
rm -f /opt/oracle/products/10.2.0/rdbms/lib/dbv
 - Linking Oracle
rm -f /opt/oracle/products/10.2.0/rdbms/lib/oracle
gcc  -o /opt/oracle/products/10.2.0/rdbms/lib/oracle -L/opt/oracle/products/10.2.0/rdbms/lib/ -L/opt/oracle/products/10.2.0/lib/ -L/opt/oracle/products/10.2.0/lib/stubs/

省略部分輸出。
測試relink結果。
oracle@r01c05011.yh.com:/home/oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 13 16:18:41 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL>
SQL>
SQL> exit

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

相關文章