When execute ’sqlplus’ as a user outside of the dba or Oracle group, you get the following errors.
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
According to Metalink, this is a bug for oracle 10g by setting wrong file/folder permissions.
Solution:
I. Logged in as the Oracle user (or the user that installed the 10gR2 software), manually change the permissions on the client. For example:
chmod -R 755 <client_home>
In our case:
chmod -R 755 $ORACLE_HOME/sqlplus
II. If doing a recursive permissions command is not acceptable, then you will need to pinpoint exactly what files the client is reading at the time of execution, and manually change permissions only on those files. In our case, we need to pinpoint what files are being accessed by SQL*Plus. To implement this workaround, please execute the following steps:
1. As the non-Oracle user, run the truss utility to find out which files are being accessed. Sample command:
truss -aefo /tmp/truss_sqlplus.out sqlplus username/password
2. Use this truss_sqlplus.out trace file to see what files have error “EACCES” when attempting to access. In our case, the truss_sqlplus.out showed a problem accessing the following file:
$ORACLE_HOME/sqlplus/mesg/sp1us.msb
Another possible error to search for in the truss output is ENOENT. For example:
9775: open(“./sqlplus/mesg/sp1us.msb”, O_RDONLY) Err#2 ENOENT
3. Logged in as the Oracle user, change permissions on folders leading up to, and including sp1us.msb:
chmod 755 $ORACLE_HOME/sqlplus
chmod 755 $ORACLE_HOME/sqlplus/mesg
chmod 755 $ORACLE_HOME/sqlplus/mesg/sp1us.msb
4. After making above permission changes, a different error may appear when executing sqlplus as non-Oracle user, such as:
$ sqlplus username/password
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
$
5. At this point, you need to re-run the truss (as non-Oracle) to see what other files are trying to be accessed. In our case, the following files were trying to get accessed, but showed “EACCES” failure:
$ORACLE_HOME/nls/data/lx1boot.nlb
$ORACLE_HOME/oracore/zoneinfo/timezlrg.dat
6. Logged in as the Oracle user, change permissions on these files and the directories leading up to these files.
chmod 755 $ORACLE_HOME/nls
chmod 755 $ORACLE_HOME/nls/data
chmod 755 $ORACLE_HOME/nls/data/lx1boot.nlb
chmod 755 $ORACLE_HOME/oracore
chmod 755 $ORACLE_HOME/oracore/zoneinfo
chmod 755 $ORACLE_HOME/oracore/zoneinfo/timezlrg.dat
7. Now, invoking sqlplus as a non-Oracle user was successful in our case.
Hallo,
this was the solution for my problem. Thanks.
I use oracle 10.2g with HP-Unix but I don’t find the truss-utility. Where can i find this ?
bye
Comment by grauerwolf — December 17, 2008 @ 5:01 am
on HP-UX you need to use “tusc” instead of “truss”
Comment by zhefeng — December 17, 2008 @ 10:53 am
Good reference. This resolved my issue, have this issue after 10.2.0.4 upgrade from 10.2.0.2
Comment by S Reddy — May 26, 2009 @ 9:00 am
Good sum up of the oracle installation problem. If only i had found it earlier it might have avoid me 1 day of research.
One more stuff to chek out would be the right and target of $ORACLE_HOME/lib32/libclntsh.sl
Comment by guillaume — May 30, 2009 @ 9:39 am