一.11gR2 中 Relink 脚本说明


From 11GR2(11.2.0.1,11.2.0.2 etc...) the relink script no longer scans for *.mk files andno longer runs the make commands (that is what it used to do in 11.1 and lowerversions).


从Oracle 11gR2 开始,Oracle 对relink脚本进行了修改。从Oracle11.2.x开始,relink 脚本不在扫描*.mk 和执行make命令。所有的relink操作都是通过runInstaller的方法来进行,关于11gR2中Relink的新特性,参考MOS文档。

       Oracle11gR2 Relink New Feature [ID 883299.1]


A compatibilityscript was put in place for 11gR2 so if someone runs "relink all" itwill actually use the runInstaller method of relinking. 

--为了脚本的兼容性,即使在11gR2中执行relink all,实际上也是使用runInstaller的方法来进行relink


One exception in11.2.0.1: Sun Sparc Solaris which for scan of *.mk and make are still in use.

--这里的例外是Sun Sparc 下的11.2.0.1,其还是扫描*.mk和执行make命令。



二.在11gR2中使用relink脚本


       Oracle11gR2 有两种来relink 所有的product binaries.


2.1 传统的relink


直接运行$ORACLE_HOME/bin/relink脚本,可以添加all 参数,也可以省略,因为默认情况下使用的也是all 参数。 如:


% $ORACLE_HOME/bin/relink all

% $ORACLE_HOME/bin/relink ( By default it takes the 'all' parameter )


注意:

       该方法仅为了向前的兼容性,因为11.2.x 之前版本使用的是这种方法。


2.2 使用runInstaller 运行relink

       这个是11.2.x中的新特性,命令如下:


  -relink :For performing relink actions on the oracle home

         Usage: -relink -maketargetsxml <location of maketargetsxml>[-makedepsxml <location of makedepsxml>] [name=value]


示例:

$ORACLE_HOME/oui/bin/runInstaller -relink -waitForCompletion -maketargetsxml $ORACLE_HOME/inventory/make/makeorder.xml  -logLocation$ORACLE_HOME/install ORACLE_HOME=$ORACLE_HOME >$ORACLE_HOME/install/relink.log 2>&1


三.查看Relink log


3.1 Case 1

       如果直接使用OUI 来执行relink,那么默认就不会生成:$ORACLE_HOME/install/relink.log的log文件,这时我们就需要显示的指定输出log。命令如下:


$ORACLE_HOME/oui/bin/runInstaller -relink-waitForCompletion -maketargetsxml $ORACLE_HOME/inventory/make/makeorder.xml-logDir $ORACLE_HOME/install ORACLE_HOME=$ORACLE_HOME >$ORACLE_HOME/install/relink.log 2>&1


3.2 Case 2

       如果我们使用的是relink all命令,这种情况下默认会生成relink.log的log文件,如果存在relink.log 的文件,也不会继续追加到已经存在的log文件后面,而是使用timestamp对已经存在的文件进行重命名,如:relinkActions2009-09-14_09-01-10-PM.log,然后在写relink.log.