Problem
When attempting to start the listener you receive the following error.
[oracle@ora2 ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-JUL-2010 10:38:43 Copyright (c) 1991, 2009, Oracle. All rights reserved. Message 1070 not found; No message file for product=network, facility=TNSTNS-12545: Message 12545 not found; No message file for product=network, facility=TNS TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS TNS-00515: Message 515 not found; No message file for product=network, facility=TNS Linux Error: 2: No such file or directory [oracle@ora2 ~]$
Or you may receive the following when attempting to use tnsping
.
[oracle@ora2 ~]$ tnsping proddb TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 06-JUL-2010 10:38:30 Copyright (c) 1997, 2009, Oracle. All rights reserved. Message 3511 not found; No message file for product=network, facility=TNSTNS-03505: Message 3505 not found; No message file for product=network, facility=TNS [oracle@ora2 ~]$
Or you might have attempted a connection using SQL*Plus and received the following error.
[oracle@ora2 ~]$ sqlplus /nolog Error 6 initializing SQL*Plus SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory [oracle@ora2 ~]$
Of the three errors messages, the message returned using SQL*Plus is the most descriptive and actually points to the problem causing all three.
The above mentioned utilities along with others included with the Oracle software need to have the ORACLE_HOME
environment variable pointing to the proper location. In the above mentioned cases the utilities were unable access messages files. In particular the both the lsnrctl
and tsnping
were unable to access message files ORACLE_HOME/network/mesg
and SQL*Plus as unable to access message files in ORACLE_HOME/sqlplus/mesg
.
The message files contain status and error message used by the various utilities provided by Oracle.
Solution
Set the ORACLE_HOME
environment variable to the proper location and retry the utility.
check $ORACLE_HOME/sqlplus/mesg dir. There should be 6 files. Please compare with working env and copy the missing files and will work.
-bash-4.1$ export HOME=/ora01/oraBin/ora10204/
-bash-4.1$ sqlplus /nolog
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/bin
-bash-4.1$ sqlplus /nolog
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ export ORACLE_HOME=/ora01/oraBin/ora10204/
-bash-4.1$ cd $ORACLE_HOME
-bash-4.1$ ls
assistants demo jlib oc4j perl sqlplus
bin diagnostics jre odbc plsql srvm
ccr has ldap olap precomp sysman
cdata hs lib OPatch racg tg4ifmx
cfgtoollogs install lib32 opmn rdbms tg4ingr
clone install.platform log oracore relnotes tg4sybs
config instantclient32 md oradata root.sh tg4tera
crs inventory mesg oraInst.loc root.sh.old uix
css javavm mgw ord root.sh.old.1 wwg
ctx jdbc network oui slax xdk
dbs jdk nls owm sqlj
-bash-4.1$ pwd
/ora01/oraBin/ora10204
-bash-4.1$ more install.platform
[DEFAULT_SECTION]
[Platform]
ID=453
-bash-4.1$ cd sqlplus
-bash-4.1$ ls -la ./
total 36
drwxrwxrwx 9 oracle dba 4096 Apr 11 13:03 .
drwxrwxrwx 62 oracle dba 4096 May 14 16:03 ..
drwxrwxrwx 4 oracle dba 4096 Apr 11 13:23 admin
drwxrwxrwx 2 oracle dba 4096 Apr 11 13:28 bin
drwxrwxrwx 2 oracle dba 4096 Apr 11 12:59 doc
drwxrwxrwx 2 oracle dba 4096 Apr 11 13:28 lib
drwxrwxrwx 3 oracle dba 4096 Apr 11 13:03 log
drwxrwxrwx 2 oracle dba 4096 Apr 11 12:59 mesg
drwxrwxrwx 3 oracle dba 4096 Apr 11 13:03 opmn
-bash-4.1$ ls bin
isqlplus.ini
-bash-4.1$ vi bin/isqlplus.ini
-bash-4.1$ sqlplus /nolog
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
I have st it to the right location at least 30 times and env says it is correct