6

Various sources on the internet suggest relinking of Oracle binaries is necessary after each OS upgrade and / or patch.

I can understand relinking would be necessary when upgrading glibc. Some package likely do not to require relinking, some do, some I am not sure about:

  • upgrading glibc -> I suppose relinking required
  • upgrading vim -> I suppose no relinking required
  • upgrading gzip -> I'm not sure
  • upgrading kernel -> I'm not sure

Does anyone have a list, or can anyone point me to a list to what libraries Oracle actually links? I am not an Oracle DBA, so I am clueless about the Oracle linking procedure. I am not even sure I actually understand what Oracle is doing during the relinking: it's not really a common practice in binary software to do it's own linking after install, is it?

Anyway, to make a long story short: I have a couple of RHEL[345] boxes, that I need to apply some patches to. Most boxes run Oracle and I am wondering what patches would require relinking and what would not. A list as exhaustive as possible would be nice :)

4 Answers 4

4

I have rarely needed to relink Oracle database, maybe only after major O/S upgrade or going from 32-bit to 64-bit. However, if you have doubts, just run it. It takes a minute. Another source to consult with is metalink note 131321.1... the gist is:

" 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.

The following information has been added to the 'Certify' section of Metalink:

General Notes For Oracle Database - Enterprise Edition:

O/S Information: The vendors guarantee operating system binary compatibility; therefore, no reinstall or relink of the Oracle software is required when upgrading these operating systems unless specifically stated otherwise.

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.
  • Individual Oracle executables core dump during initial startup.
  • 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)

"

1

For a complete picture, in additionan to what was said above, Oracle Clusterware may also need relink if you're changing Linux kernel. For example if you use ACFS filesystem, Oracle has ACFS kernel drivers for a specific Linux kernel version. Not sure if minor kernel upgrades qualify for this though.

It's not actually a relink itself that fixes acfs Clusterware drivers, but crs/install/rootcrs.pl -lock (or roothas.pl -lock for a single-node clusterware) script that installs new ACFS drivers. You'll have to call rootcrs.pl -unlock before relinking clusterware binaries, and once relinking is done - then rootcrs.pl -lock .

0

From Oracle Metalink Note "Relinking Oracle Home FAQ ( Frequently Asked Questions)(Doc ID 1467060.1)" already mentioned in another answer, the current versin of the document:

  1. When Manual relinking is required? Manual relinking is required in below situations.

    A) After OS upgrade, Generally OS Vendors guarantee operating system binary compatibility, therefore, no reinstall or relink of the Oracle software is required when upgrading these operating systems unless specifically stated otherwise. "However Oracle recommends performing manual relinking of Oracle Home binaries after OS upgrade". Hardware changes does not require relinking.

    B) After Operating system has been patched.( Recommended ).

  2. Is relinking required after an OS upgrade , Downgrade , Patching or removal of the patch ? Yes, 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.

If you use Oracle Linux then this is 100% compatible to Redhat Enterprise Linux aacording to Frequently Asked Questions Oracle Linux

  • Oracle Linux is application binary compatible with Red Hat Enterprise Linux whether running the Unbreakable Enterprise Kernel or Oracle’s alternative Red Hat compatible kernel. Existing applications run unchanged with the Unbreakable Enterprise Kernel because all system libraries remain unchanged.

Red Hat Enterprise Linux 7: Application Compatibility GUIDE.

Note: During the life cycle of a major release, Red Hat makes commercially reasonable efforts to maintain binary compatibility for the core runtime environment across all minor releases and errata advisories. If necessary, Red Hat may make exceptions to this compatibility goal for critical impact security or other significant issues. Furthermore, as described above and in Appendix A, major releases of Red Hat Enterprise Linux contain a limited set of backward-compatible libraries included in previous major releases to allow for the easy migration of applications. Typically, Red Hat applies changes in such a way as to minimize the amount of change and to maintain binary compatibility. Exceptions may apply for controlled package re-bases under certain circumstances.

So Oracle recommands to relink the binaries after a change (a patch, an upgrade,...) and Redhat only makes "commercially reasonable efforts to maintain binary compatibility for the core runtime environment across all minor releases".

For binary compatibility it is not only necessary that the OS does not change the Application binary interface (ABI) but also that the application only uses this interfaces and no other, maybe undocumented routines.

Relinking is easy and Oracle supplies a script that must be executed in the correct environment. So actually you could add linking to the start scrips of you database, if you have one, and do this linking every time when you start the database.

