How to Relink Oracle Database Software on UNIX

Applies to: Database management software Oracle Server - Enterprise Edition - Version: to - Release: 7.3.2 to 11.2

Information in this document applies to any platform.

PURPOSE: Provide relinking instructions for Oracle Database software on UNIX platforms.

 Relinking occurs automatically under these circumstances:

 - An Oracle product has been installed with an Oracle provided installer.
 - An Oracle patch set has been applied via an Oracle provided installer.

Relinking Oracle manually is suggested under the following circumstances
(even though the OS vendor may not require it):

 - An OS upgrade has occurred.
 - A change has been made to the OS system libraries.  This can occur during the application of an OS patch.
 - A new install failed during the relinking phase.

 - An individual Oracle patch has been applied (however, explicit relink
   instructions are usually either included in the README or integrated into
   the patch install script)

Step for Relinking:

[Step 1] Log into the UNIX system as the Oracle software owner:
Typically this is the user 'oracle'.

[STEP 2] Verify that your $ORACLE_HOME is set correctly:
For all Oracle Versions and Platforms, perform this basic environment check

 % pwd  

Doing this will ensure that $ORACLE_HOME is set correctly in your current environment.

[Step 3] Verify and/or Configure the UNIX Environment for proper relinking:
For all Oracle Versions and UNIX Platforms:

 The Platform specific environment variables LIBPATH, LD_LIBRARY_PATH, & SHLIB_PATH typically are already set to include system library locations like '/usr/lib'.  In most cases, you need only check what they are set to first, then add the $ORACLE_HOME/lib directory to them where appropriate.


[Step 4] For all Oracle Versions and UNIX Platforms:
Verify that you performed Step 2 correctly:

make sure that you see the correct absolute path for
   $ORACLE_HOME in the variable definitions.

[Step 5] For all Oracle Versions and UNIX Platforms:
Verify umask is set correctly:

 % umask

This must return 022.  If it does not, set umask to 022.

 % umask 022
 % umask

[Step 6] Run the OS Commands to Relink Oracle:

Important Notes:

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

* If relinking a client installation, it's expected that some aspects of the following commands will fail if the components were not originally installed.

For all UNIX platforms:

Oracle 8.1.X, 9.X.X, 10.X.X or 11.X.X
  *** NEW IN 8i AND ABOVE ***

   A 'relink' script is provided in the $ORACLE_HOME/bin directory.
     % cd $ORACLE_HOME/bin
     % relink      ...this will display all of the command's options.
       usage: relink

       accepted values for parameter: all, oracle, network, client,
       client_sharedlib, interMedia, precomp, utilities, oemagent, ldap

  You can relink most of the executable associated with an Oracle Server Installation
  by running the following command:

     % relink all

  11.2.x special instructions (, etc...)

A) From 11GR2 the relink script will only accept "all" as argument (it is also
explained in:  Oracle 11gR2 Relink New Feature).

See in C) the traditional 'make' commands that can be run independently.

You may use the following command which will only output errors to the screen, if any,
but will capture the entire relink to a log file:

$ORACLE_HOME/oui/bin/runInstaller -relink -waitForCompletion -maketargetsxml $ORACLE_HOME/inventory/make/makeorder.xml \
ORACLE_HOME=$ORACLE_HOME 2>&1 | tee $ORACLE_HOME/install/relink.log | grep -i error | grep -iv warning

C) Running the 'make' commands independently:

 For executables:  oracle, exp, imp, sqlldr, tkprof, mig, dbv, orapwd, rman,
                   svrmgrl, ogms, ogmsctl

      % cd $ORACLE_HOME/rdbms/lib
      % make -f install

      NOTE: After relinking the oracle executable, make sure that the
      permissions on the executable are 6751 (-rwsr-s--x). If they are
      not, run the following command as the Oracle software owner:

      % cd $ORACLE_HOME/bin
      % chmod 6751 oracle

 For executables:  sqlplus

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

 For executables:  isqlplus   (Oracle9i and higher versions)

      % cd $ORACLE_HOME/sqlplus/lib
      % make -f install_isqlplus

 For executables:  dbsnmp, oemevent, oratclsh

      % cd $ORACLE_HOME/network/lib
      % make -f install

      NOTE: After relinking the dbsnmp executable, it is necessary to run
      the following commands as root (so that the ownership/permissions on
      the executable are correct):

      # cd $ORACLE_HOME/bin
      # chown root dbsnmp
      # chmod 6750 dbsnmp

 For executables:  names, namesctl

      % cd $ORACLE_HOME/network/lib
      % make -f install

 For executables:  osslogin, trcasst, trcroute, onrsd, tnsping

      % cd $ORACLE_HOME/network/lib
      % make -f install

 For executables:  tnslsnr, lsnrctl

      % cd $ORACLE_HOME/network/lib
      % make -f install

How to Tell if Relinking Was Successful:
If relinking was successful, the make command will eventually return to the OS
prompt without an error. There will NOT be a 'Relinking Successful' type

If You Receive an Error Message During Relinking:
Confirm that the message you received is an actual fatal error and not a warning. Relinking errors usually terminate the relinking process and contain verbiage similar to the following:

'Fatal error', 'Ld: fatal', 'Exit Code 1'
While warnings will look similar to: 'ld: warning: option -YP appears more than once, first setting taken' 
and can most often be ignored.

If you receive an error that terminates the relinking process, your first step
should be to extract the relevant information about the error from the make

This can be broken down into three basic steps:

 1. Identify the OS utility that is returning the error.
    'ld', 'make', 'cc', 'mv', 'cp', 'ar' are common sources.
 2. Identify the type of error:
    'Permission Denied', 'Undefined Symbol', 'File Not Found' are common types.
 3. Identify the files or symbols involved.


  1. What’s up, every time i used to check blog posts here in
    the early hours in the break of day, for the reason that
    i enjoy to gain knowledge of more and more.

    Feel free to surf to my web-site: social []

  2. Thanks Man. Your blog helped me.