relink 10g 数据库!

简介:
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 
相关文章
|
Oracle 关系型数据库 数据库
|
存储 Oracle 关系型数据库
Oracle 10g通过创建物化视图实现不同数据库间表级别的数据同步
Oracle 10g通过创建物化视图实现不同数据库间表级别的数据同步
|
SQL Oracle 关系型数据库
|
存储 Oracle 关系型数据库
|
Oracle 关系型数据库 数据库