The Linux packages that are needed can be found in the Database Installation Guide for Linux in the section

  1. Oracle Database Preinstallation Tasks

4.8. Operating System Requirements for x86-64 Linux Platforms

4.8.1. Supported Oracle Linux 7 and Red Hat Enterprise Linux 7 Distributions for x86-64 and for Linux 7 and Oracle 12. you can fin

binutils-2.23.52.0.1-12.el7.x86_64 
compat-libcap1-1.10-3.el7.x86_64
compat-libstdc++-33-3.2.3-71.el7.i686 
compat-libstdc++-33-3.2.3-71.el7.x86_64
gcc-4.8.2-3.el7.x86_64 
gcc-c++-4.8.2-3.el7.x86_64 
glibc-2.17-36.el7.i686 
glibc-2.17-36.el7.x86_64 
glibc-devel-2.17-36.el7.i686 
glibc-devel-2.17-36.el7.x86_64 
ksh
libaio-0.3.109-9.el7.i686 
libaio-0.3.109-9.el7.x86_64 
libaio-devel-0.3.109-9.el7.i686 
libaio-devel-0.3.109-9.el7.x86_64 
libgcc-4.8.2-3.el7.i686 
libgcc-4.8.2-3.el7.x86_64 
libstdc++-4.8.2-3.el7.i686 
libstdc++-4.8.2-3.el7.x86_64 
libstdc++-devel-4.8.2-3.el7.i686 
libstdc++-devel-4.8.2-3.el7.x86_64 
libXi-1.7.2-1.el7.i686 
libXi-1.7.2-1.el7.x86_64 
libXtst-1.2.2-1.el7.i686 
libXtst-1.2.2-1.el7.x86_64 
make-3.82-19.el7.x86_64 
sysstat-10.1.5-1.el7.x86_64 

But i am not sure how reliable this information of the manual is. >ou caan also run the "ldd" command for some binaries to find out which libraries it uses.

$ ldd  $ORACLE_HOME/bin/oracle
linux-vdso.so.1 =>  (0x...)
libodm11.so => $ORACLE_HOME/lib/libodm11.so (0x...)
libcell11.so => $ORACLE_HOME/lib/libcell11.so (0x...)
libskgxp11.so => $ORACLE_HOME/lib/libskgxp11.so (0x...)
librt.so.1 => /lib64/librt.so.1 (0x...)
libnnz11.so => $ORACLE_HOME/lib/libnnz11.so (0x...)
libclsra11.so => $ORACLE_HOME/lib/libclsra11.so (0x...)
libdbcfg11.so => $ORACLE_HOME/lib/libdbcfg11.so (0x...)
libhasgen11.so => $ORACLE_HOME/lib/libhasgen11.so (0x...)
libskgxn2.so => $ORACLE_HOME/lib/libskgxn2.so (0x...)
libocr11.so => $ORACLE_HOME/lib/libocr11.so (0x...)
libocrb11.so => $ORACLE_HOME/lib/libocrb11.so (0x...)
libocrutl11.so => $ORACLE_HOME/lib/libocrutl11.so (0x...)
libaio.so.1 => /lib64/libaio.so.1 (0x...)
libdl.so.2 => /lib64/libdl.so.2 (0x...)
libm.so.6 => /lib64/libm.so.6 (0x...)
libpthread.so.0 => /lib64/libpthread.so.0 (0x...)
libnsl.so.1 => /lib64/libnsl.so.1 (0x...)
libc.so.6 => /lib64/libc.so.6 (0x...)
/lib64/ld-linux-x86-64.so.2 (0x...)
$

But I think it is easier to relink the Oracle software. This is not difficult. According to the Metalink note, set the variables

ORACLE_HOME
PATH to include $ORACLE_HOME/bin
LD_LIBRARY_PATH $ORACLE_HOME/lib:/usr/lib

and run

$ORACLE_HOME/bin/relink all
-1

I would suggest no for all your scenarios. I always understood that relinking was for when you upgraded or patched parts of your Oracle installation, not its supporting operating system.

2
  • 1
    The sources I link to specifically talk about upgrading the /operating system/ and having to relink after that, though.
    – wzzrd
    Jul 8, 2009 at 9:47
  • 1
    The first link says "Individual Oracle executables core dump during initial startup." That's when I would relink. Otherwise I leave well alone. In twelve years of using Oracle I have rarely found the need to relink. Jul 8, 2009 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.