How to perform relink in Oracle


Sometimes Oracle components may start giving strange issues like coredump  or the Operating system is patched, In these cases it is always recommended to try oracle relink to resolve the issues.A Oracle relink is also necessary whenever you install a new release or a patchset or when there is a patch or upgrade to the OS environment.

Oracle relink create the new executable for the use and it can be done quickly also

Here how to perform  relink in Oracle database components

sqlplus relink

cd $ORACLE_HOME/sqlplus/lib;
make -f install;

lsnrctl relink
cd $ORACLE_HOME/network/lib;
make -f install;

oracle relink
cd $ORACLE_HOME/rdbms/lib;
make -f install

trcroute, onrsd, tnsping
cd $ORACLE_HOME/network/lib
make -f install

forms relink

cd $ORACLE_HOME/forms/lib32
Note: if this directory does not exist: cd $ORACLE_HOME/forms/lib
$ make -f install

Reports relink

cd $ORACLE_HOME/reports/lib32
Note: if this directory does not exist: cd $ORACLE_HOME/reports/lib
$ make -f install

You can relink most of the executable associated with an Oracle Server Installation

by running the following command:

$relink all

If relinking was successful, the make command will eventually return to the OSprompt without an error. There will NOT be a ‘Relinking Successful’ type message

General errors in Oracle relink

  1. Permission denied: Make sure you run as executable owner
  2. libraries missing : Make sure all the environment variables are set
  3. Sometime common utlities like ‘ld’, ‘make’, ‘cc’, ‘mv’, ‘cp’, ‘ar’ are missing

1)Before relinking Oracle, shut down both the database and the listener.
2) The following commands given above will output a lot of text to your session window. To capture this output for upload to support, redirect the output to a file.