Oracle Relink

Relink Oracle...

  1. After any OS upgrade or patch

  2. On instruction from Oracle Support

Relink

This command is available with Oracle Database 8i and later.

As 'root' (for AIX only):

/usr/sbin/slibclean

This detaches all files from memory that are not attached to an active process.

As 'oracle'

unset LINK_CNTRL

echo $LIBPATH

export LIBPATH=$ORACLE_HOME/lib:$LIBPATH # if dir not already included

cd $ORACLE_HOME/bin

./relink all

Log File

The log file will be called:

$ORACLE_HOME/install/relink.log

Any previous relink.log files will be renamed automatically to include a date/timestamp.
Note: The Warnings listed below are expected on AIX and can be safely ignored. ld: 0711-773 WARNING:ld: 0711-783 WARNING:ld: 0711-319 WARNING:ld: 0711-415 WARNING:ld: 0711-224 WARNING:ld: 0711-324 WARNING:ld: 0711-301 WARNING:ld: 0711-345 WARNING:

Check File Permissions

extjob

ls -l $ORACLE_HOME/bin/extjob

After patching/relinking check if file permissions have changed to...

-rwxr-xr-x 1 oracle oinstall 848077 27 Oct 14:54 extjob

To fix it (as root) run...

chmod 4750 /u01/app/oracle/product/12.1.0.2/bin/extjob

chown root:oinstall /u01/app/oracle/product/12.1.0.2/bin/extjob

Correct permissions are:

-rwsr-x--- 1 root oinstall 848077 27 Oct 14:54 extjob

libsqlplus.so

ls -l $ORACLE_HOME/lib/libsqlplus.so

After patching check if file permissions have changed to...

-rw-r----- 1 oracle oinstall 1333360 25 Apr 14:54 libsqlplus.so

To fix it (as root) run...

chmod 644 /u01/app/oracle/product/12.1.0.2/lib/libsqlplus.so

Correct permissions are

-rw-r--r-- 1 oracle oinstall 1333360 25 Apr 14:54 libsqlplus.so

Additional Information

You can also use the relink command to relink a subset of the Oracle installation. Options include:

relink all

The "relink all" command will not actually relink every single executable Oracle provides (you can discern which executables were relinked by checking their timestamp with 'ls -l' in the $ORACLE_HOME/bin directory). However, 'relink all' will recreate the shared libraries that most executables rely on and thereby resolve most issues that require a proper relink.

relink oracle

RDBMS components only

relink network

Network components only

relink client

Client components only

relink client_sharedlib

Client shared library components only

relink interMedia

InterMedia components only

relink ctx

Context components only

relink precomp

PreCompiler components only

relink utilities

Utilities (expdp, sqlldr etc) only

relink oemagent

Oracle Enterprise Manager Agent

relink ldap

LDAP components only

Bibliography


https://support.oracle.comRelinking Oracle Home FAQ ( Frequently Asked Questions) (Doc ID 1467060.1)Oracle 11gR2 Relink New Feature (Doc ID 883299.1)Can Slibclean Command be Executed When the Database is up and Running? (Doc ID 435071.1)
https://www.thegeekdiary.com/steps-to-relink-oracle-libraries/