Oracle relink utility is used to manually relink Oracle product executables. You must set the ORACLE_HOME environment variable before executing relink. relink invokes the appropriate makefile based on the parameter passed to it.
Syntax:
relink all | oracle | network | client | | client_sharedlib | {interMedia | ctx} | precomp | utilities | oemagent | ldap
Parameters
Parameter | Description |
---|---|
all | Relinks everything that has been installed. |
oracle | Relinks Oracle database executable only. |
network | Relinks net_client, net_server, and so on. |
client | Relinks net_client, otrace, plsql. |
client_sharedlib | Relinks net_client. |
{interMedia | ctx} | Relinks Oracle TEXT utilities. |
precomp | Relinks all installed precompilers. |
utilities | Relinks utilities. |
oemagent | Relinks oemagent. |
ldap | Relinks LDAP/OID executable. |
Examples
To relink only the Oracle database executable, run the following command:
$ relink oracle
Few Important Info on Relinking
1. Relinking concept is applicable for Unix platform only, relinking does not occur in Windows OS.
2. Oracle Home relinking is required to link Oracle provided object files to the OS system library. Relinking guarantees a reliable integration with functions provided by the OS system libraries.
3. Relinking occurs automatically under these circumstances:
- An Oracle Database has been installed with Oracle Universal Installer (OUI)
- An Oracle Database Patchset has been applied via Oracle Universal Installer (OUI)
- An Oracle Database Patch has been applied using “opatch tool”.
4. Relinking can also be performed manually.
5. Oracle recommends to perform manual relinking of Oracle Home Binaries after OS Upgrade , Patching , Downgrade or removal of the Patch or any change which impact OS library behavior . Successful relinking shows Oracle Executable are properly linked with OS binaries.
Steps for Relinking
1. Set Environment Variables:
- ORACLE_HOME
- PATH to $ORACLE_HOME/bin
- LD_LIBRARY_PATH to $ORACLE_HOME/lib:/usr/lib
2. Set umask to “022”:
$ umask 022
3. Stops all Oracle Instances accessing the ORACLE_HOME, listener, sql plus etc.
4. Execute the relink command :
$ORACLE_HOME/bin/relink all
The Output will be written to $ORACLE_HOME/install/relink.log file. In place of “all”, you can enter a specific component to relink such as, oracle, network, client etc. The manual relinking logs can also be collected using unix redirection feature:
$ORACLE_HOME/bin/relink all >> relink.out
5. Executing “relink all” will reset the ownership and permission for root owned files. After “relink all”, it is recommended to change the ownership and permission back. So, check the permission and ownership of the below files:
# chown root $ORACLE_HOME/bin/oradism # chmod 4750 $ORACLE_HOME/bin/oradism # chown root $ORACLE_HOME/bin/extjob # chmod 4750 $ORACLE_HOME/bin/extjob # chown root $ORACLE_HOME/rdbms/admin/externaljob.ora # chmod 640 $ORACLE_HOME/rdbms/admin/externaljob.ora # chown root $ORACLE_HOME/bin/jssu # chmod 4750 $ORACLE_HOME/bin/jssu # chown root $ORACLE_HOME/bin/nmb # chmod 4710 $ORACLE_HOME/bin/nmb # chown root $ORACLE_HOME/bin/nmhs # chmod 4710 $ORACLE_HOME/bin/nmhs # chown root $ORACLE_HOME/bin/nmo # chmod 4710 $ORACLE_HOME/bin/nmo