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:
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 ).
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
- 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