Monday 6 December 2010

How to Relink Oracle Database Software

Its better to know the relinking of oracle software manually when there is a situation like

  • 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.
  • Individual Oracle executables core dump during initial startup.
  • An individual Oracle patch has been applied.

So, relinking Oracle manually is suggested way under the above circumstances.

Those who want to (or have been advised to) manually relink should follow the procedure below.

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:
echo $ORACLE_HOME

Step 3 - Verify and/or Configure the UNIX Environment for Proper Relinking
Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib

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

env|pg  ....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:

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.

For all UNIX platforms:

Oracle 7.3.x 
For executables:  oracle, exp, imp, sqlldr, tkprof

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk install

For executables:  svrmgrl, svrmgrm

cd $ORACLE_HOME/svrmgr/lib
make -f ins_svrmgr.mk linstall minstall (linstall is for svrmgrl, minstall is for svrmgrm)

For executables:  sqlplus

cd $ORACLE_HOME/sqlplus/lib
make -f ins_sqlplus.mk install

For executables:  dbsnmp, oemevent, oratclsh

cd $ORACLE_HOME/network/lib
make -f ins_agent.mk install

For executables:  names, namesctl

cd $ORACLE_HOME/network/lib
make -f ins_names.mk install

For executables:  tnslsnr, lsnrctl, tnsping, csmnl, trceval, trcroute

cd $ORACLE_HOME/network/lib
make -f ins_network.mk install

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

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk install

For executables:  sqlplus
cd $ORACLE_HOME/sqlplus/lib
make -f ins_sqlplus.mk install

For executables:  dbsnmp, oemevent, oratclsh, libosm.so

cd $ORACLE_HOME/network/lib
make -f ins_oemagent.mk install

For executables:  tnslsnr, lsnrctl, namesctl, names, osslogin, trcasst, trcroute

cd $ORACLE_HOME/network/lib
make -f ins_network.mk install

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

relink all  

11.2.X special instructions

In 11.2 relink script will only accept "all" as argument
 -or-
Since the 'relink' command merely calls the traditional 'make' commands, you still have the option of 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 ins_rdbms.mk 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 ins_sqlplus.mk install

For executables:  isqlplus   (Oracle9i and higher versions)

cd $ORACLE_HOME/sqlplus/lib
make -f ins_sqlplus.mk install_isqlplus

For executables:  dbsnmp, oemevent, oratclsh

cd $ORACLE_HOME/network/lib
make -f ins_oemagent.mk 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 ins_names.mk install

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

cd $ORACLE_HOME/network/lib
make -f ins_net_client.mk install

For executables:  tnslsnr, lsnrctl

cd $ORACLE_HOME/network/lib
make -f ins_net_server.mk install

For executables related to ldap (for example Oracle Internet Directory):

cd $ORACLE_HOME/ldap/lib
make -f ins_ldap.mk 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 message.

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 verbage 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 output:

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.


Cheers!!!

SocialTwist Tell-a-Friend

Related Posts by Categories



No comments: