Error 6 initializing SQL*Plus on instance clients

Document ID : KB000090344
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error 6 initializing SQL*Plus on instance clients
Resolution:

Symptoms

Jobs that are run on an instance client fail with the following error messages:

Error 6 iitializing SQL*Plus

SP2-0667: Message file spllang.msb not found

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

 

It is also not possible to log into SQL*Plus after invoking the sosite file with the same error message.


Cause

The sosite file contains a line that sources in the sqloper.ini file which resides in the $aw_home/bin directory ($AW_HOME/bin/sqloper.ini). The sqloper.ini file contains a section that sets the LIBPATH to include $aw_home/c. Prior to running the sosite file, the variable LIBPATH does not exist in the environment. LIBPATH has meaning in the oracle world and would typically be set to something like this: $ORACL_HOME/lib32.

The instant client does not require an ORACLE_HOME environment variable (per the oracle documentation) but oracle still seems to reference somewhere in the sqlplus distribution provided for the instant client. When it does not see an ORACLE_HOME the error above is thrown.


Resolution

The solution is to set LIBPATH to the same value as the instant client home directory in the sosite file prior to sourcing in the sqloper.ini as follows:

LIBPATH=$LD_LIBRARY_PATH; export LIBPATH

. $AW_HOME/bin/sqloper.ini